build_test.go 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378
  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 InputService1ProtocolTest struct {
  44. *client.Client
  45. }
  46. // New creates a new instance of the InputService1ProtocolTest 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 InputService1ProtocolTest client from just a session.
  52. // svc := inputservice1protocoltest.New(mySession)
  53. //
  54. // // Create a InputService1ProtocolTest client with additional configuration
  55. // svc := inputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  56. func NewInputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService1ProtocolTest {
  57. c := p.ClientConfig("inputservice1protocoltest", cfgs...)
  58. return newInputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  59. }
  60. // newClient creates, initializes and returns a new service client instance.
  61. func newInputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService1ProtocolTest {
  62. svc := &InputService1ProtocolTest{
  63. Client: client.New(
  64. cfg,
  65. metadata.ClientInfo{
  66. ServiceName: "inputservice1protocoltest",
  67. SigningRegion: signingRegion,
  68. Endpoint: endpoint,
  69. APIVersion: "2014-01-01",
  70. },
  71. handlers,
  72. ),
  73. }
  74. // Handlers
  75. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  76. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  77. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  78. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  79. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  80. return svc
  81. }
  82. // newRequest creates a new request for a InputService1ProtocolTest operation and runs any
  83. // custom request initialization.
  84. func (c *InputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  85. req := c.NewRequest(op, params, data)
  86. return req
  87. }
  88. const opInputService1TestCaseOperation1 = "OperationName"
  89. // InputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
  90. // client's request for the InputService1TestCaseOperation1 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 InputService1TestCaseOperation1 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 InputService1TestCaseOperation1Request method.
  104. // req, resp := client.InputService1TestCaseOperation1Request(params)
  105. //
  106. // err := req.Send()
  107. // if err == nil { // resp is now filled
  108. // fmt.Println(resp)
  109. // }
  110. //
  111. func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputService1TestCaseOperation1Input) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) {
  112. op := &request.Operation{
  113. Name: opInputService1TestCaseOperation1,
  114. HTTPPath: "/",
  115. }
  116. if input == nil {
  117. input = &InputService1TestShapeInputService1TestCaseOperation1Input{}
  118. }
  119. req = c.newRequest(op, input, output)
  120. req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler)
  121. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  122. output = &InputService1TestShapeInputService1TestCaseOperation1Output{}
  123. req.Data = output
  124. return
  125. }
  126. func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputService1TestCaseOperation1Input) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) {
  127. req, out := c.InputService1TestCaseOperation1Request(input)
  128. err := req.Send()
  129. return out, err
  130. }
  131. type InputService1TestShapeInputService1TestCaseOperation1Input struct {
  132. _ struct{} `type:"structure"`
  133. Bar *string `type:"string"`
  134. Foo *string `type:"string"`
  135. }
  136. type InputService1TestShapeInputService1TestCaseOperation1Output struct {
  137. _ struct{} `type:"structure"`
  138. }
  139. //The service client's operations are safe to be used concurrently.
  140. // It is not safe to mutate any of the client's properties though.
  141. type InputService2ProtocolTest struct {
  142. *client.Client
  143. }
  144. // New creates a new instance of the InputService2ProtocolTest client with a session.
  145. // If additional configuration is needed for the client instance use the optional
  146. // aws.Config parameter to add your extra config.
  147. //
  148. // Example:
  149. // // Create a InputService2ProtocolTest client from just a session.
  150. // svc := inputservice2protocoltest.New(mySession)
  151. //
  152. // // Create a InputService2ProtocolTest client with additional configuration
  153. // svc := inputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  154. func NewInputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService2ProtocolTest {
  155. c := p.ClientConfig("inputservice2protocoltest", cfgs...)
  156. return newInputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  157. }
  158. // newClient creates, initializes and returns a new service client instance.
  159. func newInputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService2ProtocolTest {
  160. svc := &InputService2ProtocolTest{
  161. Client: client.New(
  162. cfg,
  163. metadata.ClientInfo{
  164. ServiceName: "inputservice2protocoltest",
  165. SigningRegion: signingRegion,
  166. Endpoint: endpoint,
  167. APIVersion: "2014-01-01",
  168. },
  169. handlers,
  170. ),
  171. }
  172. // Handlers
  173. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  174. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  175. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  176. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  177. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  178. return svc
  179. }
  180. // newRequest creates a new request for a InputService2ProtocolTest operation and runs any
  181. // custom request initialization.
  182. func (c *InputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  183. req := c.NewRequest(op, params, data)
  184. return req
  185. }
  186. const opInputService2TestCaseOperation1 = "OperationName"
  187. // InputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
  188. // client's request for the InputService2TestCaseOperation1 operation. The "output" return
  189. // value can be used to capture response data after the request's "Send" method
  190. // is called.
  191. //
  192. // Creating a request object using this method should be used when you want to inject
  193. // custom logic into the request's lifecycle using a custom handler, or if you want to
  194. // access properties on the request object before or after sending the request. If
  195. // you just want the service response, call the InputService2TestCaseOperation1 method directly
  196. // instead.
  197. //
  198. // Note: You must call the "Send" method on the returned request object in order
  199. // to execute the request.
  200. //
  201. // // Example sending a request using the InputService2TestCaseOperation1Request method.
  202. // req, resp := client.InputService2TestCaseOperation1Request(params)
  203. //
  204. // err := req.Send()
  205. // if err == nil { // resp is now filled
  206. // fmt.Println(resp)
  207. // }
  208. //
  209. func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputService2TestCaseOperation1Input) (req *request.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) {
  210. op := &request.Operation{
  211. Name: opInputService2TestCaseOperation1,
  212. HTTPPath: "/",
  213. }
  214. if input == nil {
  215. input = &InputService2TestShapeInputService2TestCaseOperation1Input{}
  216. }
  217. req = c.newRequest(op, input, output)
  218. req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler)
  219. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  220. output = &InputService2TestShapeInputService2TestCaseOperation1Output{}
  221. req.Data = output
  222. return
  223. }
  224. func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputService2TestCaseOperation1Input) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) {
  225. req, out := c.InputService2TestCaseOperation1Request(input)
  226. err := req.Send()
  227. return out, err
  228. }
  229. type InputService2TestShapeInputService2TestCaseOperation1Input struct {
  230. _ struct{} `type:"structure"`
  231. Bar *string `locationName:"barLocationName" type:"string"`
  232. Foo *string `type:"string"`
  233. Yuck *string `locationName:"yuckLocationName" queryName:"yuckQueryName" type:"string"`
  234. }
  235. type InputService2TestShapeInputService2TestCaseOperation1Output struct {
  236. _ struct{} `type:"structure"`
  237. }
  238. //The service client's operations are safe to be used concurrently.
  239. // It is not safe to mutate any of the client's properties though.
  240. type InputService3ProtocolTest struct {
  241. *client.Client
  242. }
  243. // New creates a new instance of the InputService3ProtocolTest client with a session.
  244. // If additional configuration is needed for the client instance use the optional
  245. // aws.Config parameter to add your extra config.
  246. //
  247. // Example:
  248. // // Create a InputService3ProtocolTest client from just a session.
  249. // svc := inputservice3protocoltest.New(mySession)
  250. //
  251. // // Create a InputService3ProtocolTest client with additional configuration
  252. // svc := inputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  253. func NewInputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService3ProtocolTest {
  254. c := p.ClientConfig("inputservice3protocoltest", cfgs...)
  255. return newInputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  256. }
  257. // newClient creates, initializes and returns a new service client instance.
  258. func newInputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService3ProtocolTest {
  259. svc := &InputService3ProtocolTest{
  260. Client: client.New(
  261. cfg,
  262. metadata.ClientInfo{
  263. ServiceName: "inputservice3protocoltest",
  264. SigningRegion: signingRegion,
  265. Endpoint: endpoint,
  266. APIVersion: "2014-01-01",
  267. },
  268. handlers,
  269. ),
  270. }
  271. // Handlers
  272. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  273. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  274. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  275. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  276. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  277. return svc
  278. }
  279. // newRequest creates a new request for a InputService3ProtocolTest operation and runs any
  280. // custom request initialization.
  281. func (c *InputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  282. req := c.NewRequest(op, params, data)
  283. return req
  284. }
  285. const opInputService3TestCaseOperation1 = "OperationName"
  286. // InputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
  287. // client's request for the InputService3TestCaseOperation1 operation. The "output" return
  288. // value can be used to capture response data after the request's "Send" method
  289. // is called.
  290. //
  291. // Creating a request object using this method should be used when you want to inject
  292. // custom logic into the request's lifecycle using a custom handler, or if you want to
  293. // access properties on the request object before or after sending the request. If
  294. // you just want the service response, call the InputService3TestCaseOperation1 method directly
  295. // instead.
  296. //
  297. // Note: You must call the "Send" method on the returned request object in order
  298. // to execute the request.
  299. //
  300. // // Example sending a request using the InputService3TestCaseOperation1Request method.
  301. // req, resp := client.InputService3TestCaseOperation1Request(params)
  302. //
  303. // err := req.Send()
  304. // if err == nil { // resp is now filled
  305. // fmt.Println(resp)
  306. // }
  307. //
  308. func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputService3TestCaseOperation1Input) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) {
  309. op := &request.Operation{
  310. Name: opInputService3TestCaseOperation1,
  311. HTTPPath: "/",
  312. }
  313. if input == nil {
  314. input = &InputService3TestShapeInputService3TestCaseOperation1Input{}
  315. }
  316. req = c.newRequest(op, input, output)
  317. req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler)
  318. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  319. output = &InputService3TestShapeInputService3TestCaseOperation1Output{}
  320. req.Data = output
  321. return
  322. }
  323. func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputService3TestCaseOperation1Input) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) {
  324. req, out := c.InputService3TestCaseOperation1Request(input)
  325. err := req.Send()
  326. return out, err
  327. }
  328. type InputService3TestShapeInputService3TestCaseOperation1Input struct {
  329. _ struct{} `type:"structure"`
  330. StructArg *InputService3TestShapeStructType `locationName:"Struct" type:"structure"`
  331. }
  332. type InputService3TestShapeInputService3TestCaseOperation1Output struct {
  333. _ struct{} `type:"structure"`
  334. }
  335. type InputService3TestShapeStructType struct {
  336. _ struct{} `type:"structure"`
  337. ScalarArg *string `locationName:"Scalar" type:"string"`
  338. }
  339. //The service client's operations are safe to be used concurrently.
  340. // It is not safe to mutate any of the client's properties though.
  341. type InputService4ProtocolTest struct {
  342. *client.Client
  343. }
  344. // New creates a new instance of the InputService4ProtocolTest client with a session.
  345. // If additional configuration is needed for the client instance use the optional
  346. // aws.Config parameter to add your extra config.
  347. //
  348. // Example:
  349. // // Create a InputService4ProtocolTest client from just a session.
  350. // svc := inputservice4protocoltest.New(mySession)
  351. //
  352. // // Create a InputService4ProtocolTest client with additional configuration
  353. // svc := inputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  354. func NewInputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService4ProtocolTest {
  355. c := p.ClientConfig("inputservice4protocoltest", cfgs...)
  356. return newInputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  357. }
  358. // newClient creates, initializes and returns a new service client instance.
  359. func newInputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService4ProtocolTest {
  360. svc := &InputService4ProtocolTest{
  361. Client: client.New(
  362. cfg,
  363. metadata.ClientInfo{
  364. ServiceName: "inputservice4protocoltest",
  365. SigningRegion: signingRegion,
  366. Endpoint: endpoint,
  367. APIVersion: "2014-01-01",
  368. },
  369. handlers,
  370. ),
  371. }
  372. // Handlers
  373. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  374. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  375. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  376. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  377. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  378. return svc
  379. }
  380. // newRequest creates a new request for a InputService4ProtocolTest operation and runs any
  381. // custom request initialization.
  382. func (c *InputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  383. req := c.NewRequest(op, params, data)
  384. return req
  385. }
  386. const opInputService4TestCaseOperation1 = "OperationName"
  387. // InputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
  388. // client's request for the InputService4TestCaseOperation1 operation. The "output" return
  389. // value can be used to capture response data after the request's "Send" method
  390. // is called.
  391. //
  392. // Creating a request object using this method should be used when you want to inject
  393. // custom logic into the request's lifecycle using a custom handler, or if you want to
  394. // access properties on the request object before or after sending the request. If
  395. // you just want the service response, call the InputService4TestCaseOperation1 method directly
  396. // instead.
  397. //
  398. // Note: You must call the "Send" method on the returned request object in order
  399. // to execute the request.
  400. //
  401. // // Example sending a request using the InputService4TestCaseOperation1Request method.
  402. // req, resp := client.InputService4TestCaseOperation1Request(params)
  403. //
  404. // err := req.Send()
  405. // if err == nil { // resp is now filled
  406. // fmt.Println(resp)
  407. // }
  408. //
  409. func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputService4TestCaseOperation1Input) (req *request.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) {
  410. op := &request.Operation{
  411. Name: opInputService4TestCaseOperation1,
  412. HTTPPath: "/",
  413. }
  414. if input == nil {
  415. input = &InputService4TestShapeInputService4TestCaseOperation1Input{}
  416. }
  417. req = c.newRequest(op, input, output)
  418. req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler)
  419. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  420. output = &InputService4TestShapeInputService4TestCaseOperation1Output{}
  421. req.Data = output
  422. return
  423. }
  424. func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputService4TestCaseOperation1Input) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) {
  425. req, out := c.InputService4TestCaseOperation1Request(input)
  426. err := req.Send()
  427. return out, err
  428. }
  429. type InputService4TestShapeInputService4TestCaseOperation1Input struct {
  430. _ struct{} `type:"structure"`
  431. ListArg []*string `type:"list"`
  432. }
  433. type InputService4TestShapeInputService4TestCaseOperation1Output struct {
  434. _ struct{} `type:"structure"`
  435. }
  436. //The service client's operations are safe to be used concurrently.
  437. // It is not safe to mutate any of the client's properties though.
  438. type InputService5ProtocolTest struct {
  439. *client.Client
  440. }
  441. // New creates a new instance of the InputService5ProtocolTest client with a session.
  442. // If additional configuration is needed for the client instance use the optional
  443. // aws.Config parameter to add your extra config.
  444. //
  445. // Example:
  446. // // Create a InputService5ProtocolTest client from just a session.
  447. // svc := inputservice5protocoltest.New(mySession)
  448. //
  449. // // Create a InputService5ProtocolTest client with additional configuration
  450. // svc := inputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  451. func NewInputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService5ProtocolTest {
  452. c := p.ClientConfig("inputservice5protocoltest", cfgs...)
  453. return newInputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  454. }
  455. // newClient creates, initializes and returns a new service client instance.
  456. func newInputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService5ProtocolTest {
  457. svc := &InputService5ProtocolTest{
  458. Client: client.New(
  459. cfg,
  460. metadata.ClientInfo{
  461. ServiceName: "inputservice5protocoltest",
  462. SigningRegion: signingRegion,
  463. Endpoint: endpoint,
  464. APIVersion: "2014-01-01",
  465. },
  466. handlers,
  467. ),
  468. }
  469. // Handlers
  470. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  471. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  472. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  473. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  474. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  475. return svc
  476. }
  477. // newRequest creates a new request for a InputService5ProtocolTest operation and runs any
  478. // custom request initialization.
  479. func (c *InputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  480. req := c.NewRequest(op, params, data)
  481. return req
  482. }
  483. const opInputService5TestCaseOperation1 = "OperationName"
  484. // InputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
  485. // client's request for the InputService5TestCaseOperation1 operation. The "output" return
  486. // value can be used to capture response data after the request's "Send" method
  487. // is called.
  488. //
  489. // Creating a request object using this method should be used when you want to inject
  490. // custom logic into the request's lifecycle using a custom handler, or if you want to
  491. // access properties on the request object before or after sending the request. If
  492. // you just want the service response, call the InputService5TestCaseOperation1 method directly
  493. // instead.
  494. //
  495. // Note: You must call the "Send" method on the returned request object in order
  496. // to execute the request.
  497. //
  498. // // Example sending a request using the InputService5TestCaseOperation1Request method.
  499. // req, resp := client.InputService5TestCaseOperation1Request(params)
  500. //
  501. // err := req.Send()
  502. // if err == nil { // resp is now filled
  503. // fmt.Println(resp)
  504. // }
  505. //
  506. func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputService5TestCaseOperation1Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) {
  507. op := &request.Operation{
  508. Name: opInputService5TestCaseOperation1,
  509. HTTPPath: "/",
  510. }
  511. if input == nil {
  512. input = &InputService5TestShapeInputService5TestCaseOperation1Input{}
  513. }
  514. req = c.newRequest(op, input, output)
  515. req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler)
  516. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  517. output = &InputService5TestShapeInputService5TestCaseOperation1Output{}
  518. req.Data = output
  519. return
  520. }
  521. func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputService5TestCaseOperation1Input) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) {
  522. req, out := c.InputService5TestCaseOperation1Request(input)
  523. err := req.Send()
  524. return out, err
  525. }
  526. type InputService5TestShapeInputService5TestCaseOperation1Input struct {
  527. _ struct{} `type:"structure"`
  528. ListArg []*string `locationName:"ListMemberName" locationNameList:"item" type:"list"`
  529. }
  530. type InputService5TestShapeInputService5TestCaseOperation1Output struct {
  531. _ struct{} `type:"structure"`
  532. }
  533. //The service client's operations are safe to be used concurrently.
  534. // It is not safe to mutate any of the client's properties though.
  535. type InputService6ProtocolTest struct {
  536. *client.Client
  537. }
  538. // New creates a new instance of the InputService6ProtocolTest client with a session.
  539. // If additional configuration is needed for the client instance use the optional
  540. // aws.Config parameter to add your extra config.
  541. //
  542. // Example:
  543. // // Create a InputService6ProtocolTest client from just a session.
  544. // svc := inputservice6protocoltest.New(mySession)
  545. //
  546. // // Create a InputService6ProtocolTest client with additional configuration
  547. // svc := inputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  548. func NewInputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService6ProtocolTest {
  549. c := p.ClientConfig("inputservice6protocoltest", cfgs...)
  550. return newInputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  551. }
  552. // newClient creates, initializes and returns a new service client instance.
  553. func newInputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService6ProtocolTest {
  554. svc := &InputService6ProtocolTest{
  555. Client: client.New(
  556. cfg,
  557. metadata.ClientInfo{
  558. ServiceName: "inputservice6protocoltest",
  559. SigningRegion: signingRegion,
  560. Endpoint: endpoint,
  561. APIVersion: "2014-01-01",
  562. },
  563. handlers,
  564. ),
  565. }
  566. // Handlers
  567. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  568. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  569. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  570. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  571. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  572. return svc
  573. }
  574. // newRequest creates a new request for a InputService6ProtocolTest operation and runs any
  575. // custom request initialization.
  576. func (c *InputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  577. req := c.NewRequest(op, params, data)
  578. return req
  579. }
  580. const opInputService6TestCaseOperation1 = "OperationName"
  581. // InputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
  582. // client's request for the InputService6TestCaseOperation1 operation. The "output" return
  583. // value can be used to capture response data after the request's "Send" method
  584. // is called.
  585. //
  586. // Creating a request object using this method should be used when you want to inject
  587. // custom logic into the request's lifecycle using a custom handler, or if you want to
  588. // access properties on the request object before or after sending the request. If
  589. // you just want the service response, call the InputService6TestCaseOperation1 method directly
  590. // instead.
  591. //
  592. // Note: You must call the "Send" method on the returned request object in order
  593. // to execute the request.
  594. //
  595. // // Example sending a request using the InputService6TestCaseOperation1Request method.
  596. // req, resp := client.InputService6TestCaseOperation1Request(params)
  597. //
  598. // err := req.Send()
  599. // if err == nil { // resp is now filled
  600. // fmt.Println(resp)
  601. // }
  602. //
  603. func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputService6TestCaseOperation1Input) (req *request.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) {
  604. op := &request.Operation{
  605. Name: opInputService6TestCaseOperation1,
  606. HTTPPath: "/",
  607. }
  608. if input == nil {
  609. input = &InputService6TestShapeInputService6TestCaseOperation1Input{}
  610. }
  611. req = c.newRequest(op, input, output)
  612. req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler)
  613. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  614. output = &InputService6TestShapeInputService6TestCaseOperation1Output{}
  615. req.Data = output
  616. return
  617. }
  618. func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputService6TestCaseOperation1Input) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) {
  619. req, out := c.InputService6TestCaseOperation1Request(input)
  620. err := req.Send()
  621. return out, err
  622. }
  623. type InputService6TestShapeInputService6TestCaseOperation1Input struct {
  624. _ struct{} `type:"structure"`
  625. ListArg []*string `locationName:"ListMemberName" queryName:"ListQueryName" locationNameList:"item" type:"list"`
  626. }
  627. type InputService6TestShapeInputService6TestCaseOperation1Output struct {
  628. _ struct{} `type:"structure"`
  629. }
  630. //The service client's operations are safe to be used concurrently.
  631. // It is not safe to mutate any of the client's properties though.
  632. type InputService7ProtocolTest struct {
  633. *client.Client
  634. }
  635. // New creates a new instance of the InputService7ProtocolTest client with a session.
  636. // If additional configuration is needed for the client instance use the optional
  637. // aws.Config parameter to add your extra config.
  638. //
  639. // Example:
  640. // // Create a InputService7ProtocolTest client from just a session.
  641. // svc := inputservice7protocoltest.New(mySession)
  642. //
  643. // // Create a InputService7ProtocolTest client with additional configuration
  644. // svc := inputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  645. func NewInputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService7ProtocolTest {
  646. c := p.ClientConfig("inputservice7protocoltest", cfgs...)
  647. return newInputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  648. }
  649. // newClient creates, initializes and returns a new service client instance.
  650. func newInputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService7ProtocolTest {
  651. svc := &InputService7ProtocolTest{
  652. Client: client.New(
  653. cfg,
  654. metadata.ClientInfo{
  655. ServiceName: "inputservice7protocoltest",
  656. SigningRegion: signingRegion,
  657. Endpoint: endpoint,
  658. APIVersion: "2014-01-01",
  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 InputService7ProtocolTest operation and runs any
  672. // custom request initialization.
  673. func (c *InputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  674. req := c.NewRequest(op, params, data)
  675. return req
  676. }
  677. const opInputService7TestCaseOperation1 = "OperationName"
  678. // InputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
  679. // client's request for the InputService7TestCaseOperation1 operation. The "output" return
  680. // value can be used to capture response data after the request's "Send" method
  681. // is called.
  682. //
  683. // Creating a request object using this method should be used when you want to inject
  684. // custom logic into the request's lifecycle using a custom handler, or if you want to
  685. // access properties on the request object before or after sending the request. If
  686. // you just want the service response, call the InputService7TestCaseOperation1 method directly
  687. // instead.
  688. //
  689. // Note: You must call the "Send" method on the returned request object in order
  690. // to execute the request.
  691. //
  692. // // Example sending a request using the InputService7TestCaseOperation1Request method.
  693. // req, resp := client.InputService7TestCaseOperation1Request(params)
  694. //
  695. // err := req.Send()
  696. // if err == nil { // resp is now filled
  697. // fmt.Println(resp)
  698. // }
  699. //
  700. func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputService7TestCaseOperation1Input) (req *request.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) {
  701. op := &request.Operation{
  702. Name: opInputService7TestCaseOperation1,
  703. HTTPPath: "/",
  704. }
  705. if input == nil {
  706. input = &InputService7TestShapeInputService7TestCaseOperation1Input{}
  707. }
  708. req = c.newRequest(op, input, output)
  709. req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler)
  710. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  711. output = &InputService7TestShapeInputService7TestCaseOperation1Output{}
  712. req.Data = output
  713. return
  714. }
  715. func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputService7TestCaseOperation1Input) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) {
  716. req, out := c.InputService7TestCaseOperation1Request(input)
  717. err := req.Send()
  718. return out, err
  719. }
  720. type InputService7TestShapeInputService7TestCaseOperation1Input struct {
  721. _ struct{} `type:"structure"`
  722. // BlobArg is automatically base64 encoded/decoded by the SDK.
  723. BlobArg []byte `type:"blob"`
  724. }
  725. type InputService7TestShapeInputService7TestCaseOperation1Output struct {
  726. _ struct{} `type:"structure"`
  727. }
  728. //The service client's operations are safe to be used concurrently.
  729. // It is not safe to mutate any of the client's properties though.
  730. type InputService8ProtocolTest struct {
  731. *client.Client
  732. }
  733. // New creates a new instance of the InputService8ProtocolTest client with a session.
  734. // If additional configuration is needed for the client instance use the optional
  735. // aws.Config parameter to add your extra config.
  736. //
  737. // Example:
  738. // // Create a InputService8ProtocolTest client from just a session.
  739. // svc := inputservice8protocoltest.New(mySession)
  740. //
  741. // // Create a InputService8ProtocolTest client with additional configuration
  742. // svc := inputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  743. func NewInputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService8ProtocolTest {
  744. c := p.ClientConfig("inputservice8protocoltest", cfgs...)
  745. return newInputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  746. }
  747. // newClient creates, initializes and returns a new service client instance.
  748. func newInputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService8ProtocolTest {
  749. svc := &InputService8ProtocolTest{
  750. Client: client.New(
  751. cfg,
  752. metadata.ClientInfo{
  753. ServiceName: "inputservice8protocoltest",
  754. SigningRegion: signingRegion,
  755. Endpoint: endpoint,
  756. APIVersion: "2014-01-01",
  757. },
  758. handlers,
  759. ),
  760. }
  761. // Handlers
  762. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  763. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  764. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  765. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  766. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  767. return svc
  768. }
  769. // newRequest creates a new request for a InputService8ProtocolTest operation and runs any
  770. // custom request initialization.
  771. func (c *InputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  772. req := c.NewRequest(op, params, data)
  773. return req
  774. }
  775. const opInputService8TestCaseOperation1 = "OperationName"
  776. // InputService8TestCaseOperation1Request generates a "aws/request.Request" representing the
  777. // client's request for the InputService8TestCaseOperation1 operation. The "output" return
  778. // value can be used to capture response data after the request's "Send" method
  779. // is called.
  780. //
  781. // Creating a request object using this method should be used when you want to inject
  782. // custom logic into the request's lifecycle using a custom handler, or if you want to
  783. // access properties on the request object before or after sending the request. If
  784. // you just want the service response, call the InputService8TestCaseOperation1 method directly
  785. // instead.
  786. //
  787. // Note: You must call the "Send" method on the returned request object in order
  788. // to execute the request.
  789. //
  790. // // Example sending a request using the InputService8TestCaseOperation1Request method.
  791. // req, resp := client.InputService8TestCaseOperation1Request(params)
  792. //
  793. // err := req.Send()
  794. // if err == nil { // resp is now filled
  795. // fmt.Println(resp)
  796. // }
  797. //
  798. func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputService8TestCaseOperation1Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) {
  799. op := &request.Operation{
  800. Name: opInputService8TestCaseOperation1,
  801. HTTPPath: "/",
  802. }
  803. if input == nil {
  804. input = &InputService8TestShapeInputService8TestCaseOperation1Input{}
  805. }
  806. req = c.newRequest(op, input, output)
  807. req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler)
  808. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  809. output = &InputService8TestShapeInputService8TestCaseOperation1Output{}
  810. req.Data = output
  811. return
  812. }
  813. func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputService8TestCaseOperation1Input) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) {
  814. req, out := c.InputService8TestCaseOperation1Request(input)
  815. err := req.Send()
  816. return out, err
  817. }
  818. type InputService8TestShapeInputService8TestCaseOperation1Input struct {
  819. _ struct{} `type:"structure"`
  820. TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  821. }
  822. type InputService8TestShapeInputService8TestCaseOperation1Output struct {
  823. _ struct{} `type:"structure"`
  824. }
  825. //The service client's operations are safe to be used concurrently.
  826. // It is not safe to mutate any of the client's properties though.
  827. type InputService9ProtocolTest struct {
  828. *client.Client
  829. }
  830. // New creates a new instance of the InputService9ProtocolTest client with a session.
  831. // If additional configuration is needed for the client instance use the optional
  832. // aws.Config parameter to add your extra config.
  833. //
  834. // Example:
  835. // // Create a InputService9ProtocolTest client from just a session.
  836. // svc := inputservice9protocoltest.New(mySession)
  837. //
  838. // // Create a InputService9ProtocolTest client with additional configuration
  839. // svc := inputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  840. func NewInputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService9ProtocolTest {
  841. c := p.ClientConfig("inputservice9protocoltest", cfgs...)
  842. return newInputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  843. }
  844. // newClient creates, initializes and returns a new service client instance.
  845. func newInputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService9ProtocolTest {
  846. svc := &InputService9ProtocolTest{
  847. Client: client.New(
  848. cfg,
  849. metadata.ClientInfo{
  850. ServiceName: "inputservice9protocoltest",
  851. SigningRegion: signingRegion,
  852. Endpoint: endpoint,
  853. APIVersion: "2014-01-01",
  854. },
  855. handlers,
  856. ),
  857. }
  858. // Handlers
  859. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  860. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  861. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  862. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  863. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  864. return svc
  865. }
  866. // newRequest creates a new request for a InputService9ProtocolTest operation and runs any
  867. // custom request initialization.
  868. func (c *InputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  869. req := c.NewRequest(op, params, data)
  870. return req
  871. }
  872. const opInputService9TestCaseOperation1 = "OperationName"
  873. // InputService9TestCaseOperation1Request generates a "aws/request.Request" representing the
  874. // client's request for the InputService9TestCaseOperation1 operation. The "output" return
  875. // value can be used to capture response data after the request's "Send" method
  876. // is called.
  877. //
  878. // Creating a request object using this method should be used when you want to inject
  879. // custom logic into the request's lifecycle using a custom handler, or if you want to
  880. // access properties on the request object before or after sending the request. If
  881. // you just want the service response, call the InputService9TestCaseOperation1 method directly
  882. // instead.
  883. //
  884. // Note: You must call the "Send" method on the returned request object in order
  885. // to execute the request.
  886. //
  887. // // Example sending a request using the InputService9TestCaseOperation1Request method.
  888. // req, resp := client.InputService9TestCaseOperation1Request(params)
  889. //
  890. // err := req.Send()
  891. // if err == nil { // resp is now filled
  892. // fmt.Println(resp)
  893. // }
  894. //
  895. func (c *InputService9ProtocolTest) InputService9TestCaseOperation1Request(input *InputService9TestShapeInputShape) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation1Output) {
  896. op := &request.Operation{
  897. Name: opInputService9TestCaseOperation1,
  898. HTTPMethod: "POST",
  899. HTTPPath: "/path",
  900. }
  901. if input == nil {
  902. input = &InputService9TestShapeInputShape{}
  903. }
  904. req = c.newRequest(op, input, output)
  905. req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler)
  906. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  907. output = &InputService9TestShapeInputService9TestCaseOperation1Output{}
  908. req.Data = output
  909. return
  910. }
  911. func (c *InputService9ProtocolTest) InputService9TestCaseOperation1(input *InputService9TestShapeInputShape) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) {
  912. req, out := c.InputService9TestCaseOperation1Request(input)
  913. err := req.Send()
  914. return out, err
  915. }
  916. const opInputService9TestCaseOperation2 = "OperationName"
  917. // InputService9TestCaseOperation2Request generates a "aws/request.Request" representing the
  918. // client's request for the InputService9TestCaseOperation2 operation. The "output" return
  919. // value can be used to capture response data after the request's "Send" method
  920. // is called.
  921. //
  922. // Creating a request object using this method should be used when you want to inject
  923. // custom logic into the request's lifecycle using a custom handler, or if you want to
  924. // access properties on the request object before or after sending the request. If
  925. // you just want the service response, call the InputService9TestCaseOperation2 method directly
  926. // instead.
  927. //
  928. // Note: You must call the "Send" method on the returned request object in order
  929. // to execute the request.
  930. //
  931. // // Example sending a request using the InputService9TestCaseOperation2Request method.
  932. // req, resp := client.InputService9TestCaseOperation2Request(params)
  933. //
  934. // err := req.Send()
  935. // if err == nil { // resp is now filled
  936. // fmt.Println(resp)
  937. // }
  938. //
  939. func (c *InputService9ProtocolTest) InputService9TestCaseOperation2Request(input *InputService9TestShapeInputShape) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation2Output) {
  940. op := &request.Operation{
  941. Name: opInputService9TestCaseOperation2,
  942. HTTPMethod: "POST",
  943. HTTPPath: "/path",
  944. }
  945. if input == nil {
  946. input = &InputService9TestShapeInputShape{}
  947. }
  948. req = c.newRequest(op, input, output)
  949. req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler)
  950. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  951. output = &InputService9TestShapeInputService9TestCaseOperation2Output{}
  952. req.Data = output
  953. return
  954. }
  955. func (c *InputService9ProtocolTest) InputService9TestCaseOperation2(input *InputService9TestShapeInputShape) (*InputService9TestShapeInputService9TestCaseOperation2Output, error) {
  956. req, out := c.InputService9TestCaseOperation2Request(input)
  957. err := req.Send()
  958. return out, err
  959. }
  960. type InputService9TestShapeInputService9TestCaseOperation1Output struct {
  961. _ struct{} `type:"structure"`
  962. }
  963. type InputService9TestShapeInputService9TestCaseOperation2Output struct {
  964. _ struct{} `type:"structure"`
  965. }
  966. type InputService9TestShapeInputShape struct {
  967. _ struct{} `type:"structure"`
  968. Token *string `type:"string" idempotencyToken:"true"`
  969. }
  970. //
  971. // Tests begin here
  972. //
  973. func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) {
  974. svc := NewInputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  975. input := &InputService1TestShapeInputService1TestCaseOperation1Input{
  976. Bar: aws.String("val2"),
  977. Foo: aws.String("val1"),
  978. }
  979. req, _ := svc.InputService1TestCaseOperation1Request(input)
  980. r := req.HTTPRequest
  981. // build request
  982. ec2query.Build(req)
  983. assert.NoError(t, req.Error)
  984. // assert body
  985. assert.NotNil(t, r.Body)
  986. body, _ := ioutil.ReadAll(r.Body)
  987. awstesting.AssertQuery(t, `Action=OperationName&Bar=val2&Foo=val1&Version=2014-01-01`, util.Trim(string(body)))
  988. // assert URL
  989. awstesting.AssertURL(t, "https://test/", r.URL.String())
  990. // assert headers
  991. }
  992. func TestInputService2ProtocolTestStructureWithLocationNameAndQueryNameAppliedToMembersCase1(t *testing.T) {
  993. svc := NewInputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  994. input := &InputService2TestShapeInputService2TestCaseOperation1Input{
  995. Bar: aws.String("val2"),
  996. Foo: aws.String("val1"),
  997. Yuck: aws.String("val3"),
  998. }
  999. req, _ := svc.InputService2TestCaseOperation1Request(input)
  1000. r := req.HTTPRequest
  1001. // build request
  1002. ec2query.Build(req)
  1003. assert.NoError(t, req.Error)
  1004. // assert body
  1005. assert.NotNil(t, r.Body)
  1006. body, _ := ioutil.ReadAll(r.Body)
  1007. awstesting.AssertQuery(t, `Action=OperationName&BarLocationName=val2&Foo=val1&Version=2014-01-01&yuckQueryName=val3`, util.Trim(string(body)))
  1008. // assert URL
  1009. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1010. // assert headers
  1011. }
  1012. func TestInputService3ProtocolTestNestedStructureMembersCase1(t *testing.T) {
  1013. svc := NewInputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1014. input := &InputService3TestShapeInputService3TestCaseOperation1Input{
  1015. StructArg: &InputService3TestShapeStructType{
  1016. ScalarArg: aws.String("foo"),
  1017. },
  1018. }
  1019. req, _ := svc.InputService3TestCaseOperation1Request(input)
  1020. r := req.HTTPRequest
  1021. // build request
  1022. ec2query.Build(req)
  1023. assert.NoError(t, req.Error)
  1024. // assert body
  1025. assert.NotNil(t, r.Body)
  1026. body, _ := ioutil.ReadAll(r.Body)
  1027. awstesting.AssertQuery(t, `Action=OperationName&Struct.Scalar=foo&Version=2014-01-01`, util.Trim(string(body)))
  1028. // assert URL
  1029. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1030. // assert headers
  1031. }
  1032. func TestInputService4ProtocolTestListTypesCase1(t *testing.T) {
  1033. svc := NewInputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1034. input := &InputService4TestShapeInputService4TestCaseOperation1Input{
  1035. ListArg: []*string{
  1036. aws.String("foo"),
  1037. aws.String("bar"),
  1038. aws.String("baz"),
  1039. },
  1040. }
  1041. req, _ := svc.InputService4TestCaseOperation1Request(input)
  1042. r := req.HTTPRequest
  1043. // build request
  1044. ec2query.Build(req)
  1045. assert.NoError(t, req.Error)
  1046. // assert body
  1047. assert.NotNil(t, r.Body)
  1048. body, _ := ioutil.ReadAll(r.Body)
  1049. awstesting.AssertQuery(t, `Action=OperationName&ListArg.1=foo&ListArg.2=bar&ListArg.3=baz&Version=2014-01-01`, util.Trim(string(body)))
  1050. // assert URL
  1051. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1052. // assert headers
  1053. }
  1054. func TestInputService5ProtocolTestListWithLocationNameAppliedToMemberCase1(t *testing.T) {
  1055. svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1056. input := &InputService5TestShapeInputService5TestCaseOperation1Input{
  1057. ListArg: []*string{
  1058. aws.String("a"),
  1059. aws.String("b"),
  1060. aws.String("c"),
  1061. },
  1062. }
  1063. req, _ := svc.InputService5TestCaseOperation1Request(input)
  1064. r := req.HTTPRequest
  1065. // build request
  1066. ec2query.Build(req)
  1067. assert.NoError(t, req.Error)
  1068. // assert body
  1069. assert.NotNil(t, r.Body)
  1070. body, _ := ioutil.ReadAll(r.Body)
  1071. awstesting.AssertQuery(t, `Action=OperationName&ListMemberName.1=a&ListMemberName.2=b&ListMemberName.3=c&Version=2014-01-01`, util.Trim(string(body)))
  1072. // assert URL
  1073. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1074. // assert headers
  1075. }
  1076. func TestInputService6ProtocolTestListWithLocationNameAndQueryNameCase1(t *testing.T) {
  1077. svc := NewInputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1078. input := &InputService6TestShapeInputService6TestCaseOperation1Input{
  1079. ListArg: []*string{
  1080. aws.String("a"),
  1081. aws.String("b"),
  1082. aws.String("c"),
  1083. },
  1084. }
  1085. req, _ := svc.InputService6TestCaseOperation1Request(input)
  1086. r := req.HTTPRequest
  1087. // build request
  1088. ec2query.Build(req)
  1089. assert.NoError(t, req.Error)
  1090. // assert body
  1091. assert.NotNil(t, r.Body)
  1092. body, _ := ioutil.ReadAll(r.Body)
  1093. awstesting.AssertQuery(t, `Action=OperationName&ListQueryName.1=a&ListQueryName.2=b&ListQueryName.3=c&Version=2014-01-01`, util.Trim(string(body)))
  1094. // assert URL
  1095. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1096. // assert headers
  1097. }
  1098. func TestInputService7ProtocolTestBase64EncodedBlobsCase1(t *testing.T) {
  1099. svc := NewInputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1100. input := &InputService7TestShapeInputService7TestCaseOperation1Input{
  1101. BlobArg: []byte("foo"),
  1102. }
  1103. req, _ := svc.InputService7TestCaseOperation1Request(input)
  1104. r := req.HTTPRequest
  1105. // build request
  1106. ec2query.Build(req)
  1107. assert.NoError(t, req.Error)
  1108. // assert body
  1109. assert.NotNil(t, r.Body)
  1110. body, _ := ioutil.ReadAll(r.Body)
  1111. awstesting.AssertQuery(t, `Action=OperationName&BlobArg=Zm9v&Version=2014-01-01`, util.Trim(string(body)))
  1112. // assert URL
  1113. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1114. // assert headers
  1115. }
  1116. func TestInputService8ProtocolTestTimestampValuesCase1(t *testing.T) {
  1117. svc := NewInputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1118. input := &InputService8TestShapeInputService8TestCaseOperation1Input{
  1119. TimeArg: aws.Time(time.Unix(1422172800, 0)),
  1120. }
  1121. req, _ := svc.InputService8TestCaseOperation1Request(input)
  1122. r := req.HTTPRequest
  1123. // build request
  1124. ec2query.Build(req)
  1125. assert.NoError(t, req.Error)
  1126. // assert body
  1127. assert.NotNil(t, r.Body)
  1128. body, _ := ioutil.ReadAll(r.Body)
  1129. awstesting.AssertQuery(t, `Action=OperationName&TimeArg=2015-01-25T08%3A00%3A00Z&Version=2014-01-01`, util.Trim(string(body)))
  1130. // assert URL
  1131. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1132. // assert headers
  1133. }
  1134. func TestInputService9ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) {
  1135. svc := NewInputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1136. input := &InputService9TestShapeInputShape{
  1137. Token: aws.String("abc123"),
  1138. }
  1139. req, _ := svc.InputService9TestCaseOperation1Request(input)
  1140. r := req.HTTPRequest
  1141. // build request
  1142. ec2query.Build(req)
  1143. assert.NoError(t, req.Error)
  1144. // assert body
  1145. assert.NotNil(t, r.Body)
  1146. body, _ := ioutil.ReadAll(r.Body)
  1147. awstesting.AssertQuery(t, `Token=abc123`, util.Trim(string(body)))
  1148. // assert URL
  1149. awstesting.AssertURL(t, "https://test/path", r.URL.String())
  1150. // assert headers
  1151. }
  1152. func TestInputService9ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) {
  1153. svc := NewInputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1154. input := &InputService9TestShapeInputShape{}
  1155. req, _ := svc.InputService9TestCaseOperation2Request(input)
  1156. r := req.HTTPRequest
  1157. // build request
  1158. ec2query.Build(req)
  1159. assert.NoError(t, req.Error)
  1160. // assert body
  1161. assert.NotNil(t, r.Body)
  1162. body, _ := ioutil.ReadAll(r.Body)
  1163. awstesting.AssertQuery(t, `Token=00000000-0000-4000-8000-000000000000`, util.Trim(string(body)))
  1164. // assert URL
  1165. awstesting.AssertURL(t, "https://test/path", r.URL.String())
  1166. // assert headers
  1167. }