build_test.go 55 KB

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