build_test.go 58 KB

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