unmarshal_test.go 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435
  1. package ec2query_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/ec2query"
  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, c.SigningName)
  59. }
  60. // newClient creates, initializes and returns a new service client instance.
  61. func newOutputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService1ProtocolTest {
  62. svc := &OutputService1ProtocolTest{
  63. Client: client.New(
  64. cfg,
  65. metadata.ClientInfo{
  66. ServiceName: "outputservice1protocoltest",
  67. SigningName: signingName,
  68. SigningRegion: signingRegion,
  69. Endpoint: endpoint,
  70. APIVersion: "",
  71. },
  72. handlers,
  73. ),
  74. }
  75. // Handlers
  76. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  77. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  78. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  79. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  80. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  81. return svc
  82. }
  83. // newRequest creates a new request for a OutputService1ProtocolTest operation and runs any
  84. // custom request initialization.
  85. func (c *OutputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  86. req := c.NewRequest(op, params, data)
  87. return req
  88. }
  89. const opOutputService1TestCaseOperation1 = "OperationName"
  90. // OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
  91. // client's request for the OutputService1TestCaseOperation1 operation. The "output" return
  92. // value can be used to capture response data after the request's "Send" method
  93. // is called.
  94. //
  95. // See OutputService1TestCaseOperation1 for usage and error information.
  96. //
  97. // Creating a request object using this method should be used when you want to inject
  98. // custom logic into the request's lifecycle using a custom handler, or if you want to
  99. // access properties on the request object before or after sending the request. If
  100. // you just want the service response, call the OutputService1TestCaseOperation1 method directly
  101. // instead.
  102. //
  103. // Note: You must call the "Send" method on the returned request object in order
  104. // to execute the request.
  105. //
  106. // // Example sending a request using the OutputService1TestCaseOperation1Request method.
  107. // req, resp := client.OutputService1TestCaseOperation1Request(params)
  108. //
  109. // err := req.Send()
  110. // if err == nil { // resp is now filled
  111. // fmt.Println(resp)
  112. // }
  113. func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *request.Request, output *OutputService1TestShapeOutputService1TestCaseOperation1Output) {
  114. op := &request.Operation{
  115. Name: opOutputService1TestCaseOperation1,
  116. HTTPPath: "/",
  117. }
  118. if input == nil {
  119. input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{}
  120. }
  121. output = &OutputService1TestShapeOutputService1TestCaseOperation1Output{}
  122. req = c.newRequest(op, input, output)
  123. return
  124. }
  125. // OutputService1TestCaseOperation1 API operation for .
  126. //
  127. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  128. // with awserr.Error's Code and Message methods to get detailed information about
  129. // the error.
  130. //
  131. // See the AWS API reference guide for 's
  132. // API operation OutputService1TestCaseOperation1 for usage and error information.
  133. func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) {
  134. req, out := c.OutputService1TestCaseOperation1Request(input)
  135. err := req.Send()
  136. return out, err
  137. }
  138. type OutputService1TestShapeOutputService1TestCaseOperation1Input struct {
  139. _ struct{} `type:"structure"`
  140. }
  141. type OutputService1TestShapeOutputService1TestCaseOperation1Output struct {
  142. _ struct{} `type:"structure"`
  143. Char *string `type:"character"`
  144. Double *float64 `type:"double"`
  145. FalseBool *bool `type:"boolean"`
  146. Float *float64 `type:"float"`
  147. Long *int64 `type:"long"`
  148. Num *int64 `locationName:"FooNum" type:"integer"`
  149. Str *string `type:"string"`
  150. TrueBool *bool `type:"boolean"`
  151. }
  152. // SetChar sets the Char field's value.
  153. func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetChar(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output {
  154. s.Char = &v
  155. return s
  156. }
  157. // SetDouble sets the Double field's value.
  158. func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetDouble(v float64) *OutputService1TestShapeOutputService1TestCaseOperation1Output {
  159. s.Double = &v
  160. return s
  161. }
  162. // SetFalseBool sets the FalseBool field's value.
  163. func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetFalseBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation1Output {
  164. s.FalseBool = &v
  165. return s
  166. }
  167. // SetFloat sets the Float field's value.
  168. func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetFloat(v float64) *OutputService1TestShapeOutputService1TestCaseOperation1Output {
  169. s.Float = &v
  170. return s
  171. }
  172. // SetLong sets the Long field's value.
  173. func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetLong(v int64) *OutputService1TestShapeOutputService1TestCaseOperation1Output {
  174. s.Long = &v
  175. return s
  176. }
  177. // SetNum sets the Num field's value.
  178. func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetNum(v int64) *OutputService1TestShapeOutputService1TestCaseOperation1Output {
  179. s.Num = &v
  180. return s
  181. }
  182. // SetStr sets the Str field's value.
  183. func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetStr(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output {
  184. s.Str = &v
  185. return s
  186. }
  187. // SetTrueBool sets the TrueBool field's value.
  188. func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetTrueBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation1Output {
  189. s.TrueBool = &v
  190. return s
  191. }
  192. // The service client's operations are safe to be used concurrently.
  193. // It is not safe to mutate any of the client's properties though.
  194. type OutputService2ProtocolTest struct {
  195. *client.Client
  196. }
  197. // New creates a new instance of the OutputService2ProtocolTest client with a session.
  198. // If additional configuration is needed for the client instance use the optional
  199. // aws.Config parameter to add your extra config.
  200. //
  201. // Example:
  202. // // Create a OutputService2ProtocolTest client from just a session.
  203. // svc := outputservice2protocoltest.New(mySession)
  204. //
  205. // // Create a OutputService2ProtocolTest client with additional configuration
  206. // svc := outputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  207. func NewOutputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService2ProtocolTest {
  208. c := p.ClientConfig("outputservice2protocoltest", cfgs...)
  209. return newOutputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  210. }
  211. // newClient creates, initializes and returns a new service client instance.
  212. func newOutputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService2ProtocolTest {
  213. svc := &OutputService2ProtocolTest{
  214. Client: client.New(
  215. cfg,
  216. metadata.ClientInfo{
  217. ServiceName: "outputservice2protocoltest",
  218. SigningName: signingName,
  219. SigningRegion: signingRegion,
  220. Endpoint: endpoint,
  221. APIVersion: "",
  222. },
  223. handlers,
  224. ),
  225. }
  226. // Handlers
  227. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  228. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  229. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  230. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  231. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  232. return svc
  233. }
  234. // newRequest creates a new request for a OutputService2ProtocolTest operation and runs any
  235. // custom request initialization.
  236. func (c *OutputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  237. req := c.NewRequest(op, params, data)
  238. return req
  239. }
  240. const opOutputService2TestCaseOperation1 = "OperationName"
  241. // OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
  242. // client's request for the OutputService2TestCaseOperation1 operation. The "output" return
  243. // value can be used to capture response data after the request's "Send" method
  244. // is called.
  245. //
  246. // See OutputService2TestCaseOperation1 for usage and error information.
  247. //
  248. // Creating a request object using this method should be used when you want to inject
  249. // custom logic into the request's lifecycle using a custom handler, or if you want to
  250. // access properties on the request object before or after sending the request. If
  251. // you just want the service response, call the OutputService2TestCaseOperation1 method directly
  252. // instead.
  253. //
  254. // Note: You must call the "Send" method on the returned request object in order
  255. // to execute the request.
  256. //
  257. // // Example sending a request using the OutputService2TestCaseOperation1Request method.
  258. // req, resp := client.OutputService2TestCaseOperation1Request(params)
  259. //
  260. // err := req.Send()
  261. // if err == nil { // resp is now filled
  262. // fmt.Println(resp)
  263. // }
  264. func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *request.Request, output *OutputService2TestShapeOutputService2TestCaseOperation1Output) {
  265. op := &request.Operation{
  266. Name: opOutputService2TestCaseOperation1,
  267. HTTPPath: "/",
  268. }
  269. if input == nil {
  270. input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{}
  271. }
  272. output = &OutputService2TestShapeOutputService2TestCaseOperation1Output{}
  273. req = c.newRequest(op, input, output)
  274. return
  275. }
  276. // OutputService2TestCaseOperation1 API operation for .
  277. //
  278. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  279. // with awserr.Error's Code and Message methods to get detailed information about
  280. // the error.
  281. //
  282. // See the AWS API reference guide for 's
  283. // API operation OutputService2TestCaseOperation1 for usage and error information.
  284. func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) {
  285. req, out := c.OutputService2TestCaseOperation1Request(input)
  286. err := req.Send()
  287. return out, err
  288. }
  289. type OutputService2TestShapeOutputService2TestCaseOperation1Input struct {
  290. _ struct{} `type:"structure"`
  291. }
  292. type OutputService2TestShapeOutputService2TestCaseOperation1Output struct {
  293. _ struct{} `type:"structure"`
  294. // Blob is automatically base64 encoded/decoded by the SDK.
  295. Blob []byte `type:"blob"`
  296. }
  297. // SetBlob sets the Blob field's value.
  298. func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) SetBlob(v []byte) *OutputService2TestShapeOutputService2TestCaseOperation1Output {
  299. s.Blob = v
  300. return s
  301. }
  302. // The service client's operations are safe to be used concurrently.
  303. // It is not safe to mutate any of the client's properties though.
  304. type OutputService3ProtocolTest struct {
  305. *client.Client
  306. }
  307. // New creates a new instance of the OutputService3ProtocolTest client with a session.
  308. // If additional configuration is needed for the client instance use the optional
  309. // aws.Config parameter to add your extra config.
  310. //
  311. // Example:
  312. // // Create a OutputService3ProtocolTest client from just a session.
  313. // svc := outputservice3protocoltest.New(mySession)
  314. //
  315. // // Create a OutputService3ProtocolTest client with additional configuration
  316. // svc := outputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  317. func NewOutputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService3ProtocolTest {
  318. c := p.ClientConfig("outputservice3protocoltest", cfgs...)
  319. return newOutputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  320. }
  321. // newClient creates, initializes and returns a new service client instance.
  322. func newOutputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService3ProtocolTest {
  323. svc := &OutputService3ProtocolTest{
  324. Client: client.New(
  325. cfg,
  326. metadata.ClientInfo{
  327. ServiceName: "outputservice3protocoltest",
  328. SigningName: signingName,
  329. SigningRegion: signingRegion,
  330. Endpoint: endpoint,
  331. APIVersion: "",
  332. },
  333. handlers,
  334. ),
  335. }
  336. // Handlers
  337. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  338. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  339. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  340. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  341. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  342. return svc
  343. }
  344. // newRequest creates a new request for a OutputService3ProtocolTest operation and runs any
  345. // custom request initialization.
  346. func (c *OutputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  347. req := c.NewRequest(op, params, data)
  348. return req
  349. }
  350. const opOutputService3TestCaseOperation1 = "OperationName"
  351. // OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
  352. // client's request for the OutputService3TestCaseOperation1 operation. The "output" return
  353. // value can be used to capture response data after the request's "Send" method
  354. // is called.
  355. //
  356. // See OutputService3TestCaseOperation1 for usage and error information.
  357. //
  358. // Creating a request object using this method should be used when you want to inject
  359. // custom logic into the request's lifecycle using a custom handler, or if you want to
  360. // access properties on the request object before or after sending the request. If
  361. // you just want the service response, call the OutputService3TestCaseOperation1 method directly
  362. // instead.
  363. //
  364. // Note: You must call the "Send" method on the returned request object in order
  365. // to execute the request.
  366. //
  367. // // Example sending a request using the OutputService3TestCaseOperation1Request method.
  368. // req, resp := client.OutputService3TestCaseOperation1Request(params)
  369. //
  370. // err := req.Send()
  371. // if err == nil { // resp is now filled
  372. // fmt.Println(resp)
  373. // }
  374. func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *request.Request, output *OutputService3TestShapeOutputService3TestCaseOperation1Output) {
  375. op := &request.Operation{
  376. Name: opOutputService3TestCaseOperation1,
  377. HTTPPath: "/",
  378. }
  379. if input == nil {
  380. input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{}
  381. }
  382. output = &OutputService3TestShapeOutputService3TestCaseOperation1Output{}
  383. req = c.newRequest(op, input, output)
  384. return
  385. }
  386. // OutputService3TestCaseOperation1 API operation for .
  387. //
  388. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  389. // with awserr.Error's Code and Message methods to get detailed information about
  390. // the error.
  391. //
  392. // See the AWS API reference guide for 's
  393. // API operation OutputService3TestCaseOperation1 for usage and error information.
  394. func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) {
  395. req, out := c.OutputService3TestCaseOperation1Request(input)
  396. err := req.Send()
  397. return out, err
  398. }
  399. type OutputService3TestShapeOutputService3TestCaseOperation1Input struct {
  400. _ struct{} `type:"structure"`
  401. }
  402. type OutputService3TestShapeOutputService3TestCaseOperation1Output struct {
  403. _ struct{} `type:"structure"`
  404. ListMember []*string `type:"list"`
  405. }
  406. // SetListMember sets the ListMember field's value.
  407. func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetListMember(v []*string) *OutputService3TestShapeOutputService3TestCaseOperation1Output {
  408. s.ListMember = v
  409. return s
  410. }
  411. // The service client's operations are safe to be used concurrently.
  412. // It is not safe to mutate any of the client's properties though.
  413. type OutputService4ProtocolTest struct {
  414. *client.Client
  415. }
  416. // New creates a new instance of the OutputService4ProtocolTest client with a session.
  417. // If additional configuration is needed for the client instance use the optional
  418. // aws.Config parameter to add your extra config.
  419. //
  420. // Example:
  421. // // Create a OutputService4ProtocolTest client from just a session.
  422. // svc := outputservice4protocoltest.New(mySession)
  423. //
  424. // // Create a OutputService4ProtocolTest client with additional configuration
  425. // svc := outputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  426. func NewOutputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService4ProtocolTest {
  427. c := p.ClientConfig("outputservice4protocoltest", cfgs...)
  428. return newOutputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  429. }
  430. // newClient creates, initializes and returns a new service client instance.
  431. func newOutputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService4ProtocolTest {
  432. svc := &OutputService4ProtocolTest{
  433. Client: client.New(
  434. cfg,
  435. metadata.ClientInfo{
  436. ServiceName: "outputservice4protocoltest",
  437. SigningName: signingName,
  438. SigningRegion: signingRegion,
  439. Endpoint: endpoint,
  440. APIVersion: "",
  441. },
  442. handlers,
  443. ),
  444. }
  445. // Handlers
  446. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  447. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  448. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  449. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  450. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  451. return svc
  452. }
  453. // newRequest creates a new request for a OutputService4ProtocolTest operation and runs any
  454. // custom request initialization.
  455. func (c *OutputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  456. req := c.NewRequest(op, params, data)
  457. return req
  458. }
  459. const opOutputService4TestCaseOperation1 = "OperationName"
  460. // OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
  461. // client's request for the OutputService4TestCaseOperation1 operation. The "output" return
  462. // value can be used to capture response data after the request's "Send" method
  463. // is called.
  464. //
  465. // See OutputService4TestCaseOperation1 for usage and error information.
  466. //
  467. // Creating a request object using this method should be used when you want to inject
  468. // custom logic into the request's lifecycle using a custom handler, or if you want to
  469. // access properties on the request object before or after sending the request. If
  470. // you just want the service response, call the OutputService4TestCaseOperation1 method directly
  471. // instead.
  472. //
  473. // Note: You must call the "Send" method on the returned request object in order
  474. // to execute the request.
  475. //
  476. // // Example sending a request using the OutputService4TestCaseOperation1Request method.
  477. // req, resp := client.OutputService4TestCaseOperation1Request(params)
  478. //
  479. // err := req.Send()
  480. // if err == nil { // resp is now filled
  481. // fmt.Println(resp)
  482. // }
  483. func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation1Output) {
  484. op := &request.Operation{
  485. Name: opOutputService4TestCaseOperation1,
  486. HTTPPath: "/",
  487. }
  488. if input == nil {
  489. input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{}
  490. }
  491. output = &OutputService4TestShapeOutputService4TestCaseOperation1Output{}
  492. req = c.newRequest(op, input, output)
  493. return
  494. }
  495. // OutputService4TestCaseOperation1 API operation for .
  496. //
  497. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  498. // with awserr.Error's Code and Message methods to get detailed information about
  499. // the error.
  500. //
  501. // See the AWS API reference guide for 's
  502. // API operation OutputService4TestCaseOperation1 for usage and error information.
  503. func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) {
  504. req, out := c.OutputService4TestCaseOperation1Request(input)
  505. err := req.Send()
  506. return out, err
  507. }
  508. type OutputService4TestShapeOutputService4TestCaseOperation1Input struct {
  509. _ struct{} `type:"structure"`
  510. }
  511. type OutputService4TestShapeOutputService4TestCaseOperation1Output struct {
  512. _ struct{} `type:"structure"`
  513. ListMember []*string `locationNameList:"item" type:"list"`
  514. }
  515. // SetListMember sets the ListMember field's value.
  516. func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) SetListMember(v []*string) *OutputService4TestShapeOutputService4TestCaseOperation1Output {
  517. s.ListMember = v
  518. return s
  519. }
  520. // The service client's operations are safe to be used concurrently.
  521. // It is not safe to mutate any of the client's properties though.
  522. type OutputService5ProtocolTest struct {
  523. *client.Client
  524. }
  525. // New creates a new instance of the OutputService5ProtocolTest client with a session.
  526. // If additional configuration is needed for the client instance use the optional
  527. // aws.Config parameter to add your extra config.
  528. //
  529. // Example:
  530. // // Create a OutputService5ProtocolTest client from just a session.
  531. // svc := outputservice5protocoltest.New(mySession)
  532. //
  533. // // Create a OutputService5ProtocolTest client with additional configuration
  534. // svc := outputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  535. func NewOutputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService5ProtocolTest {
  536. c := p.ClientConfig("outputservice5protocoltest", cfgs...)
  537. return newOutputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  538. }
  539. // newClient creates, initializes and returns a new service client instance.
  540. func newOutputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService5ProtocolTest {
  541. svc := &OutputService5ProtocolTest{
  542. Client: client.New(
  543. cfg,
  544. metadata.ClientInfo{
  545. ServiceName: "outputservice5protocoltest",
  546. SigningName: signingName,
  547. SigningRegion: signingRegion,
  548. Endpoint: endpoint,
  549. APIVersion: "",
  550. },
  551. handlers,
  552. ),
  553. }
  554. // Handlers
  555. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  556. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  557. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  558. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  559. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  560. return svc
  561. }
  562. // newRequest creates a new request for a OutputService5ProtocolTest operation and runs any
  563. // custom request initialization.
  564. func (c *OutputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  565. req := c.NewRequest(op, params, data)
  566. return req
  567. }
  568. const opOutputService5TestCaseOperation1 = "OperationName"
  569. // OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
  570. // client's request for the OutputService5TestCaseOperation1 operation. The "output" return
  571. // value can be used to capture response data after the request's "Send" method
  572. // is called.
  573. //
  574. // See OutputService5TestCaseOperation1 for usage and error information.
  575. //
  576. // Creating a request object using this method should be used when you want to inject
  577. // custom logic into the request's lifecycle using a custom handler, or if you want to
  578. // access properties on the request object before or after sending the request. If
  579. // you just want the service response, call the OutputService5TestCaseOperation1 method directly
  580. // instead.
  581. //
  582. // Note: You must call the "Send" method on the returned request object in order
  583. // to execute the request.
  584. //
  585. // // Example sending a request using the OutputService5TestCaseOperation1Request method.
  586. // req, resp := client.OutputService5TestCaseOperation1Request(params)
  587. //
  588. // err := req.Send()
  589. // if err == nil { // resp is now filled
  590. // fmt.Println(resp)
  591. // }
  592. func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *request.Request, output *OutputService5TestShapeOutputService5TestCaseOperation1Output) {
  593. op := &request.Operation{
  594. Name: opOutputService5TestCaseOperation1,
  595. HTTPPath: "/",
  596. }
  597. if input == nil {
  598. input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{}
  599. }
  600. output = &OutputService5TestShapeOutputService5TestCaseOperation1Output{}
  601. req = c.newRequest(op, input, output)
  602. return
  603. }
  604. // OutputService5TestCaseOperation1 API operation for .
  605. //
  606. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  607. // with awserr.Error's Code and Message methods to get detailed information about
  608. // the error.
  609. //
  610. // See the AWS API reference guide for 's
  611. // API operation OutputService5TestCaseOperation1 for usage and error information.
  612. func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) {
  613. req, out := c.OutputService5TestCaseOperation1Request(input)
  614. err := req.Send()
  615. return out, err
  616. }
  617. type OutputService5TestShapeOutputService5TestCaseOperation1Input struct {
  618. _ struct{} `type:"structure"`
  619. }
  620. type OutputService5TestShapeOutputService5TestCaseOperation1Output struct {
  621. _ struct{} `type:"structure"`
  622. ListMember []*string `type:"list" flattened:"true"`
  623. }
  624. // SetListMember sets the ListMember field's value.
  625. func (s *OutputService5TestShapeOutputService5TestCaseOperation1Output) SetListMember(v []*string) *OutputService5TestShapeOutputService5TestCaseOperation1Output {
  626. s.ListMember = v
  627. return s
  628. }
  629. // The service client's operations are safe to be used concurrently.
  630. // It is not safe to mutate any of the client's properties though.
  631. type OutputService6ProtocolTest struct {
  632. *client.Client
  633. }
  634. // New creates a new instance of the OutputService6ProtocolTest client with a session.
  635. // If additional configuration is needed for the client instance use the optional
  636. // aws.Config parameter to add your extra config.
  637. //
  638. // Example:
  639. // // Create a OutputService6ProtocolTest client from just a session.
  640. // svc := outputservice6protocoltest.New(mySession)
  641. //
  642. // // Create a OutputService6ProtocolTest client with additional configuration
  643. // svc := outputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  644. func NewOutputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService6ProtocolTest {
  645. c := p.ClientConfig("outputservice6protocoltest", cfgs...)
  646. return newOutputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  647. }
  648. // newClient creates, initializes and returns a new service client instance.
  649. func newOutputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService6ProtocolTest {
  650. svc := &OutputService6ProtocolTest{
  651. Client: client.New(
  652. cfg,
  653. metadata.ClientInfo{
  654. ServiceName: "outputservice6protocoltest",
  655. SigningName: signingName,
  656. SigningRegion: signingRegion,
  657. Endpoint: endpoint,
  658. APIVersion: "",
  659. },
  660. handlers,
  661. ),
  662. }
  663. // Handlers
  664. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  665. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  666. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  667. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  668. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  669. return svc
  670. }
  671. // newRequest creates a new request for a OutputService6ProtocolTest operation and runs any
  672. // custom request initialization.
  673. func (c *OutputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  674. req := c.NewRequest(op, params, data)
  675. return req
  676. }
  677. const opOutputService6TestCaseOperation1 = "OperationName"
  678. // OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
  679. // client's request for the OutputService6TestCaseOperation1 operation. The "output" return
  680. // value can be used to capture response data after the request's "Send" method
  681. // is called.
  682. //
  683. // See OutputService6TestCaseOperation1 for usage and error information.
  684. //
  685. // Creating a request object using this method should be used when you want to inject
  686. // custom logic into the request's lifecycle using a custom handler, or if you want to
  687. // access properties on the request object before or after sending the request. If
  688. // you just want the service response, call the OutputService6TestCaseOperation1 method directly
  689. // instead.
  690. //
  691. // Note: You must call the "Send" method on the returned request object in order
  692. // to execute the request.
  693. //
  694. // // Example sending a request using the OutputService6TestCaseOperation1Request method.
  695. // req, resp := client.OutputService6TestCaseOperation1Request(params)
  696. //
  697. // err := req.Send()
  698. // if err == nil { // resp is now filled
  699. // fmt.Println(resp)
  700. // }
  701. func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *request.Request, output *OutputService6TestShapeOutputService6TestCaseOperation1Output) {
  702. op := &request.Operation{
  703. Name: opOutputService6TestCaseOperation1,
  704. HTTPPath: "/",
  705. }
  706. if input == nil {
  707. input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{}
  708. }
  709. output = &OutputService6TestShapeOutputService6TestCaseOperation1Output{}
  710. req = c.newRequest(op, input, output)
  711. return
  712. }
  713. // OutputService6TestCaseOperation1 API operation for .
  714. //
  715. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  716. // with awserr.Error's Code and Message methods to get detailed information about
  717. // the error.
  718. //
  719. // See the AWS API reference guide for 's
  720. // API operation OutputService6TestCaseOperation1 for usage and error information.
  721. func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) {
  722. req, out := c.OutputService6TestCaseOperation1Request(input)
  723. err := req.Send()
  724. return out, err
  725. }
  726. type OutputService6TestShapeOutputService6TestCaseOperation1Input struct {
  727. _ struct{} `type:"structure"`
  728. }
  729. type OutputService6TestShapeOutputService6TestCaseOperation1Output struct {
  730. _ struct{} `type:"structure"`
  731. Map map[string]*OutputService6TestShapeStructureType `type:"map"`
  732. }
  733. // SetMap sets the Map field's value.
  734. func (s *OutputService6TestShapeOutputService6TestCaseOperation1Output) SetMap(v map[string]*OutputService6TestShapeStructureType) *OutputService6TestShapeOutputService6TestCaseOperation1Output {
  735. s.Map = v
  736. return s
  737. }
  738. type OutputService6TestShapeStructureType struct {
  739. _ struct{} `type:"structure"`
  740. Foo *string `locationName:"foo" type:"string"`
  741. }
  742. // SetFoo sets the Foo field's value.
  743. func (s *OutputService6TestShapeStructureType) SetFoo(v string) *OutputService6TestShapeStructureType {
  744. s.Foo = &v
  745. return s
  746. }
  747. // The service client's operations are safe to be used concurrently.
  748. // It is not safe to mutate any of the client's properties though.
  749. type OutputService7ProtocolTest struct {
  750. *client.Client
  751. }
  752. // New creates a new instance of the OutputService7ProtocolTest client with a session.
  753. // If additional configuration is needed for the client instance use the optional
  754. // aws.Config parameter to add your extra config.
  755. //
  756. // Example:
  757. // // Create a OutputService7ProtocolTest client from just a session.
  758. // svc := outputservice7protocoltest.New(mySession)
  759. //
  760. // // Create a OutputService7ProtocolTest client with additional configuration
  761. // svc := outputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  762. func NewOutputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService7ProtocolTest {
  763. c := p.ClientConfig("outputservice7protocoltest", cfgs...)
  764. return newOutputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  765. }
  766. // newClient creates, initializes and returns a new service client instance.
  767. func newOutputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService7ProtocolTest {
  768. svc := &OutputService7ProtocolTest{
  769. Client: client.New(
  770. cfg,
  771. metadata.ClientInfo{
  772. ServiceName: "outputservice7protocoltest",
  773. SigningName: signingName,
  774. SigningRegion: signingRegion,
  775. Endpoint: endpoint,
  776. APIVersion: "",
  777. },
  778. handlers,
  779. ),
  780. }
  781. // Handlers
  782. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  783. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  784. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  785. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  786. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  787. return svc
  788. }
  789. // newRequest creates a new request for a OutputService7ProtocolTest operation and runs any
  790. // custom request initialization.
  791. func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  792. req := c.NewRequest(op, params, data)
  793. return req
  794. }
  795. const opOutputService7TestCaseOperation1 = "OperationName"
  796. // OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
  797. // client's request for the OutputService7TestCaseOperation1 operation. The "output" return
  798. // value can be used to capture response data after the request's "Send" method
  799. // is called.
  800. //
  801. // See OutputService7TestCaseOperation1 for usage and error information.
  802. //
  803. // Creating a request object using this method should be used when you want to inject
  804. // custom logic into the request's lifecycle using a custom handler, or if you want to
  805. // access properties on the request object before or after sending the request. If
  806. // you just want the service response, call the OutputService7TestCaseOperation1 method directly
  807. // instead.
  808. //
  809. // Note: You must call the "Send" method on the returned request object in order
  810. // to execute the request.
  811. //
  812. // // Example sending a request using the OutputService7TestCaseOperation1Request method.
  813. // req, resp := client.OutputService7TestCaseOperation1Request(params)
  814. //
  815. // err := req.Send()
  816. // if err == nil { // resp is now filled
  817. // fmt.Println(resp)
  818. // }
  819. func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) {
  820. op := &request.Operation{
  821. Name: opOutputService7TestCaseOperation1,
  822. HTTPPath: "/",
  823. }
  824. if input == nil {
  825. input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{}
  826. }
  827. output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{}
  828. req = c.newRequest(op, input, output)
  829. return
  830. }
  831. // OutputService7TestCaseOperation1 API operation for .
  832. //
  833. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  834. // with awserr.Error's Code and Message methods to get detailed information about
  835. // the error.
  836. //
  837. // See the AWS API reference guide for 's
  838. // API operation OutputService7TestCaseOperation1 for usage and error information.
  839. func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) {
  840. req, out := c.OutputService7TestCaseOperation1Request(input)
  841. err := req.Send()
  842. return out, err
  843. }
  844. type OutputService7TestShapeOutputService7TestCaseOperation1Input struct {
  845. _ struct{} `type:"structure"`
  846. }
  847. type OutputService7TestShapeOutputService7TestCaseOperation1Output struct {
  848. _ struct{} `type:"structure"`
  849. Map map[string]*string `type:"map" flattened:"true"`
  850. }
  851. // SetMap sets the Map field's value.
  852. func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) SetMap(v map[string]*string) *OutputService7TestShapeOutputService7TestCaseOperation1Output {
  853. s.Map = v
  854. return s
  855. }
  856. // The service client's operations are safe to be used concurrently.
  857. // It is not safe to mutate any of the client's properties though.
  858. type OutputService8ProtocolTest struct {
  859. *client.Client
  860. }
  861. // New creates a new instance of the OutputService8ProtocolTest client with a session.
  862. // If additional configuration is needed for the client instance use the optional
  863. // aws.Config parameter to add your extra config.
  864. //
  865. // Example:
  866. // // Create a OutputService8ProtocolTest client from just a session.
  867. // svc := outputservice8protocoltest.New(mySession)
  868. //
  869. // // Create a OutputService8ProtocolTest client with additional configuration
  870. // svc := outputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  871. func NewOutputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService8ProtocolTest {
  872. c := p.ClientConfig("outputservice8protocoltest", cfgs...)
  873. return newOutputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  874. }
  875. // newClient creates, initializes and returns a new service client instance.
  876. func newOutputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService8ProtocolTest {
  877. svc := &OutputService8ProtocolTest{
  878. Client: client.New(
  879. cfg,
  880. metadata.ClientInfo{
  881. ServiceName: "outputservice8protocoltest",
  882. SigningName: signingName,
  883. SigningRegion: signingRegion,
  884. Endpoint: endpoint,
  885. APIVersion: "",
  886. },
  887. handlers,
  888. ),
  889. }
  890. // Handlers
  891. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  892. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  893. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  894. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  895. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  896. return svc
  897. }
  898. // newRequest creates a new request for a OutputService8ProtocolTest operation and runs any
  899. // custom request initialization.
  900. func (c *OutputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  901. req := c.NewRequest(op, params, data)
  902. return req
  903. }
  904. const opOutputService8TestCaseOperation1 = "OperationName"
  905. // OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the
  906. // client's request for the OutputService8TestCaseOperation1 operation. The "output" return
  907. // value can be used to capture response data after the request's "Send" method
  908. // is called.
  909. //
  910. // See OutputService8TestCaseOperation1 for usage and error information.
  911. //
  912. // Creating a request object using this method should be used when you want to inject
  913. // custom logic into the request's lifecycle using a custom handler, or if you want to
  914. // access properties on the request object before or after sending the request. If
  915. // you just want the service response, call the OutputService8TestCaseOperation1 method directly
  916. // instead.
  917. //
  918. // Note: You must call the "Send" method on the returned request object in order
  919. // to execute the request.
  920. //
  921. // // Example sending a request using the OutputService8TestCaseOperation1Request method.
  922. // req, resp := client.OutputService8TestCaseOperation1Request(params)
  923. //
  924. // err := req.Send()
  925. // if err == nil { // resp is now filled
  926. // fmt.Println(resp)
  927. // }
  928. func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation1Output) {
  929. op := &request.Operation{
  930. Name: opOutputService8TestCaseOperation1,
  931. HTTPPath: "/",
  932. }
  933. if input == nil {
  934. input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{}
  935. }
  936. output = &OutputService8TestShapeOutputService8TestCaseOperation1Output{}
  937. req = c.newRequest(op, input, output)
  938. return
  939. }
  940. // OutputService8TestCaseOperation1 API operation for .
  941. //
  942. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  943. // with awserr.Error's Code and Message methods to get detailed information about
  944. // the error.
  945. //
  946. // See the AWS API reference guide for 's
  947. // API operation OutputService8TestCaseOperation1 for usage and error information.
  948. func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) {
  949. req, out := c.OutputService8TestCaseOperation1Request(input)
  950. err := req.Send()
  951. return out, err
  952. }
  953. type OutputService8TestShapeOutputService8TestCaseOperation1Input struct {
  954. _ struct{} `type:"structure"`
  955. }
  956. type OutputService8TestShapeOutputService8TestCaseOperation1Output struct {
  957. _ struct{} `type:"structure"`
  958. Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map" flattened:"true"`
  959. }
  960. // SetMap sets the Map field's value.
  961. func (s *OutputService8TestShapeOutputService8TestCaseOperation1Output) SetMap(v map[string]*string) *OutputService8TestShapeOutputService8TestCaseOperation1Output {
  962. s.Map = v
  963. return s
  964. }
  965. // The service client's operations are safe to be used concurrently.
  966. // It is not safe to mutate any of the client's properties though.
  967. type OutputService9ProtocolTest struct {
  968. *client.Client
  969. }
  970. // New creates a new instance of the OutputService9ProtocolTest client with a session.
  971. // If additional configuration is needed for the client instance use the optional
  972. // aws.Config parameter to add your extra config.
  973. //
  974. // Example:
  975. // // Create a OutputService9ProtocolTest client from just a session.
  976. // svc := outputservice9protocoltest.New(mySession)
  977. //
  978. // // Create a OutputService9ProtocolTest client with additional configuration
  979. // svc := outputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  980. func NewOutputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService9ProtocolTest {
  981. c := p.ClientConfig("outputservice9protocoltest", cfgs...)
  982. return newOutputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  983. }
  984. // newClient creates, initializes and returns a new service client instance.
  985. func newOutputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService9ProtocolTest {
  986. svc := &OutputService9ProtocolTest{
  987. Client: client.New(
  988. cfg,
  989. metadata.ClientInfo{
  990. ServiceName: "outputservice9protocoltest",
  991. SigningName: signingName,
  992. SigningRegion: signingRegion,
  993. Endpoint: endpoint,
  994. APIVersion: "",
  995. },
  996. handlers,
  997. ),
  998. }
  999. // Handlers
  1000. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1001. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  1002. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  1003. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  1004. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  1005. return svc
  1006. }
  1007. // newRequest creates a new request for a OutputService9ProtocolTest operation and runs any
  1008. // custom request initialization.
  1009. func (c *OutputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1010. req := c.NewRequest(op, params, data)
  1011. return req
  1012. }
  1013. const opOutputService9TestCaseOperation1 = "OperationName"
  1014. // OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the
  1015. // client's request for the OutputService9TestCaseOperation1 operation. The "output" return
  1016. // value can be used to capture response data after the request's "Send" method
  1017. // is called.
  1018. //
  1019. // See OutputService9TestCaseOperation1 for usage and error information.
  1020. //
  1021. // Creating a request object using this method should be used when you want to inject
  1022. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1023. // access properties on the request object before or after sending the request. If
  1024. // you just want the service response, call the OutputService9TestCaseOperation1 method directly
  1025. // instead.
  1026. //
  1027. // Note: You must call the "Send" method on the returned request object in order
  1028. // to execute the request.
  1029. //
  1030. // // Example sending a request using the OutputService9TestCaseOperation1Request method.
  1031. // req, resp := client.OutputService9TestCaseOperation1Request(params)
  1032. //
  1033. // err := req.Send()
  1034. // if err == nil { // resp is now filled
  1035. // fmt.Println(resp)
  1036. // }
  1037. func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1Request(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (req *request.Request, output *OutputService9TestShapeOutputService9TestCaseOperation1Output) {
  1038. op := &request.Operation{
  1039. Name: opOutputService9TestCaseOperation1,
  1040. HTTPPath: "/",
  1041. }
  1042. if input == nil {
  1043. input = &OutputService9TestShapeOutputService9TestCaseOperation1Input{}
  1044. }
  1045. output = &OutputService9TestShapeOutputService9TestCaseOperation1Output{}
  1046. req = c.newRequest(op, input, output)
  1047. return
  1048. }
  1049. // OutputService9TestCaseOperation1 API operation for .
  1050. //
  1051. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1052. // with awserr.Error's Code and Message methods to get detailed information about
  1053. // the error.
  1054. //
  1055. // See the AWS API reference guide for 's
  1056. // API operation OutputService9TestCaseOperation1 for usage and error information.
  1057. func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) {
  1058. req, out := c.OutputService9TestCaseOperation1Request(input)
  1059. err := req.Send()
  1060. return out, err
  1061. }
  1062. type OutputService9TestShapeOutputService9TestCaseOperation1Input struct {
  1063. _ struct{} `type:"structure"`
  1064. }
  1065. type OutputService9TestShapeOutputService9TestCaseOperation1Output struct {
  1066. _ struct{} `type:"structure"`
  1067. Foo *string `type:"string"`
  1068. }
  1069. // SetFoo sets the Foo field's value.
  1070. func (s *OutputService9TestShapeOutputService9TestCaseOperation1Output) SetFoo(v string) *OutputService9TestShapeOutputService9TestCaseOperation1Output {
  1071. s.Foo = &v
  1072. return s
  1073. }
  1074. //
  1075. // Tests begin here
  1076. //
  1077. func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
  1078. svc := NewOutputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1079. buf := bytes.NewReader([]byte("<OperationNameResponse><Str>myname</Str><FooNum>123</FooNum><FalseBool>false</FalseBool><TrueBool>true</TrueBool><Float>1.2</Float><Double>1.3</Double><Long>200</Long><Char>a</Char><RequestId>request-id</RequestId></OperationNameResponse>"))
  1080. req, out := svc.OutputService1TestCaseOperation1Request(nil)
  1081. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1082. // set headers
  1083. // unmarshal response
  1084. ec2query.UnmarshalMeta(req)
  1085. ec2query.Unmarshal(req)
  1086. assert.NoError(t, req.Error)
  1087. // assert response
  1088. assert.NotNil(t, out) // ensure out variable is used
  1089. assert.Equal(t, "a", *out.Char)
  1090. assert.Equal(t, 1.3, *out.Double)
  1091. assert.Equal(t, false, *out.FalseBool)
  1092. assert.Equal(t, 1.2, *out.Float)
  1093. assert.Equal(t, int64(200), *out.Long)
  1094. assert.Equal(t, int64(123), *out.Num)
  1095. assert.Equal(t, "myname", *out.Str)
  1096. assert.Equal(t, true, *out.TrueBool)
  1097. }
  1098. func TestOutputService2ProtocolTestBlobCase1(t *testing.T) {
  1099. svc := NewOutputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1100. buf := bytes.NewReader([]byte("<OperationNameResponse><Blob>dmFsdWU=</Blob><RequestId>requestid</RequestId></OperationNameResponse>"))
  1101. req, out := svc.OutputService2TestCaseOperation1Request(nil)
  1102. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1103. // set headers
  1104. // unmarshal response
  1105. ec2query.UnmarshalMeta(req)
  1106. ec2query.Unmarshal(req)
  1107. assert.NoError(t, req.Error)
  1108. // assert response
  1109. assert.NotNil(t, out) // ensure out variable is used
  1110. assert.Equal(t, "value", string(out.Blob))
  1111. }
  1112. func TestOutputService3ProtocolTestListsCase1(t *testing.T) {
  1113. svc := NewOutputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1114. buf := bytes.NewReader([]byte("<OperationNameResponse><ListMember><member>abc</member><member>123</member></ListMember><RequestId>requestid</RequestId></OperationNameResponse>"))
  1115. req, out := svc.OutputService3TestCaseOperation1Request(nil)
  1116. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1117. // set headers
  1118. // unmarshal response
  1119. ec2query.UnmarshalMeta(req)
  1120. ec2query.Unmarshal(req)
  1121. assert.NoError(t, req.Error)
  1122. // assert response
  1123. assert.NotNil(t, out) // ensure out variable is used
  1124. assert.Equal(t, "abc", *out.ListMember[0])
  1125. assert.Equal(t, "123", *out.ListMember[1])
  1126. }
  1127. func TestOutputService4ProtocolTestListWithCustomMemberNameCase1(t *testing.T) {
  1128. svc := NewOutputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1129. buf := bytes.NewReader([]byte("<OperationNameResponse><ListMember><item>abc</item><item>123</item></ListMember><RequestId>requestid</RequestId></OperationNameResponse>"))
  1130. req, out := svc.OutputService4TestCaseOperation1Request(nil)
  1131. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1132. // set headers
  1133. // unmarshal response
  1134. ec2query.UnmarshalMeta(req)
  1135. ec2query.Unmarshal(req)
  1136. assert.NoError(t, req.Error)
  1137. // assert response
  1138. assert.NotNil(t, out) // ensure out variable is used
  1139. assert.Equal(t, "abc", *out.ListMember[0])
  1140. assert.Equal(t, "123", *out.ListMember[1])
  1141. }
  1142. func TestOutputService5ProtocolTestFlattenedListCase1(t *testing.T) {
  1143. svc := NewOutputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1144. buf := bytes.NewReader([]byte("<OperationNameResponse><ListMember>abc</ListMember><ListMember>123</ListMember><RequestId>requestid</RequestId></OperationNameResponse>"))
  1145. req, out := svc.OutputService5TestCaseOperation1Request(nil)
  1146. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1147. // set headers
  1148. // unmarshal response
  1149. ec2query.UnmarshalMeta(req)
  1150. ec2query.Unmarshal(req)
  1151. assert.NoError(t, req.Error)
  1152. // assert response
  1153. assert.NotNil(t, out) // ensure out variable is used
  1154. assert.Equal(t, "abc", *out.ListMember[0])
  1155. assert.Equal(t, "123", *out.ListMember[1])
  1156. }
  1157. func TestOutputService6ProtocolTestNormalMapCase1(t *testing.T) {
  1158. svc := NewOutputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1159. buf := bytes.NewReader([]byte("<OperationNameResponse><Map><entry><key>qux</key><value><foo>bar</foo></value></entry><entry><key>baz</key><value><foo>bam</foo></value></entry></Map><RequestId>requestid</RequestId></OperationNameResponse>"))
  1160. req, out := svc.OutputService6TestCaseOperation1Request(nil)
  1161. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1162. // set headers
  1163. // unmarshal response
  1164. ec2query.UnmarshalMeta(req)
  1165. ec2query.Unmarshal(req)
  1166. assert.NoError(t, req.Error)
  1167. // assert response
  1168. assert.NotNil(t, out) // ensure out variable is used
  1169. assert.Equal(t, "bam", *out.Map["baz"].Foo)
  1170. assert.Equal(t, "bar", *out.Map["qux"].Foo)
  1171. }
  1172. func TestOutputService7ProtocolTestFlattenedMapCase1(t *testing.T) {
  1173. svc := NewOutputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1174. buf := bytes.NewReader([]byte("<OperationNameResponse><Map><key>qux</key><value>bar</value></Map><Map><key>baz</key><value>bam</value></Map><RequestId>requestid</RequestId></OperationNameResponse>"))
  1175. req, out := svc.OutputService7TestCaseOperation1Request(nil)
  1176. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1177. // set headers
  1178. // unmarshal response
  1179. ec2query.UnmarshalMeta(req)
  1180. ec2query.Unmarshal(req)
  1181. assert.NoError(t, req.Error)
  1182. // assert response
  1183. assert.NotNil(t, out) // ensure out variable is used
  1184. assert.Equal(t, "bam", *out.Map["baz"])
  1185. assert.Equal(t, "bar", *out.Map["qux"])
  1186. }
  1187. func TestOutputService8ProtocolTestNamedMapCase1(t *testing.T) {
  1188. svc := NewOutputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1189. buf := bytes.NewReader([]byte("<OperationNameResponse><Map><foo>qux</foo><bar>bar</bar></Map><Map><foo>baz</foo><bar>bam</bar></Map><RequestId>requestid</RequestId></OperationNameResponse>"))
  1190. req, out := svc.OutputService8TestCaseOperation1Request(nil)
  1191. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1192. // set headers
  1193. // unmarshal response
  1194. ec2query.UnmarshalMeta(req)
  1195. ec2query.Unmarshal(req)
  1196. assert.NoError(t, req.Error)
  1197. // assert response
  1198. assert.NotNil(t, out) // ensure out variable is used
  1199. assert.Equal(t, "bam", *out.Map["baz"])
  1200. assert.Equal(t, "bar", *out.Map["qux"])
  1201. }
  1202. func TestOutputService9ProtocolTestEmptyStringCase1(t *testing.T) {
  1203. svc := NewOutputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1204. buf := bytes.NewReader([]byte("<OperationNameResponse><Foo/><RequestId>requestid</RequestId></OperationNameResponse>"))
  1205. req, out := svc.OutputService9TestCaseOperation1Request(nil)
  1206. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1207. // set headers
  1208. // unmarshal response
  1209. ec2query.UnmarshalMeta(req)
  1210. ec2query.Unmarshal(req)
  1211. assert.NoError(t, req.Error)
  1212. // assert response
  1213. assert.NotNil(t, out) // ensure out variable is used
  1214. assert.Equal(t, "", *out.Foo)
  1215. }