build_test.go 96 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453
  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. "reflect"
  12. "testing"
  13. "time"
  14. "github.com/aws/aws-sdk-go/aws"
  15. "github.com/aws/aws-sdk-go/aws/client"
  16. "github.com/aws/aws-sdk-go/aws/client/metadata"
  17. "github.com/aws/aws-sdk-go/aws/request"
  18. "github.com/aws/aws-sdk-go/aws/signer/v4"
  19. "github.com/aws/aws-sdk-go/awstesting"
  20. "github.com/aws/aws-sdk-go/awstesting/unit"
  21. "github.com/aws/aws-sdk-go/private/protocol"
  22. "github.com/aws/aws-sdk-go/private/protocol/ec2query"
  23. "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
  24. "github.com/aws/aws-sdk-go/private/util"
  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. var _ = reflect.Value{}
  39. func init() {
  40. protocol.RandReader = &awstesting.ZeroReader{}
  41. }
  42. // InputService1ProtocolTest provides the API operation methods for making requests to
  43. // . See this package's package overview docs
  44. // for details on the service.
  45. //
  46. // InputService1ProtocolTest methods are safe to use concurrently. It is not safe to
  47. // modify mutate any of the struct's properties though.
  48. type InputService1ProtocolTest struct {
  49. *client.Client
  50. }
  51. // New creates a new instance of the InputService1ProtocolTest client with a session.
  52. // If additional configuration is needed for the client instance use the optional
  53. // aws.Config parameter to add your extra config.
  54. //
  55. // Example:
  56. // // Create a InputService1ProtocolTest client from just a session.
  57. // svc := inputservice1protocoltest.New(mySession)
  58. //
  59. // // Create a InputService1ProtocolTest client with additional configuration
  60. // svc := inputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  61. func NewInputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService1ProtocolTest {
  62. c := p.ClientConfig("inputservice1protocoltest", cfgs...)
  63. return newInputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  64. }
  65. // newClient creates, initializes and returns a new service client instance.
  66. func newInputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService1ProtocolTest {
  67. svc := &InputService1ProtocolTest{
  68. Client: client.New(
  69. cfg,
  70. metadata.ClientInfo{
  71. ServiceName: "InputService1ProtocolTest",
  72. ServiceID: "InputService1ProtocolTest",
  73. SigningName: signingName,
  74. SigningRegion: signingRegion,
  75. Endpoint: endpoint,
  76. APIVersion: "2014-01-01",
  77. },
  78. handlers,
  79. ),
  80. }
  81. // Handlers
  82. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  83. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  84. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  85. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  86. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  87. return svc
  88. }
  89. // newRequest creates a new request for a InputService1ProtocolTest operation and runs any
  90. // custom request initialization.
  91. func (c *InputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  92. req := c.NewRequest(op, params, data)
  93. return req
  94. }
  95. const opInputService1TestCaseOperation1 = "OperationName"
  96. // InputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
  97. // client's request for the InputService1TestCaseOperation1 operation. The "output" return
  98. // value will be populated with the request's response once the request completes
  99. // successfully.
  100. //
  101. // Use "Send" method on the returned Request to send the API call to the service.
  102. // the "output" return value is not valid until after Send returns without error.
  103. //
  104. // See InputService1TestCaseOperation1 for more information on using the InputService1TestCaseOperation1
  105. // API call, and error handling.
  106. //
  107. // This method is useful when you want to inject custom logic or configuration
  108. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  109. //
  110. //
  111. // // Example sending a request using the InputService1TestCaseOperation1Request method.
  112. // req, resp := client.InputService1TestCaseOperation1Request(params)
  113. //
  114. // err := req.Send()
  115. // if err == nil { // resp is now filled
  116. // fmt.Println(resp)
  117. // }
  118. func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputService1TestCaseOperation1Input) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) {
  119. op := &request.Operation{
  120. Name: opInputService1TestCaseOperation1,
  121. HTTPPath: "/",
  122. }
  123. if input == nil {
  124. input = &InputService1TestShapeInputService1TestCaseOperation1Input{}
  125. }
  126. output = &InputService1TestShapeInputService1TestCaseOperation1Output{}
  127. req = c.newRequest(op, input, output)
  128. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  129. return
  130. }
  131. // InputService1TestCaseOperation1 API operation for .
  132. //
  133. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  134. // with awserr.Error's Code and Message methods to get detailed information about
  135. // the error.
  136. //
  137. // See the AWS API reference guide for 's
  138. // API operation InputService1TestCaseOperation1 for usage and error information.
  139. func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputService1TestCaseOperation1Input) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) {
  140. req, out := c.InputService1TestCaseOperation1Request(input)
  141. return out, req.Send()
  142. }
  143. // InputService1TestCaseOperation1WithContext is the same as InputService1TestCaseOperation1 with the addition of
  144. // the ability to pass a context and additional request options.
  145. //
  146. // See InputService1TestCaseOperation1 for details on how to use this API operation.
  147. //
  148. // The context must be non-nil and will be used for request cancellation. If
  149. // the context is nil a panic will occur. In the future the SDK may create
  150. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  151. // for more information on using Contexts.
  152. func (c *InputService1ProtocolTest) InputService1TestCaseOperation1WithContext(ctx aws.Context, input *InputService1TestShapeInputService1TestCaseOperation1Input, opts ...request.Option) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) {
  153. req, out := c.InputService1TestCaseOperation1Request(input)
  154. req.SetContext(ctx)
  155. req.ApplyOptions(opts...)
  156. return out, req.Send()
  157. }
  158. type InputService1TestShapeInputService1TestCaseOperation1Input struct {
  159. _ struct{} `type:"structure"`
  160. Bar *string `type:"string"`
  161. Foo *string `type:"string"`
  162. }
  163. // SetBar sets the Bar field's value.
  164. func (s *InputService1TestShapeInputService1TestCaseOperation1Input) SetBar(v string) *InputService1TestShapeInputService1TestCaseOperation1Input {
  165. s.Bar = &v
  166. return s
  167. }
  168. // SetFoo sets the Foo field's value.
  169. func (s *InputService1TestShapeInputService1TestCaseOperation1Input) SetFoo(v string) *InputService1TestShapeInputService1TestCaseOperation1Input {
  170. s.Foo = &v
  171. return s
  172. }
  173. type InputService1TestShapeInputService1TestCaseOperation1Output struct {
  174. _ struct{} `type:"structure"`
  175. }
  176. // InputService2ProtocolTest provides the API operation methods for making requests to
  177. // . See this package's package overview docs
  178. // for details on the service.
  179. //
  180. // InputService2ProtocolTest methods are safe to use concurrently. It is not safe to
  181. // modify mutate any of the struct's properties though.
  182. type InputService2ProtocolTest struct {
  183. *client.Client
  184. }
  185. // New creates a new instance of the InputService2ProtocolTest client with a session.
  186. // If additional configuration is needed for the client instance use the optional
  187. // aws.Config parameter to add your extra config.
  188. //
  189. // Example:
  190. // // Create a InputService2ProtocolTest client from just a session.
  191. // svc := inputservice2protocoltest.New(mySession)
  192. //
  193. // // Create a InputService2ProtocolTest client with additional configuration
  194. // svc := inputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  195. func NewInputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService2ProtocolTest {
  196. c := p.ClientConfig("inputservice2protocoltest", cfgs...)
  197. return newInputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  198. }
  199. // newClient creates, initializes and returns a new service client instance.
  200. func newInputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService2ProtocolTest {
  201. svc := &InputService2ProtocolTest{
  202. Client: client.New(
  203. cfg,
  204. metadata.ClientInfo{
  205. ServiceName: "InputService2ProtocolTest",
  206. ServiceID: "InputService2ProtocolTest",
  207. SigningName: signingName,
  208. SigningRegion: signingRegion,
  209. Endpoint: endpoint,
  210. APIVersion: "2014-01-01",
  211. },
  212. handlers,
  213. ),
  214. }
  215. // Handlers
  216. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  217. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  218. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  219. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  220. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  221. return svc
  222. }
  223. // newRequest creates a new request for a InputService2ProtocolTest operation and runs any
  224. // custom request initialization.
  225. func (c *InputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  226. req := c.NewRequest(op, params, data)
  227. return req
  228. }
  229. const opInputService2TestCaseOperation1 = "OperationName"
  230. // InputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
  231. // client's request for the InputService2TestCaseOperation1 operation. The "output" return
  232. // value will be populated with the request's response once the request completes
  233. // successfully.
  234. //
  235. // Use "Send" method on the returned Request to send the API call to the service.
  236. // the "output" return value is not valid until after Send returns without error.
  237. //
  238. // See InputService2TestCaseOperation1 for more information on using the InputService2TestCaseOperation1
  239. // API call, and error handling.
  240. //
  241. // This method is useful when you want to inject custom logic or configuration
  242. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  243. //
  244. //
  245. // // Example sending a request using the InputService2TestCaseOperation1Request method.
  246. // req, resp := client.InputService2TestCaseOperation1Request(params)
  247. //
  248. // err := req.Send()
  249. // if err == nil { // resp is now filled
  250. // fmt.Println(resp)
  251. // }
  252. func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputService2TestCaseOperation1Input) (req *request.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) {
  253. op := &request.Operation{
  254. Name: opInputService2TestCaseOperation1,
  255. HTTPPath: "/",
  256. }
  257. if input == nil {
  258. input = &InputService2TestShapeInputService2TestCaseOperation1Input{}
  259. }
  260. output = &InputService2TestShapeInputService2TestCaseOperation1Output{}
  261. req = c.newRequest(op, input, output)
  262. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  263. return
  264. }
  265. // InputService2TestCaseOperation1 API operation for .
  266. //
  267. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  268. // with awserr.Error's Code and Message methods to get detailed information about
  269. // the error.
  270. //
  271. // See the AWS API reference guide for 's
  272. // API operation InputService2TestCaseOperation1 for usage and error information.
  273. func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputService2TestCaseOperation1Input) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) {
  274. req, out := c.InputService2TestCaseOperation1Request(input)
  275. return out, req.Send()
  276. }
  277. // InputService2TestCaseOperation1WithContext is the same as InputService2TestCaseOperation1 with the addition of
  278. // the ability to pass a context and additional request options.
  279. //
  280. // See InputService2TestCaseOperation1 for details on how to use this API operation.
  281. //
  282. // The context must be non-nil and will be used for request cancellation. If
  283. // the context is nil a panic will occur. In the future the SDK may create
  284. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  285. // for more information on using Contexts.
  286. func (c *InputService2ProtocolTest) InputService2TestCaseOperation1WithContext(ctx aws.Context, input *InputService2TestShapeInputService2TestCaseOperation1Input, opts ...request.Option) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) {
  287. req, out := c.InputService2TestCaseOperation1Request(input)
  288. req.SetContext(ctx)
  289. req.ApplyOptions(opts...)
  290. return out, req.Send()
  291. }
  292. type InputService2TestShapeInputService2TestCaseOperation1Input struct {
  293. _ struct{} `type:"structure"`
  294. Bar *string `locationName:"barLocationName" type:"string"`
  295. Foo *string `type:"string"`
  296. Yuck *string `locationName:"yuckLocationName" queryName:"yuckQueryName" type:"string"`
  297. }
  298. // SetBar sets the Bar field's value.
  299. func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetBar(v string) *InputService2TestShapeInputService2TestCaseOperation1Input {
  300. s.Bar = &v
  301. return s
  302. }
  303. // SetFoo sets the Foo field's value.
  304. func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetFoo(v string) *InputService2TestShapeInputService2TestCaseOperation1Input {
  305. s.Foo = &v
  306. return s
  307. }
  308. // SetYuck sets the Yuck field's value.
  309. func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetYuck(v string) *InputService2TestShapeInputService2TestCaseOperation1Input {
  310. s.Yuck = &v
  311. return s
  312. }
  313. type InputService2TestShapeInputService2TestCaseOperation1Output struct {
  314. _ struct{} `type:"structure"`
  315. }
  316. // InputService3ProtocolTest provides the API operation methods for making requests to
  317. // . See this package's package overview docs
  318. // for details on the service.
  319. //
  320. // InputService3ProtocolTest methods are safe to use concurrently. It is not safe to
  321. // modify mutate any of the struct's properties though.
  322. type InputService3ProtocolTest struct {
  323. *client.Client
  324. }
  325. // New creates a new instance of the InputService3ProtocolTest client with a session.
  326. // If additional configuration is needed for the client instance use the optional
  327. // aws.Config parameter to add your extra config.
  328. //
  329. // Example:
  330. // // Create a InputService3ProtocolTest client from just a session.
  331. // svc := inputservice3protocoltest.New(mySession)
  332. //
  333. // // Create a InputService3ProtocolTest client with additional configuration
  334. // svc := inputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  335. func NewInputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService3ProtocolTest {
  336. c := p.ClientConfig("inputservice3protocoltest", cfgs...)
  337. return newInputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  338. }
  339. // newClient creates, initializes and returns a new service client instance.
  340. func newInputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService3ProtocolTest {
  341. svc := &InputService3ProtocolTest{
  342. Client: client.New(
  343. cfg,
  344. metadata.ClientInfo{
  345. ServiceName: "InputService3ProtocolTest",
  346. ServiceID: "InputService3ProtocolTest",
  347. SigningName: signingName,
  348. SigningRegion: signingRegion,
  349. Endpoint: endpoint,
  350. APIVersion: "2014-01-01",
  351. },
  352. handlers,
  353. ),
  354. }
  355. // Handlers
  356. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  357. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  358. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  359. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  360. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  361. return svc
  362. }
  363. // newRequest creates a new request for a InputService3ProtocolTest operation and runs any
  364. // custom request initialization.
  365. func (c *InputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  366. req := c.NewRequest(op, params, data)
  367. return req
  368. }
  369. const opInputService3TestCaseOperation1 = "OperationName"
  370. // InputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
  371. // client's request for the InputService3TestCaseOperation1 operation. The "output" return
  372. // value will be populated with the request's response once the request completes
  373. // successfully.
  374. //
  375. // Use "Send" method on the returned Request to send the API call to the service.
  376. // the "output" return value is not valid until after Send returns without error.
  377. //
  378. // See InputService3TestCaseOperation1 for more information on using the InputService3TestCaseOperation1
  379. // API call, and error handling.
  380. //
  381. // This method is useful when you want to inject custom logic or configuration
  382. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  383. //
  384. //
  385. // // Example sending a request using the InputService3TestCaseOperation1Request method.
  386. // req, resp := client.InputService3TestCaseOperation1Request(params)
  387. //
  388. // err := req.Send()
  389. // if err == nil { // resp is now filled
  390. // fmt.Println(resp)
  391. // }
  392. func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputService3TestCaseOperation1Input) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) {
  393. op := &request.Operation{
  394. Name: opInputService3TestCaseOperation1,
  395. HTTPPath: "/",
  396. }
  397. if input == nil {
  398. input = &InputService3TestShapeInputService3TestCaseOperation1Input{}
  399. }
  400. output = &InputService3TestShapeInputService3TestCaseOperation1Output{}
  401. req = c.newRequest(op, input, output)
  402. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  403. return
  404. }
  405. // InputService3TestCaseOperation1 API operation for .
  406. //
  407. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  408. // with awserr.Error's Code and Message methods to get detailed information about
  409. // the error.
  410. //
  411. // See the AWS API reference guide for 's
  412. // API operation InputService3TestCaseOperation1 for usage and error information.
  413. func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputService3TestCaseOperation1Input) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) {
  414. req, out := c.InputService3TestCaseOperation1Request(input)
  415. return out, req.Send()
  416. }
  417. // InputService3TestCaseOperation1WithContext is the same as InputService3TestCaseOperation1 with the addition of
  418. // the ability to pass a context and additional request options.
  419. //
  420. // See InputService3TestCaseOperation1 for details on how to use this API operation.
  421. //
  422. // The context must be non-nil and will be used for request cancellation. If
  423. // the context is nil a panic will occur. In the future the SDK may create
  424. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  425. // for more information on using Contexts.
  426. func (c *InputService3ProtocolTest) InputService3TestCaseOperation1WithContext(ctx aws.Context, input *InputService3TestShapeInputService3TestCaseOperation1Input, opts ...request.Option) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) {
  427. req, out := c.InputService3TestCaseOperation1Request(input)
  428. req.SetContext(ctx)
  429. req.ApplyOptions(opts...)
  430. return out, req.Send()
  431. }
  432. type InputService3TestShapeInputService3TestCaseOperation1Input struct {
  433. _ struct{} `type:"structure"`
  434. StructArg *InputService3TestShapeStructType `locationName:"Struct" type:"structure"`
  435. }
  436. // SetStructArg sets the StructArg field's value.
  437. func (s *InputService3TestShapeInputService3TestCaseOperation1Input) SetStructArg(v *InputService3TestShapeStructType) *InputService3TestShapeInputService3TestCaseOperation1Input {
  438. s.StructArg = v
  439. return s
  440. }
  441. type InputService3TestShapeInputService3TestCaseOperation1Output struct {
  442. _ struct{} `type:"structure"`
  443. }
  444. type InputService3TestShapeStructType struct {
  445. _ struct{} `type:"structure"`
  446. ScalarArg *string `locationName:"Scalar" type:"string"`
  447. }
  448. // SetScalarArg sets the ScalarArg field's value.
  449. func (s *InputService3TestShapeStructType) SetScalarArg(v string) *InputService3TestShapeStructType {
  450. s.ScalarArg = &v
  451. return s
  452. }
  453. // InputService4ProtocolTest provides the API operation methods for making requests to
  454. // . See this package's package overview docs
  455. // for details on the service.
  456. //
  457. // InputService4ProtocolTest methods are safe to use concurrently. It is not safe to
  458. // modify mutate any of the struct's properties though.
  459. type InputService4ProtocolTest struct {
  460. *client.Client
  461. }
  462. // New creates a new instance of the InputService4ProtocolTest client with a session.
  463. // If additional configuration is needed for the client instance use the optional
  464. // aws.Config parameter to add your extra config.
  465. //
  466. // Example:
  467. // // Create a InputService4ProtocolTest client from just a session.
  468. // svc := inputservice4protocoltest.New(mySession)
  469. //
  470. // // Create a InputService4ProtocolTest client with additional configuration
  471. // svc := inputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  472. func NewInputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService4ProtocolTest {
  473. c := p.ClientConfig("inputservice4protocoltest", cfgs...)
  474. return newInputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  475. }
  476. // newClient creates, initializes and returns a new service client instance.
  477. func newInputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService4ProtocolTest {
  478. svc := &InputService4ProtocolTest{
  479. Client: client.New(
  480. cfg,
  481. metadata.ClientInfo{
  482. ServiceName: "InputService4ProtocolTest",
  483. ServiceID: "InputService4ProtocolTest",
  484. SigningName: signingName,
  485. SigningRegion: signingRegion,
  486. Endpoint: endpoint,
  487. APIVersion: "2014-01-01",
  488. },
  489. handlers,
  490. ),
  491. }
  492. // Handlers
  493. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  494. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  495. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  496. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  497. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  498. return svc
  499. }
  500. // newRequest creates a new request for a InputService4ProtocolTest operation and runs any
  501. // custom request initialization.
  502. func (c *InputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  503. req := c.NewRequest(op, params, data)
  504. return req
  505. }
  506. const opInputService4TestCaseOperation1 = "OperationName"
  507. // InputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
  508. // client's request for the InputService4TestCaseOperation1 operation. The "output" return
  509. // value will be populated with the request's response once the request completes
  510. // successfully.
  511. //
  512. // Use "Send" method on the returned Request to send the API call to the service.
  513. // the "output" return value is not valid until after Send returns without error.
  514. //
  515. // See InputService4TestCaseOperation1 for more information on using the InputService4TestCaseOperation1
  516. // API call, and error handling.
  517. //
  518. // This method is useful when you want to inject custom logic or configuration
  519. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  520. //
  521. //
  522. // // Example sending a request using the InputService4TestCaseOperation1Request method.
  523. // req, resp := client.InputService4TestCaseOperation1Request(params)
  524. //
  525. // err := req.Send()
  526. // if err == nil { // resp is now filled
  527. // fmt.Println(resp)
  528. // }
  529. func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputService4TestCaseOperation1Input) (req *request.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) {
  530. op := &request.Operation{
  531. Name: opInputService4TestCaseOperation1,
  532. HTTPPath: "/",
  533. }
  534. if input == nil {
  535. input = &InputService4TestShapeInputService4TestCaseOperation1Input{}
  536. }
  537. output = &InputService4TestShapeInputService4TestCaseOperation1Output{}
  538. req = c.newRequest(op, input, output)
  539. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  540. return
  541. }
  542. // InputService4TestCaseOperation1 API operation for .
  543. //
  544. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  545. // with awserr.Error's Code and Message methods to get detailed information about
  546. // the error.
  547. //
  548. // See the AWS API reference guide for 's
  549. // API operation InputService4TestCaseOperation1 for usage and error information.
  550. func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputService4TestCaseOperation1Input) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) {
  551. req, out := c.InputService4TestCaseOperation1Request(input)
  552. return out, req.Send()
  553. }
  554. // InputService4TestCaseOperation1WithContext is the same as InputService4TestCaseOperation1 with the addition of
  555. // the ability to pass a context and additional request options.
  556. //
  557. // See InputService4TestCaseOperation1 for details on how to use this API operation.
  558. //
  559. // The context must be non-nil and will be used for request cancellation. If
  560. // the context is nil a panic will occur. In the future the SDK may create
  561. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  562. // for more information on using Contexts.
  563. func (c *InputService4ProtocolTest) InputService4TestCaseOperation1WithContext(ctx aws.Context, input *InputService4TestShapeInputService4TestCaseOperation1Input, opts ...request.Option) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) {
  564. req, out := c.InputService4TestCaseOperation1Request(input)
  565. req.SetContext(ctx)
  566. req.ApplyOptions(opts...)
  567. return out, req.Send()
  568. }
  569. type InputService4TestShapeInputService4TestCaseOperation1Input struct {
  570. _ struct{} `type:"structure"`
  571. ListBools []*bool `type:"list"`
  572. ListFloats []*float64 `type:"list"`
  573. ListIntegers []*int64 `type:"list"`
  574. ListStrings []*string `type:"list"`
  575. }
  576. // SetListBools sets the ListBools field's value.
  577. func (s *InputService4TestShapeInputService4TestCaseOperation1Input) SetListBools(v []*bool) *InputService4TestShapeInputService4TestCaseOperation1Input {
  578. s.ListBools = v
  579. return s
  580. }
  581. // SetListFloats sets the ListFloats field's value.
  582. func (s *InputService4TestShapeInputService4TestCaseOperation1Input) SetListFloats(v []*float64) *InputService4TestShapeInputService4TestCaseOperation1Input {
  583. s.ListFloats = v
  584. return s
  585. }
  586. // SetListIntegers sets the ListIntegers field's value.
  587. func (s *InputService4TestShapeInputService4TestCaseOperation1Input) SetListIntegers(v []*int64) *InputService4TestShapeInputService4TestCaseOperation1Input {
  588. s.ListIntegers = v
  589. return s
  590. }
  591. // SetListStrings sets the ListStrings field's value.
  592. func (s *InputService4TestShapeInputService4TestCaseOperation1Input) SetListStrings(v []*string) *InputService4TestShapeInputService4TestCaseOperation1Input {
  593. s.ListStrings = v
  594. return s
  595. }
  596. type InputService4TestShapeInputService4TestCaseOperation1Output struct {
  597. _ struct{} `type:"structure"`
  598. }
  599. // InputService5ProtocolTest provides the API operation methods for making requests to
  600. // . See this package's package overview docs
  601. // for details on the service.
  602. //
  603. // InputService5ProtocolTest methods are safe to use concurrently. It is not safe to
  604. // modify mutate any of the struct's properties though.
  605. type InputService5ProtocolTest struct {
  606. *client.Client
  607. }
  608. // New creates a new instance of the InputService5ProtocolTest client with a session.
  609. // If additional configuration is needed for the client instance use the optional
  610. // aws.Config parameter to add your extra config.
  611. //
  612. // Example:
  613. // // Create a InputService5ProtocolTest client from just a session.
  614. // svc := inputservice5protocoltest.New(mySession)
  615. //
  616. // // Create a InputService5ProtocolTest client with additional configuration
  617. // svc := inputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  618. func NewInputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService5ProtocolTest {
  619. c := p.ClientConfig("inputservice5protocoltest", cfgs...)
  620. return newInputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  621. }
  622. // newClient creates, initializes and returns a new service client instance.
  623. func newInputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService5ProtocolTest {
  624. svc := &InputService5ProtocolTest{
  625. Client: client.New(
  626. cfg,
  627. metadata.ClientInfo{
  628. ServiceName: "InputService5ProtocolTest",
  629. ServiceID: "InputService5ProtocolTest",
  630. SigningName: signingName,
  631. SigningRegion: signingRegion,
  632. Endpoint: endpoint,
  633. APIVersion: "2014-01-01",
  634. },
  635. handlers,
  636. ),
  637. }
  638. // Handlers
  639. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  640. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  641. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  642. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  643. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  644. return svc
  645. }
  646. // newRequest creates a new request for a InputService5ProtocolTest operation and runs any
  647. // custom request initialization.
  648. func (c *InputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  649. req := c.NewRequest(op, params, data)
  650. return req
  651. }
  652. const opInputService5TestCaseOperation1 = "OperationName"
  653. // InputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
  654. // client's request for the InputService5TestCaseOperation1 operation. The "output" return
  655. // value will be populated with the request's response once the request completes
  656. // successfully.
  657. //
  658. // Use "Send" method on the returned Request to send the API call to the service.
  659. // the "output" return value is not valid until after Send returns without error.
  660. //
  661. // See InputService5TestCaseOperation1 for more information on using the InputService5TestCaseOperation1
  662. // API call, and error handling.
  663. //
  664. // This method is useful when you want to inject custom logic or configuration
  665. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  666. //
  667. //
  668. // // Example sending a request using the InputService5TestCaseOperation1Request method.
  669. // req, resp := client.InputService5TestCaseOperation1Request(params)
  670. //
  671. // err := req.Send()
  672. // if err == nil { // resp is now filled
  673. // fmt.Println(resp)
  674. // }
  675. func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputService5TestCaseOperation1Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) {
  676. op := &request.Operation{
  677. Name: opInputService5TestCaseOperation1,
  678. HTTPPath: "/",
  679. }
  680. if input == nil {
  681. input = &InputService5TestShapeInputService5TestCaseOperation1Input{}
  682. }
  683. output = &InputService5TestShapeInputService5TestCaseOperation1Output{}
  684. req = c.newRequest(op, input, output)
  685. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  686. return
  687. }
  688. // InputService5TestCaseOperation1 API operation for .
  689. //
  690. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  691. // with awserr.Error's Code and Message methods to get detailed information about
  692. // the error.
  693. //
  694. // See the AWS API reference guide for 's
  695. // API operation InputService5TestCaseOperation1 for usage and error information.
  696. func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputService5TestCaseOperation1Input) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) {
  697. req, out := c.InputService5TestCaseOperation1Request(input)
  698. return out, req.Send()
  699. }
  700. // InputService5TestCaseOperation1WithContext is the same as InputService5TestCaseOperation1 with the addition of
  701. // the ability to pass a context and additional request options.
  702. //
  703. // See InputService5TestCaseOperation1 for details on how to use this API operation.
  704. //
  705. // The context must be non-nil and will be used for request cancellation. If
  706. // the context is nil a panic will occur. In the future the SDK may create
  707. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  708. // for more information on using Contexts.
  709. func (c *InputService5ProtocolTest) InputService5TestCaseOperation1WithContext(ctx aws.Context, input *InputService5TestShapeInputService5TestCaseOperation1Input, opts ...request.Option) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) {
  710. req, out := c.InputService5TestCaseOperation1Request(input)
  711. req.SetContext(ctx)
  712. req.ApplyOptions(opts...)
  713. return out, req.Send()
  714. }
  715. type InputService5TestShapeInputService5TestCaseOperation1Input struct {
  716. _ struct{} `type:"structure"`
  717. ListArg []*string `locationName:"ListMemberName" locationNameList:"item" type:"list"`
  718. }
  719. // SetListArg sets the ListArg field's value.
  720. func (s *InputService5TestShapeInputService5TestCaseOperation1Input) SetListArg(v []*string) *InputService5TestShapeInputService5TestCaseOperation1Input {
  721. s.ListArg = v
  722. return s
  723. }
  724. type InputService5TestShapeInputService5TestCaseOperation1Output struct {
  725. _ struct{} `type:"structure"`
  726. }
  727. // InputService6ProtocolTest provides the API operation methods for making requests to
  728. // . See this package's package overview docs
  729. // for details on the service.
  730. //
  731. // InputService6ProtocolTest methods are safe to use concurrently. It is not safe to
  732. // modify mutate any of the struct's properties though.
  733. type InputService6ProtocolTest struct {
  734. *client.Client
  735. }
  736. // New creates a new instance of the InputService6ProtocolTest client with a session.
  737. // If additional configuration is needed for the client instance use the optional
  738. // aws.Config parameter to add your extra config.
  739. //
  740. // Example:
  741. // // Create a InputService6ProtocolTest client from just a session.
  742. // svc := inputservice6protocoltest.New(mySession)
  743. //
  744. // // Create a InputService6ProtocolTest client with additional configuration
  745. // svc := inputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  746. func NewInputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService6ProtocolTest {
  747. c := p.ClientConfig("inputservice6protocoltest", cfgs...)
  748. return newInputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  749. }
  750. // newClient creates, initializes and returns a new service client instance.
  751. func newInputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService6ProtocolTest {
  752. svc := &InputService6ProtocolTest{
  753. Client: client.New(
  754. cfg,
  755. metadata.ClientInfo{
  756. ServiceName: "InputService6ProtocolTest",
  757. ServiceID: "InputService6ProtocolTest",
  758. SigningName: signingName,
  759. SigningRegion: signingRegion,
  760. Endpoint: endpoint,
  761. APIVersion: "2014-01-01",
  762. },
  763. handlers,
  764. ),
  765. }
  766. // Handlers
  767. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  768. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  769. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  770. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  771. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  772. return svc
  773. }
  774. // newRequest creates a new request for a InputService6ProtocolTest operation and runs any
  775. // custom request initialization.
  776. func (c *InputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  777. req := c.NewRequest(op, params, data)
  778. return req
  779. }
  780. const opInputService6TestCaseOperation1 = "OperationName"
  781. // InputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
  782. // client's request for the InputService6TestCaseOperation1 operation. The "output" return
  783. // value will be populated with the request's response once the request completes
  784. // successfully.
  785. //
  786. // Use "Send" method on the returned Request to send the API call to the service.
  787. // the "output" return value is not valid until after Send returns without error.
  788. //
  789. // See InputService6TestCaseOperation1 for more information on using the InputService6TestCaseOperation1
  790. // API call, and error handling.
  791. //
  792. // This method is useful when you want to inject custom logic or configuration
  793. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  794. //
  795. //
  796. // // Example sending a request using the InputService6TestCaseOperation1Request method.
  797. // req, resp := client.InputService6TestCaseOperation1Request(params)
  798. //
  799. // err := req.Send()
  800. // if err == nil { // resp is now filled
  801. // fmt.Println(resp)
  802. // }
  803. func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputService6TestCaseOperation1Input) (req *request.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) {
  804. op := &request.Operation{
  805. Name: opInputService6TestCaseOperation1,
  806. HTTPPath: "/",
  807. }
  808. if input == nil {
  809. input = &InputService6TestShapeInputService6TestCaseOperation1Input{}
  810. }
  811. output = &InputService6TestShapeInputService6TestCaseOperation1Output{}
  812. req = c.newRequest(op, input, output)
  813. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  814. return
  815. }
  816. // InputService6TestCaseOperation1 API operation for .
  817. //
  818. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  819. // with awserr.Error's Code and Message methods to get detailed information about
  820. // the error.
  821. //
  822. // See the AWS API reference guide for 's
  823. // API operation InputService6TestCaseOperation1 for usage and error information.
  824. func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputService6TestCaseOperation1Input) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) {
  825. req, out := c.InputService6TestCaseOperation1Request(input)
  826. return out, req.Send()
  827. }
  828. // InputService6TestCaseOperation1WithContext is the same as InputService6TestCaseOperation1 with the addition of
  829. // the ability to pass a context and additional request options.
  830. //
  831. // See InputService6TestCaseOperation1 for details on how to use this API operation.
  832. //
  833. // The context must be non-nil and will be used for request cancellation. If
  834. // the context is nil a panic will occur. In the future the SDK may create
  835. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  836. // for more information on using Contexts.
  837. func (c *InputService6ProtocolTest) InputService6TestCaseOperation1WithContext(ctx aws.Context, input *InputService6TestShapeInputService6TestCaseOperation1Input, opts ...request.Option) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) {
  838. req, out := c.InputService6TestCaseOperation1Request(input)
  839. req.SetContext(ctx)
  840. req.ApplyOptions(opts...)
  841. return out, req.Send()
  842. }
  843. type InputService6TestShapeInputService6TestCaseOperation1Input struct {
  844. _ struct{} `type:"structure"`
  845. ListArg []*string `locationName:"ListMemberName" queryName:"ListQueryName" locationNameList:"item" type:"list"`
  846. }
  847. // SetListArg sets the ListArg field's value.
  848. func (s *InputService6TestShapeInputService6TestCaseOperation1Input) SetListArg(v []*string) *InputService6TestShapeInputService6TestCaseOperation1Input {
  849. s.ListArg = v
  850. return s
  851. }
  852. type InputService6TestShapeInputService6TestCaseOperation1Output struct {
  853. _ struct{} `type:"structure"`
  854. }
  855. // InputService7ProtocolTest provides the API operation methods for making requests to
  856. // . See this package's package overview docs
  857. // for details on the service.
  858. //
  859. // InputService7ProtocolTest methods are safe to use concurrently. It is not safe to
  860. // modify mutate any of the struct's properties though.
  861. type InputService7ProtocolTest struct {
  862. *client.Client
  863. }
  864. // New creates a new instance of the InputService7ProtocolTest client with a session.
  865. // If additional configuration is needed for the client instance use the optional
  866. // aws.Config parameter to add your extra config.
  867. //
  868. // Example:
  869. // // Create a InputService7ProtocolTest client from just a session.
  870. // svc := inputservice7protocoltest.New(mySession)
  871. //
  872. // // Create a InputService7ProtocolTest client with additional configuration
  873. // svc := inputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  874. func NewInputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService7ProtocolTest {
  875. c := p.ClientConfig("inputservice7protocoltest", cfgs...)
  876. return newInputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  877. }
  878. // newClient creates, initializes and returns a new service client instance.
  879. func newInputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService7ProtocolTest {
  880. svc := &InputService7ProtocolTest{
  881. Client: client.New(
  882. cfg,
  883. metadata.ClientInfo{
  884. ServiceName: "InputService7ProtocolTest",
  885. ServiceID: "InputService7ProtocolTest",
  886. SigningName: signingName,
  887. SigningRegion: signingRegion,
  888. Endpoint: endpoint,
  889. APIVersion: "2014-01-01",
  890. },
  891. handlers,
  892. ),
  893. }
  894. // Handlers
  895. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  896. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  897. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  898. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  899. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  900. return svc
  901. }
  902. // newRequest creates a new request for a InputService7ProtocolTest operation and runs any
  903. // custom request initialization.
  904. func (c *InputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  905. req := c.NewRequest(op, params, data)
  906. return req
  907. }
  908. const opInputService7TestCaseOperation1 = "OperationName"
  909. // InputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
  910. // client's request for the InputService7TestCaseOperation1 operation. The "output" return
  911. // value will be populated with the request's response once the request completes
  912. // successfully.
  913. //
  914. // Use "Send" method on the returned Request to send the API call to the service.
  915. // the "output" return value is not valid until after Send returns without error.
  916. //
  917. // See InputService7TestCaseOperation1 for more information on using the InputService7TestCaseOperation1
  918. // API call, and error handling.
  919. //
  920. // This method is useful when you want to inject custom logic or configuration
  921. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  922. //
  923. //
  924. // // Example sending a request using the InputService7TestCaseOperation1Request method.
  925. // req, resp := client.InputService7TestCaseOperation1Request(params)
  926. //
  927. // err := req.Send()
  928. // if err == nil { // resp is now filled
  929. // fmt.Println(resp)
  930. // }
  931. func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputService7TestCaseOperation1Input) (req *request.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) {
  932. op := &request.Operation{
  933. Name: opInputService7TestCaseOperation1,
  934. HTTPPath: "/",
  935. }
  936. if input == nil {
  937. input = &InputService7TestShapeInputService7TestCaseOperation1Input{}
  938. }
  939. output = &InputService7TestShapeInputService7TestCaseOperation1Output{}
  940. req = c.newRequest(op, input, output)
  941. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  942. return
  943. }
  944. // InputService7TestCaseOperation1 API operation for .
  945. //
  946. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  947. // with awserr.Error's Code and Message methods to get detailed information about
  948. // the error.
  949. //
  950. // See the AWS API reference guide for 's
  951. // API operation InputService7TestCaseOperation1 for usage and error information.
  952. func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputService7TestCaseOperation1Input) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) {
  953. req, out := c.InputService7TestCaseOperation1Request(input)
  954. return out, req.Send()
  955. }
  956. // InputService7TestCaseOperation1WithContext is the same as InputService7TestCaseOperation1 with the addition of
  957. // the ability to pass a context and additional request options.
  958. //
  959. // See InputService7TestCaseOperation1 for details on how to use this API operation.
  960. //
  961. // The context must be non-nil and will be used for request cancellation. If
  962. // the context is nil a panic will occur. In the future the SDK may create
  963. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  964. // for more information on using Contexts.
  965. func (c *InputService7ProtocolTest) InputService7TestCaseOperation1WithContext(ctx aws.Context, input *InputService7TestShapeInputService7TestCaseOperation1Input, opts ...request.Option) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) {
  966. req, out := c.InputService7TestCaseOperation1Request(input)
  967. req.SetContext(ctx)
  968. req.ApplyOptions(opts...)
  969. return out, req.Send()
  970. }
  971. type InputService7TestShapeInputService7TestCaseOperation1Input struct {
  972. _ struct{} `type:"structure"`
  973. // BlobArg is automatically base64 encoded/decoded by the SDK.
  974. BlobArg []byte `type:"blob"`
  975. }
  976. // SetBlobArg sets the BlobArg field's value.
  977. func (s *InputService7TestShapeInputService7TestCaseOperation1Input) SetBlobArg(v []byte) *InputService7TestShapeInputService7TestCaseOperation1Input {
  978. s.BlobArg = v
  979. return s
  980. }
  981. type InputService7TestShapeInputService7TestCaseOperation1Output struct {
  982. _ struct{} `type:"structure"`
  983. }
  984. // InputService8ProtocolTest provides the API operation methods for making requests to
  985. // . See this package's package overview docs
  986. // for details on the service.
  987. //
  988. // InputService8ProtocolTest methods are safe to use concurrently. It is not safe to
  989. // modify mutate any of the struct's properties though.
  990. type InputService8ProtocolTest struct {
  991. *client.Client
  992. }
  993. // New creates a new instance of the InputService8ProtocolTest client with a session.
  994. // If additional configuration is needed for the client instance use the optional
  995. // aws.Config parameter to add your extra config.
  996. //
  997. // Example:
  998. // // Create a InputService8ProtocolTest client from just a session.
  999. // svc := inputservice8protocoltest.New(mySession)
  1000. //
  1001. // // Create a InputService8ProtocolTest client with additional configuration
  1002. // svc := inputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  1003. func NewInputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService8ProtocolTest {
  1004. c := p.ClientConfig("inputservice8protocoltest", cfgs...)
  1005. return newInputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  1006. }
  1007. // newClient creates, initializes and returns a new service client instance.
  1008. func newInputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService8ProtocolTest {
  1009. svc := &InputService8ProtocolTest{
  1010. Client: client.New(
  1011. cfg,
  1012. metadata.ClientInfo{
  1013. ServiceName: "InputService8ProtocolTest",
  1014. ServiceID: "InputService8ProtocolTest",
  1015. SigningName: signingName,
  1016. SigningRegion: signingRegion,
  1017. Endpoint: endpoint,
  1018. APIVersion: "2014-01-01",
  1019. },
  1020. handlers,
  1021. ),
  1022. }
  1023. // Handlers
  1024. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1025. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  1026. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  1027. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  1028. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  1029. return svc
  1030. }
  1031. // newRequest creates a new request for a InputService8ProtocolTest operation and runs any
  1032. // custom request initialization.
  1033. func (c *InputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1034. req := c.NewRequest(op, params, data)
  1035. return req
  1036. }
  1037. const opInputService8TestCaseOperation1 = "OperationName"
  1038. // InputService8TestCaseOperation1Request generates a "aws/request.Request" representing the
  1039. // client's request for the InputService8TestCaseOperation1 operation. The "output" return
  1040. // value will be populated with the request's response once the request completes
  1041. // successfully.
  1042. //
  1043. // Use "Send" method on the returned Request to send the API call to the service.
  1044. // the "output" return value is not valid until after Send returns without error.
  1045. //
  1046. // See InputService8TestCaseOperation1 for more information on using the InputService8TestCaseOperation1
  1047. // API call, and error handling.
  1048. //
  1049. // This method is useful when you want to inject custom logic or configuration
  1050. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1051. //
  1052. //
  1053. // // Example sending a request using the InputService8TestCaseOperation1Request method.
  1054. // req, resp := client.InputService8TestCaseOperation1Request(params)
  1055. //
  1056. // err := req.Send()
  1057. // if err == nil { // resp is now filled
  1058. // fmt.Println(resp)
  1059. // }
  1060. func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputService8TestCaseOperation1Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) {
  1061. op := &request.Operation{
  1062. Name: opInputService8TestCaseOperation1,
  1063. HTTPPath: "/",
  1064. }
  1065. if input == nil {
  1066. input = &InputService8TestShapeInputService8TestCaseOperation1Input{}
  1067. }
  1068. output = &InputService8TestShapeInputService8TestCaseOperation1Output{}
  1069. req = c.newRequest(op, input, output)
  1070. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1071. return
  1072. }
  1073. // InputService8TestCaseOperation1 API operation for .
  1074. //
  1075. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1076. // with awserr.Error's Code and Message methods to get detailed information about
  1077. // the error.
  1078. //
  1079. // See the AWS API reference guide for 's
  1080. // API operation InputService8TestCaseOperation1 for usage and error information.
  1081. func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputService8TestCaseOperation1Input) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) {
  1082. req, out := c.InputService8TestCaseOperation1Request(input)
  1083. return out, req.Send()
  1084. }
  1085. // InputService8TestCaseOperation1WithContext is the same as InputService8TestCaseOperation1 with the addition of
  1086. // the ability to pass a context and additional request options.
  1087. //
  1088. // See InputService8TestCaseOperation1 for details on how to use this API operation.
  1089. //
  1090. // The context must be non-nil and will be used for request cancellation. If
  1091. // the context is nil a panic will occur. In the future the SDK may create
  1092. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1093. // for more information on using Contexts.
  1094. func (c *InputService8ProtocolTest) InputService8TestCaseOperation1WithContext(ctx aws.Context, input *InputService8TestShapeInputService8TestCaseOperation1Input, opts ...request.Option) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) {
  1095. req, out := c.InputService8TestCaseOperation1Request(input)
  1096. req.SetContext(ctx)
  1097. req.ApplyOptions(opts...)
  1098. return out, req.Send()
  1099. }
  1100. type InputService8TestShapeInputService8TestCaseOperation1Input struct {
  1101. _ struct{} `type:"structure"`
  1102. TimeArg *time.Time `type:"timestamp"`
  1103. TimeCustom *time.Time `type:"timestamp" timestampFormat:"unixTimestamp"`
  1104. TimeFormat *time.Time `type:"timestamp" timestampFormat:"unixTimestamp"`
  1105. }
  1106. // SetTimeArg sets the TimeArg field's value.
  1107. func (s *InputService8TestShapeInputService8TestCaseOperation1Input) SetTimeArg(v time.Time) *InputService8TestShapeInputService8TestCaseOperation1Input {
  1108. s.TimeArg = &v
  1109. return s
  1110. }
  1111. // SetTimeCustom sets the TimeCustom field's value.
  1112. func (s *InputService8TestShapeInputService8TestCaseOperation1Input) SetTimeCustom(v time.Time) *InputService8TestShapeInputService8TestCaseOperation1Input {
  1113. s.TimeCustom = &v
  1114. return s
  1115. }
  1116. // SetTimeFormat sets the TimeFormat field's value.
  1117. func (s *InputService8TestShapeInputService8TestCaseOperation1Input) SetTimeFormat(v time.Time) *InputService8TestShapeInputService8TestCaseOperation1Input {
  1118. s.TimeFormat = &v
  1119. return s
  1120. }
  1121. type InputService8TestShapeInputService8TestCaseOperation1Output struct {
  1122. _ struct{} `type:"structure"`
  1123. }
  1124. // InputService9ProtocolTest provides the API operation methods for making requests to
  1125. // . See this package's package overview docs
  1126. // for details on the service.
  1127. //
  1128. // InputService9ProtocolTest methods are safe to use concurrently. It is not safe to
  1129. // modify mutate any of the struct's properties though.
  1130. type InputService9ProtocolTest struct {
  1131. *client.Client
  1132. }
  1133. // New creates a new instance of the InputService9ProtocolTest client with a session.
  1134. // If additional configuration is needed for the client instance use the optional
  1135. // aws.Config parameter to add your extra config.
  1136. //
  1137. // Example:
  1138. // // Create a InputService9ProtocolTest client from just a session.
  1139. // svc := inputservice9protocoltest.New(mySession)
  1140. //
  1141. // // Create a InputService9ProtocolTest client with additional configuration
  1142. // svc := inputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  1143. func NewInputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService9ProtocolTest {
  1144. c := p.ClientConfig("inputservice9protocoltest", cfgs...)
  1145. return newInputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  1146. }
  1147. // newClient creates, initializes and returns a new service client instance.
  1148. func newInputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService9ProtocolTest {
  1149. svc := &InputService9ProtocolTest{
  1150. Client: client.New(
  1151. cfg,
  1152. metadata.ClientInfo{
  1153. ServiceName: "InputService9ProtocolTest",
  1154. ServiceID: "InputService9ProtocolTest",
  1155. SigningName: signingName,
  1156. SigningRegion: signingRegion,
  1157. Endpoint: endpoint,
  1158. APIVersion: "2014-01-01",
  1159. },
  1160. handlers,
  1161. ),
  1162. }
  1163. // Handlers
  1164. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1165. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  1166. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  1167. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  1168. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  1169. return svc
  1170. }
  1171. // newRequest creates a new request for a InputService9ProtocolTest operation and runs any
  1172. // custom request initialization.
  1173. func (c *InputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1174. req := c.NewRequest(op, params, data)
  1175. return req
  1176. }
  1177. const opInputService9TestCaseOperation1 = "OperationName"
  1178. // InputService9TestCaseOperation1Request generates a "aws/request.Request" representing the
  1179. // client's request for the InputService9TestCaseOperation1 operation. The "output" return
  1180. // value will be populated with the request's response once the request completes
  1181. // successfully.
  1182. //
  1183. // Use "Send" method on the returned Request to send the API call to the service.
  1184. // the "output" return value is not valid until after Send returns without error.
  1185. //
  1186. // See InputService9TestCaseOperation1 for more information on using the InputService9TestCaseOperation1
  1187. // API call, and error handling.
  1188. //
  1189. // This method is useful when you want to inject custom logic or configuration
  1190. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1191. //
  1192. //
  1193. // // Example sending a request using the InputService9TestCaseOperation1Request method.
  1194. // req, resp := client.InputService9TestCaseOperation1Request(params)
  1195. //
  1196. // err := req.Send()
  1197. // if err == nil { // resp is now filled
  1198. // fmt.Println(resp)
  1199. // }
  1200. func (c *InputService9ProtocolTest) InputService9TestCaseOperation1Request(input *InputService9TestShapeInputService9TestCaseOperation1Input) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation1Output) {
  1201. op := &request.Operation{
  1202. Name: opInputService9TestCaseOperation1,
  1203. HTTPPath: "/",
  1204. }
  1205. if input == nil {
  1206. input = &InputService9TestShapeInputService9TestCaseOperation1Input{}
  1207. }
  1208. output = &InputService9TestShapeInputService9TestCaseOperation1Output{}
  1209. req = c.newRequest(op, input, output)
  1210. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1211. return
  1212. }
  1213. // InputService9TestCaseOperation1 API operation for .
  1214. //
  1215. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1216. // with awserr.Error's Code and Message methods to get detailed information about
  1217. // the error.
  1218. //
  1219. // See the AWS API reference guide for 's
  1220. // API operation InputService9TestCaseOperation1 for usage and error information.
  1221. func (c *InputService9ProtocolTest) InputService9TestCaseOperation1(input *InputService9TestShapeInputService9TestCaseOperation1Input) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) {
  1222. req, out := c.InputService9TestCaseOperation1Request(input)
  1223. return out, req.Send()
  1224. }
  1225. // InputService9TestCaseOperation1WithContext is the same as InputService9TestCaseOperation1 with the addition of
  1226. // the ability to pass a context and additional request options.
  1227. //
  1228. // See InputService9TestCaseOperation1 for details on how to use this API operation.
  1229. //
  1230. // The context must be non-nil and will be used for request cancellation. If
  1231. // the context is nil a panic will occur. In the future the SDK may create
  1232. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1233. // for more information on using Contexts.
  1234. func (c *InputService9ProtocolTest) InputService9TestCaseOperation1WithContext(ctx aws.Context, input *InputService9TestShapeInputService9TestCaseOperation1Input, opts ...request.Option) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) {
  1235. req, out := c.InputService9TestCaseOperation1Request(input)
  1236. req.SetContext(ctx)
  1237. req.ApplyOptions(opts...)
  1238. return out, req.Send()
  1239. }
  1240. const opInputService9TestCaseOperation2 = "OperationName"
  1241. // InputService9TestCaseOperation2Request generates a "aws/request.Request" representing the
  1242. // client's request for the InputService9TestCaseOperation2 operation. The "output" return
  1243. // value will be populated with the request's response once the request completes
  1244. // successfully.
  1245. //
  1246. // Use "Send" method on the returned Request to send the API call to the service.
  1247. // the "output" return value is not valid until after Send returns without error.
  1248. //
  1249. // See InputService9TestCaseOperation2 for more information on using the InputService9TestCaseOperation2
  1250. // API call, and error handling.
  1251. //
  1252. // This method is useful when you want to inject custom logic or configuration
  1253. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1254. //
  1255. //
  1256. // // Example sending a request using the InputService9TestCaseOperation2Request method.
  1257. // req, resp := client.InputService9TestCaseOperation2Request(params)
  1258. //
  1259. // err := req.Send()
  1260. // if err == nil { // resp is now filled
  1261. // fmt.Println(resp)
  1262. // }
  1263. func (c *InputService9ProtocolTest) InputService9TestCaseOperation2Request(input *InputService9TestShapeInputService9TestCaseOperation2Input) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation2Output) {
  1264. op := &request.Operation{
  1265. Name: opInputService9TestCaseOperation2,
  1266. HTTPPath: "/",
  1267. }
  1268. if input == nil {
  1269. input = &InputService9TestShapeInputService9TestCaseOperation2Input{}
  1270. }
  1271. output = &InputService9TestShapeInputService9TestCaseOperation2Output{}
  1272. req = c.newRequest(op, input, output)
  1273. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1274. return
  1275. }
  1276. // InputService9TestCaseOperation2 API operation for .
  1277. //
  1278. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1279. // with awserr.Error's Code and Message methods to get detailed information about
  1280. // the error.
  1281. //
  1282. // See the AWS API reference guide for 's
  1283. // API operation InputService9TestCaseOperation2 for usage and error information.
  1284. func (c *InputService9ProtocolTest) InputService9TestCaseOperation2(input *InputService9TestShapeInputService9TestCaseOperation2Input) (*InputService9TestShapeInputService9TestCaseOperation2Output, error) {
  1285. req, out := c.InputService9TestCaseOperation2Request(input)
  1286. return out, req.Send()
  1287. }
  1288. // InputService9TestCaseOperation2WithContext is the same as InputService9TestCaseOperation2 with the addition of
  1289. // the ability to pass a context and additional request options.
  1290. //
  1291. // See InputService9TestCaseOperation2 for details on how to use this API operation.
  1292. //
  1293. // The context must be non-nil and will be used for request cancellation. If
  1294. // the context is nil a panic will occur. In the future the SDK may create
  1295. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1296. // for more information on using Contexts.
  1297. func (c *InputService9ProtocolTest) InputService9TestCaseOperation2WithContext(ctx aws.Context, input *InputService9TestShapeInputService9TestCaseOperation2Input, opts ...request.Option) (*InputService9TestShapeInputService9TestCaseOperation2Output, error) {
  1298. req, out := c.InputService9TestCaseOperation2Request(input)
  1299. req.SetContext(ctx)
  1300. req.ApplyOptions(opts...)
  1301. return out, req.Send()
  1302. }
  1303. type InputService9TestShapeInputService9TestCaseOperation1Input struct {
  1304. _ struct{} `type:"structure"`
  1305. Token *string `type:"string" idempotencyToken:"true"`
  1306. }
  1307. // SetToken sets the Token field's value.
  1308. func (s *InputService9TestShapeInputService9TestCaseOperation1Input) SetToken(v string) *InputService9TestShapeInputService9TestCaseOperation1Input {
  1309. s.Token = &v
  1310. return s
  1311. }
  1312. type InputService9TestShapeInputService9TestCaseOperation1Output struct {
  1313. _ struct{} `type:"structure"`
  1314. }
  1315. type InputService9TestShapeInputService9TestCaseOperation2Input struct {
  1316. _ struct{} `type:"structure"`
  1317. Token *string `type:"string" idempotencyToken:"true"`
  1318. }
  1319. // SetToken sets the Token field's value.
  1320. func (s *InputService9TestShapeInputService9TestCaseOperation2Input) SetToken(v string) *InputService9TestShapeInputService9TestCaseOperation2Input {
  1321. s.Token = &v
  1322. return s
  1323. }
  1324. type InputService9TestShapeInputService9TestCaseOperation2Output struct {
  1325. _ struct{} `type:"structure"`
  1326. }
  1327. // InputService10ProtocolTest provides the API operation methods for making requests to
  1328. // . See this package's package overview docs
  1329. // for details on the service.
  1330. //
  1331. // InputService10ProtocolTest methods are safe to use concurrently. It is not safe to
  1332. // modify mutate any of the struct's properties though.
  1333. type InputService10ProtocolTest struct {
  1334. *client.Client
  1335. }
  1336. // New creates a new instance of the InputService10ProtocolTest client with a session.
  1337. // If additional configuration is needed for the client instance use the optional
  1338. // aws.Config parameter to add your extra config.
  1339. //
  1340. // Example:
  1341. // // Create a InputService10ProtocolTest client from just a session.
  1342. // svc := inputservice10protocoltest.New(mySession)
  1343. //
  1344. // // Create a InputService10ProtocolTest client with additional configuration
  1345. // svc := inputservice10protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  1346. func NewInputService10ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService10ProtocolTest {
  1347. c := p.ClientConfig("inputservice10protocoltest", cfgs...)
  1348. return newInputService10ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  1349. }
  1350. // newClient creates, initializes and returns a new service client instance.
  1351. func newInputService10ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService10ProtocolTest {
  1352. svc := &InputService10ProtocolTest{
  1353. Client: client.New(
  1354. cfg,
  1355. metadata.ClientInfo{
  1356. ServiceName: "InputService10ProtocolTest",
  1357. ServiceID: "InputService10ProtocolTest",
  1358. SigningName: signingName,
  1359. SigningRegion: signingRegion,
  1360. Endpoint: endpoint,
  1361. APIVersion: "2014-01-01",
  1362. },
  1363. handlers,
  1364. ),
  1365. }
  1366. // Handlers
  1367. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1368. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  1369. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  1370. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  1371. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  1372. return svc
  1373. }
  1374. // newRequest creates a new request for a InputService10ProtocolTest operation and runs any
  1375. // custom request initialization.
  1376. func (c *InputService10ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1377. req := c.NewRequest(op, params, data)
  1378. return req
  1379. }
  1380. const opInputService10TestCaseOperation1 = "OperationName"
  1381. // InputService10TestCaseOperation1Request generates a "aws/request.Request" representing the
  1382. // client's request for the InputService10TestCaseOperation1 operation. The "output" return
  1383. // value will be populated with the request's response once the request completes
  1384. // successfully.
  1385. //
  1386. // Use "Send" method on the returned Request to send the API call to the service.
  1387. // the "output" return value is not valid until after Send returns without error.
  1388. //
  1389. // See InputService10TestCaseOperation1 for more information on using the InputService10TestCaseOperation1
  1390. // API call, and error handling.
  1391. //
  1392. // This method is useful when you want to inject custom logic or configuration
  1393. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1394. //
  1395. //
  1396. // // Example sending a request using the InputService10TestCaseOperation1Request method.
  1397. // req, resp := client.InputService10TestCaseOperation1Request(params)
  1398. //
  1399. // err := req.Send()
  1400. // if err == nil { // resp is now filled
  1401. // fmt.Println(resp)
  1402. // }
  1403. func (c *InputService10ProtocolTest) InputService10TestCaseOperation1Request(input *InputService10TestShapeInputService10TestCaseOperation1Input) (req *request.Request, output *InputService10TestShapeInputService10TestCaseOperation1Output) {
  1404. op := &request.Operation{
  1405. Name: opInputService10TestCaseOperation1,
  1406. HTTPPath: "/",
  1407. }
  1408. if input == nil {
  1409. input = &InputService10TestShapeInputService10TestCaseOperation1Input{}
  1410. }
  1411. output = &InputService10TestShapeInputService10TestCaseOperation1Output{}
  1412. req = c.newRequest(op, input, output)
  1413. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1414. return
  1415. }
  1416. // InputService10TestCaseOperation1 API operation for .
  1417. //
  1418. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1419. // with awserr.Error's Code and Message methods to get detailed information about
  1420. // the error.
  1421. //
  1422. // See the AWS API reference guide for 's
  1423. // API operation InputService10TestCaseOperation1 for usage and error information.
  1424. func (c *InputService10ProtocolTest) InputService10TestCaseOperation1(input *InputService10TestShapeInputService10TestCaseOperation1Input) (*InputService10TestShapeInputService10TestCaseOperation1Output, error) {
  1425. req, out := c.InputService10TestCaseOperation1Request(input)
  1426. return out, req.Send()
  1427. }
  1428. // InputService10TestCaseOperation1WithContext is the same as InputService10TestCaseOperation1 with the addition of
  1429. // the ability to pass a context and additional request options.
  1430. //
  1431. // See InputService10TestCaseOperation1 for details on how to use this API operation.
  1432. //
  1433. // The context must be non-nil and will be used for request cancellation. If
  1434. // the context is nil a panic will occur. In the future the SDK may create
  1435. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1436. // for more information on using Contexts.
  1437. func (c *InputService10ProtocolTest) InputService10TestCaseOperation1WithContext(ctx aws.Context, input *InputService10TestShapeInputService10TestCaseOperation1Input, opts ...request.Option) (*InputService10TestShapeInputService10TestCaseOperation1Output, error) {
  1438. req, out := c.InputService10TestCaseOperation1Request(input)
  1439. req.SetContext(ctx)
  1440. req.ApplyOptions(opts...)
  1441. return out, req.Send()
  1442. }
  1443. const opInputService10TestCaseOperation2 = "OperationName"
  1444. // InputService10TestCaseOperation2Request generates a "aws/request.Request" representing the
  1445. // client's request for the InputService10TestCaseOperation2 operation. The "output" return
  1446. // value will be populated with the request's response once the request completes
  1447. // successfully.
  1448. //
  1449. // Use "Send" method on the returned Request to send the API call to the service.
  1450. // the "output" return value is not valid until after Send returns without error.
  1451. //
  1452. // See InputService10TestCaseOperation2 for more information on using the InputService10TestCaseOperation2
  1453. // API call, and error handling.
  1454. //
  1455. // This method is useful when you want to inject custom logic or configuration
  1456. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1457. //
  1458. //
  1459. // // Example sending a request using the InputService10TestCaseOperation2Request method.
  1460. // req, resp := client.InputService10TestCaseOperation2Request(params)
  1461. //
  1462. // err := req.Send()
  1463. // if err == nil { // resp is now filled
  1464. // fmt.Println(resp)
  1465. // }
  1466. func (c *InputService10ProtocolTest) InputService10TestCaseOperation2Request(input *InputService10TestShapeInputService10TestCaseOperation2Input) (req *request.Request, output *InputService10TestShapeInputService10TestCaseOperation2Output) {
  1467. op := &request.Operation{
  1468. Name: opInputService10TestCaseOperation2,
  1469. HTTPPath: "/",
  1470. }
  1471. if input == nil {
  1472. input = &InputService10TestShapeInputService10TestCaseOperation2Input{}
  1473. }
  1474. output = &InputService10TestShapeInputService10TestCaseOperation2Output{}
  1475. req = c.newRequest(op, input, output)
  1476. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1477. return
  1478. }
  1479. // InputService10TestCaseOperation2 API operation for .
  1480. //
  1481. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1482. // with awserr.Error's Code and Message methods to get detailed information about
  1483. // the error.
  1484. //
  1485. // See the AWS API reference guide for 's
  1486. // API operation InputService10TestCaseOperation2 for usage and error information.
  1487. func (c *InputService10ProtocolTest) InputService10TestCaseOperation2(input *InputService10TestShapeInputService10TestCaseOperation2Input) (*InputService10TestShapeInputService10TestCaseOperation2Output, error) {
  1488. req, out := c.InputService10TestCaseOperation2Request(input)
  1489. return out, req.Send()
  1490. }
  1491. // InputService10TestCaseOperation2WithContext is the same as InputService10TestCaseOperation2 with the addition of
  1492. // the ability to pass a context and additional request options.
  1493. //
  1494. // See InputService10TestCaseOperation2 for details on how to use this API operation.
  1495. //
  1496. // The context must be non-nil and will be used for request cancellation. If
  1497. // the context is nil a panic will occur. In the future the SDK may create
  1498. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1499. // for more information on using Contexts.
  1500. func (c *InputService10ProtocolTest) InputService10TestCaseOperation2WithContext(ctx aws.Context, input *InputService10TestShapeInputService10TestCaseOperation2Input, opts ...request.Option) (*InputService10TestShapeInputService10TestCaseOperation2Output, error) {
  1501. req, out := c.InputService10TestCaseOperation2Request(input)
  1502. req.SetContext(ctx)
  1503. req.ApplyOptions(opts...)
  1504. return out, req.Send()
  1505. }
  1506. type InputService10TestShapeInputService10TestCaseOperation1Input struct {
  1507. _ struct{} `type:"structure"`
  1508. FooEnum *string `type:"string" enum:"InputService10TestShapeEnumType"`
  1509. ListEnums []*string `type:"list"`
  1510. }
  1511. // SetFooEnum sets the FooEnum field's value.
  1512. func (s *InputService10TestShapeInputService10TestCaseOperation1Input) SetFooEnum(v string) *InputService10TestShapeInputService10TestCaseOperation1Input {
  1513. s.FooEnum = &v
  1514. return s
  1515. }
  1516. // SetListEnums sets the ListEnums field's value.
  1517. func (s *InputService10TestShapeInputService10TestCaseOperation1Input) SetListEnums(v []*string) *InputService10TestShapeInputService10TestCaseOperation1Input {
  1518. s.ListEnums = v
  1519. return s
  1520. }
  1521. type InputService10TestShapeInputService10TestCaseOperation1Output struct {
  1522. _ struct{} `type:"structure"`
  1523. }
  1524. type InputService10TestShapeInputService10TestCaseOperation2Input struct {
  1525. _ struct{} `type:"structure"`
  1526. FooEnum *string `type:"string" enum:"InputService10TestShapeEnumType"`
  1527. ListEnums []*string `type:"list"`
  1528. }
  1529. // SetFooEnum sets the FooEnum field's value.
  1530. func (s *InputService10TestShapeInputService10TestCaseOperation2Input) SetFooEnum(v string) *InputService10TestShapeInputService10TestCaseOperation2Input {
  1531. s.FooEnum = &v
  1532. return s
  1533. }
  1534. // SetListEnums sets the ListEnums field's value.
  1535. func (s *InputService10TestShapeInputService10TestCaseOperation2Input) SetListEnums(v []*string) *InputService10TestShapeInputService10TestCaseOperation2Input {
  1536. s.ListEnums = v
  1537. return s
  1538. }
  1539. type InputService10TestShapeInputService10TestCaseOperation2Output struct {
  1540. _ struct{} `type:"structure"`
  1541. }
  1542. const (
  1543. // EnumTypeFoo is a InputService10TestShapeEnumType enum value
  1544. EnumTypeFoo = "foo"
  1545. // EnumTypeBar is a InputService10TestShapeEnumType enum value
  1546. EnumTypeBar = "bar"
  1547. )
  1548. // InputService11ProtocolTest provides the API operation methods for making requests to
  1549. // . See this package's package overview docs
  1550. // for details on the service.
  1551. //
  1552. // InputService11ProtocolTest methods are safe to use concurrently. It is not safe to
  1553. // modify mutate any of the struct's properties though.
  1554. type InputService11ProtocolTest struct {
  1555. *client.Client
  1556. }
  1557. // New creates a new instance of the InputService11ProtocolTest client with a session.
  1558. // If additional configuration is needed for the client instance use the optional
  1559. // aws.Config parameter to add your extra config.
  1560. //
  1561. // Example:
  1562. // // Create a InputService11ProtocolTest client from just a session.
  1563. // svc := inputservice11protocoltest.New(mySession)
  1564. //
  1565. // // Create a InputService11ProtocolTest client with additional configuration
  1566. // svc := inputservice11protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  1567. func NewInputService11ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService11ProtocolTest {
  1568. c := p.ClientConfig("inputservice11protocoltest", cfgs...)
  1569. return newInputService11ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
  1570. }
  1571. // newClient creates, initializes and returns a new service client instance.
  1572. func newInputService11ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService11ProtocolTest {
  1573. svc := &InputService11ProtocolTest{
  1574. Client: client.New(
  1575. cfg,
  1576. metadata.ClientInfo{
  1577. ServiceName: "InputService11ProtocolTest",
  1578. ServiceID: "InputService11ProtocolTest",
  1579. SigningName: signingName,
  1580. SigningRegion: signingRegion,
  1581. Endpoint: endpoint,
  1582. APIVersion: "2014-01-01",
  1583. },
  1584. handlers,
  1585. ),
  1586. }
  1587. // Handlers
  1588. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1589. svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler)
  1590. svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler)
  1591. svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler)
  1592. svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler)
  1593. return svc
  1594. }
  1595. // newRequest creates a new request for a InputService11ProtocolTest operation and runs any
  1596. // custom request initialization.
  1597. func (c *InputService11ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1598. req := c.NewRequest(op, params, data)
  1599. return req
  1600. }
  1601. const opInputService11TestCaseOperation1 = "StaticOp"
  1602. // InputService11TestCaseOperation1Request generates a "aws/request.Request" representing the
  1603. // client's request for the InputService11TestCaseOperation1 operation. The "output" return
  1604. // value will be populated with the request's response once the request completes
  1605. // successfully.
  1606. //
  1607. // Use "Send" method on the returned Request to send the API call to the service.
  1608. // the "output" return value is not valid until after Send returns without error.
  1609. //
  1610. // See InputService11TestCaseOperation1 for more information on using the InputService11TestCaseOperation1
  1611. // API call, and error handling.
  1612. //
  1613. // This method is useful when you want to inject custom logic or configuration
  1614. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1615. //
  1616. //
  1617. // // Example sending a request using the InputService11TestCaseOperation1Request method.
  1618. // req, resp := client.InputService11TestCaseOperation1Request(params)
  1619. //
  1620. // err := req.Send()
  1621. // if err == nil { // resp is now filled
  1622. // fmt.Println(resp)
  1623. // }
  1624. func (c *InputService11ProtocolTest) InputService11TestCaseOperation1Request(input *InputService11TestShapeInputService11TestCaseOperation1Input) (req *request.Request, output *InputService11TestShapeInputService11TestCaseOperation1Output) {
  1625. op := &request.Operation{
  1626. Name: opInputService11TestCaseOperation1,
  1627. HTTPPath: "/",
  1628. }
  1629. if input == nil {
  1630. input = &InputService11TestShapeInputService11TestCaseOperation1Input{}
  1631. }
  1632. output = &InputService11TestShapeInputService11TestCaseOperation1Output{}
  1633. req = c.newRequest(op, input, output)
  1634. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1635. req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("data-", nil))
  1636. req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
  1637. return
  1638. }
  1639. // InputService11TestCaseOperation1 API operation for .
  1640. //
  1641. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1642. // with awserr.Error's Code and Message methods to get detailed information about
  1643. // the error.
  1644. //
  1645. // See the AWS API reference guide for 's
  1646. // API operation InputService11TestCaseOperation1 for usage and error information.
  1647. func (c *InputService11ProtocolTest) InputService11TestCaseOperation1(input *InputService11TestShapeInputService11TestCaseOperation1Input) (*InputService11TestShapeInputService11TestCaseOperation1Output, error) {
  1648. req, out := c.InputService11TestCaseOperation1Request(input)
  1649. return out, req.Send()
  1650. }
  1651. // InputService11TestCaseOperation1WithContext is the same as InputService11TestCaseOperation1 with the addition of
  1652. // the ability to pass a context and additional request options.
  1653. //
  1654. // See InputService11TestCaseOperation1 for details on how to use this API operation.
  1655. //
  1656. // The context must be non-nil and will be used for request cancellation. If
  1657. // the context is nil a panic will occur. In the future the SDK may create
  1658. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1659. // for more information on using Contexts.
  1660. func (c *InputService11ProtocolTest) InputService11TestCaseOperation1WithContext(ctx aws.Context, input *InputService11TestShapeInputService11TestCaseOperation1Input, opts ...request.Option) (*InputService11TestShapeInputService11TestCaseOperation1Output, error) {
  1661. req, out := c.InputService11TestCaseOperation1Request(input)
  1662. req.SetContext(ctx)
  1663. req.ApplyOptions(opts...)
  1664. return out, req.Send()
  1665. }
  1666. const opInputService11TestCaseOperation2 = "MemberRefOp"
  1667. // InputService11TestCaseOperation2Request generates a "aws/request.Request" representing the
  1668. // client's request for the InputService11TestCaseOperation2 operation. The "output" return
  1669. // value will be populated with the request's response once the request completes
  1670. // successfully.
  1671. //
  1672. // Use "Send" method on the returned Request to send the API call to the service.
  1673. // the "output" return value is not valid until after Send returns without error.
  1674. //
  1675. // See InputService11TestCaseOperation2 for more information on using the InputService11TestCaseOperation2
  1676. // API call, and error handling.
  1677. //
  1678. // This method is useful when you want to inject custom logic or configuration
  1679. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1680. //
  1681. //
  1682. // // Example sending a request using the InputService11TestCaseOperation2Request method.
  1683. // req, resp := client.InputService11TestCaseOperation2Request(params)
  1684. //
  1685. // err := req.Send()
  1686. // if err == nil { // resp is now filled
  1687. // fmt.Println(resp)
  1688. // }
  1689. func (c *InputService11ProtocolTest) InputService11TestCaseOperation2Request(input *InputService11TestShapeInputService11TestCaseOperation2Input) (req *request.Request, output *InputService11TestShapeInputService11TestCaseOperation2Output) {
  1690. op := &request.Operation{
  1691. Name: opInputService11TestCaseOperation2,
  1692. HTTPPath: "/",
  1693. }
  1694. if input == nil {
  1695. input = &InputService11TestShapeInputService11TestCaseOperation2Input{}
  1696. }
  1697. output = &InputService11TestShapeInputService11TestCaseOperation2Output{}
  1698. req = c.newRequest(op, input, output)
  1699. req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1700. req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("foo-{Name}.", input.hostLabels))
  1701. req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
  1702. return
  1703. }
  1704. // InputService11TestCaseOperation2 API operation for .
  1705. //
  1706. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1707. // with awserr.Error's Code and Message methods to get detailed information about
  1708. // the error.
  1709. //
  1710. // See the AWS API reference guide for 's
  1711. // API operation InputService11TestCaseOperation2 for usage and error information.
  1712. func (c *InputService11ProtocolTest) InputService11TestCaseOperation2(input *InputService11TestShapeInputService11TestCaseOperation2Input) (*InputService11TestShapeInputService11TestCaseOperation2Output, error) {
  1713. req, out := c.InputService11TestCaseOperation2Request(input)
  1714. return out, req.Send()
  1715. }
  1716. // InputService11TestCaseOperation2WithContext is the same as InputService11TestCaseOperation2 with the addition of
  1717. // the ability to pass a context and additional request options.
  1718. //
  1719. // See InputService11TestCaseOperation2 for details on how to use this API operation.
  1720. //
  1721. // The context must be non-nil and will be used for request cancellation. If
  1722. // the context is nil a panic will occur. In the future the SDK may create
  1723. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1724. // for more information on using Contexts.
  1725. func (c *InputService11ProtocolTest) InputService11TestCaseOperation2WithContext(ctx aws.Context, input *InputService11TestShapeInputService11TestCaseOperation2Input, opts ...request.Option) (*InputService11TestShapeInputService11TestCaseOperation2Output, error) {
  1726. req, out := c.InputService11TestCaseOperation2Request(input)
  1727. req.SetContext(ctx)
  1728. req.ApplyOptions(opts...)
  1729. return out, req.Send()
  1730. }
  1731. type InputService11TestShapeInputService11TestCaseOperation1Input struct {
  1732. _ struct{} `type:"structure"`
  1733. Name *string `type:"string"`
  1734. }
  1735. // SetName sets the Name field's value.
  1736. func (s *InputService11TestShapeInputService11TestCaseOperation1Input) SetName(v string) *InputService11TestShapeInputService11TestCaseOperation1Input {
  1737. s.Name = &v
  1738. return s
  1739. }
  1740. type InputService11TestShapeInputService11TestCaseOperation1Output struct {
  1741. _ struct{} `type:"structure"`
  1742. }
  1743. type InputService11TestShapeInputService11TestCaseOperation2Input struct {
  1744. _ struct{} `type:"structure"`
  1745. // Name is a required field
  1746. Name *string `type:"string" required:"true"`
  1747. }
  1748. // Validate inspects the fields of the type to determine if they are valid.
  1749. func (s *InputService11TestShapeInputService11TestCaseOperation2Input) Validate() error {
  1750. invalidParams := request.ErrInvalidParams{Context: "InputService11TestShapeInputService11TestCaseOperation2Input"}
  1751. if s.Name == nil {
  1752. invalidParams.Add(request.NewErrParamRequired("Name"))
  1753. }
  1754. if s.Name != nil && len(*s.Name) < 1 {
  1755. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  1756. }
  1757. if invalidParams.Len() > 0 {
  1758. return invalidParams
  1759. }
  1760. return nil
  1761. }
  1762. // SetName sets the Name field's value.
  1763. func (s *InputService11TestShapeInputService11TestCaseOperation2Input) SetName(v string) *InputService11TestShapeInputService11TestCaseOperation2Input {
  1764. s.Name = &v
  1765. return s
  1766. }
  1767. func (s *InputService11TestShapeInputService11TestCaseOperation2Input) hostLabels() map[string]string {
  1768. return map[string]string{
  1769. "Name": aws.StringValue(s.Name),
  1770. }
  1771. }
  1772. type InputService11TestShapeInputService11TestCaseOperation2Output struct {
  1773. _ struct{} `type:"structure"`
  1774. }
  1775. //
  1776. // Tests begin here
  1777. //
  1778. func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) {
  1779. svc := NewInputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1780. input := &InputService1TestShapeInputService1TestCaseOperation1Input{
  1781. Bar: aws.String("val2"),
  1782. Foo: aws.String("val1"),
  1783. }
  1784. req, _ := svc.InputService1TestCaseOperation1Request(input)
  1785. r := req.HTTPRequest
  1786. // build request
  1787. req.Build()
  1788. if req.Error != nil {
  1789. t.Errorf("expect no error, got %v", req.Error)
  1790. }
  1791. // assert body
  1792. if r.Body == nil {
  1793. t.Errorf("expect body not to be nil")
  1794. }
  1795. body, _ := ioutil.ReadAll(r.Body)
  1796. awstesting.AssertQuery(t, `Action=OperationName&Bar=val2&Foo=val1&Version=2014-01-01`, util.Trim(string(body)))
  1797. // assert URL
  1798. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1799. // assert headers
  1800. }
  1801. func TestInputService2ProtocolTestStructureWithLocationNameAndQueryNameAppliedToMembersCase1(t *testing.T) {
  1802. svc := NewInputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1803. input := &InputService2TestShapeInputService2TestCaseOperation1Input{
  1804. Bar: aws.String("val2"),
  1805. Foo: aws.String("val1"),
  1806. Yuck: aws.String("val3"),
  1807. }
  1808. req, _ := svc.InputService2TestCaseOperation1Request(input)
  1809. r := req.HTTPRequest
  1810. // build request
  1811. req.Build()
  1812. if req.Error != nil {
  1813. t.Errorf("expect no error, got %v", req.Error)
  1814. }
  1815. // assert body
  1816. if r.Body == nil {
  1817. t.Errorf("expect body not to be nil")
  1818. }
  1819. body, _ := ioutil.ReadAll(r.Body)
  1820. awstesting.AssertQuery(t, `Action=OperationName&BarLocationName=val2&Foo=val1&Version=2014-01-01&yuckQueryName=val3`, util.Trim(string(body)))
  1821. // assert URL
  1822. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1823. // assert headers
  1824. }
  1825. func TestInputService3ProtocolTestNestedStructureMembersCase1(t *testing.T) {
  1826. svc := NewInputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1827. input := &InputService3TestShapeInputService3TestCaseOperation1Input{
  1828. StructArg: &InputService3TestShapeStructType{
  1829. ScalarArg: aws.String("foo"),
  1830. },
  1831. }
  1832. req, _ := svc.InputService3TestCaseOperation1Request(input)
  1833. r := req.HTTPRequest
  1834. // build request
  1835. req.Build()
  1836. if req.Error != nil {
  1837. t.Errorf("expect no error, got %v", req.Error)
  1838. }
  1839. // assert body
  1840. if r.Body == nil {
  1841. t.Errorf("expect body not to be nil")
  1842. }
  1843. body, _ := ioutil.ReadAll(r.Body)
  1844. awstesting.AssertQuery(t, `Action=OperationName&Struct.Scalar=foo&Version=2014-01-01`, util.Trim(string(body)))
  1845. // assert URL
  1846. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1847. // assert headers
  1848. }
  1849. func TestInputService4ProtocolTestListTypesCase1(t *testing.T) {
  1850. svc := NewInputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1851. input := &InputService4TestShapeInputService4TestCaseOperation1Input{
  1852. ListBools: []*bool{
  1853. aws.Bool(true),
  1854. aws.Bool(false),
  1855. aws.Bool(false),
  1856. },
  1857. ListFloats: []*float64{
  1858. aws.Float64(1.1),
  1859. aws.Float64(2.718),
  1860. aws.Float64(3.14),
  1861. },
  1862. ListIntegers: []*int64{
  1863. aws.Int64(0),
  1864. aws.Int64(1),
  1865. aws.Int64(2),
  1866. },
  1867. ListStrings: []*string{
  1868. aws.String("foo"),
  1869. aws.String("bar"),
  1870. aws.String("baz"),
  1871. },
  1872. }
  1873. req, _ := svc.InputService4TestCaseOperation1Request(input)
  1874. r := req.HTTPRequest
  1875. // build request
  1876. req.Build()
  1877. if req.Error != nil {
  1878. t.Errorf("expect no error, got %v", req.Error)
  1879. }
  1880. // assert body
  1881. if r.Body == nil {
  1882. t.Errorf("expect body not to be nil")
  1883. }
  1884. body, _ := ioutil.ReadAll(r.Body)
  1885. awstesting.AssertQuery(t, `Action=OperationName&ListBools.1=true&ListBools.2=false&ListBools.3=false&ListFloats.1=1.1&ListFloats.2=2.718&ListFloats.3=3.14&ListIntegers.1=0&ListIntegers.2=1&ListIntegers.3=2&ListStrings.1=foo&ListStrings.2=bar&ListStrings.3=baz&Version=2014-01-01`, util.Trim(string(body)))
  1886. // assert URL
  1887. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1888. // assert headers
  1889. }
  1890. func TestInputService5ProtocolTestListWithLocationNameAppliedToMemberCase1(t *testing.T) {
  1891. svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1892. input := &InputService5TestShapeInputService5TestCaseOperation1Input{
  1893. ListArg: []*string{
  1894. aws.String("a"),
  1895. aws.String("b"),
  1896. aws.String("c"),
  1897. },
  1898. }
  1899. req, _ := svc.InputService5TestCaseOperation1Request(input)
  1900. r := req.HTTPRequest
  1901. // build request
  1902. req.Build()
  1903. if req.Error != nil {
  1904. t.Errorf("expect no error, got %v", req.Error)
  1905. }
  1906. // assert body
  1907. if r.Body == nil {
  1908. t.Errorf("expect body not to be nil")
  1909. }
  1910. body, _ := ioutil.ReadAll(r.Body)
  1911. awstesting.AssertQuery(t, `Action=OperationName&ListMemberName.1=a&ListMemberName.2=b&ListMemberName.3=c&Version=2014-01-01`, util.Trim(string(body)))
  1912. // assert URL
  1913. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1914. // assert headers
  1915. }
  1916. func TestInputService6ProtocolTestListWithLocationNameAndQueryNameCase1(t *testing.T) {
  1917. svc := NewInputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1918. input := &InputService6TestShapeInputService6TestCaseOperation1Input{
  1919. ListArg: []*string{
  1920. aws.String("a"),
  1921. aws.String("b"),
  1922. aws.String("c"),
  1923. },
  1924. }
  1925. req, _ := svc.InputService6TestCaseOperation1Request(input)
  1926. r := req.HTTPRequest
  1927. // build request
  1928. req.Build()
  1929. if req.Error != nil {
  1930. t.Errorf("expect no error, got %v", req.Error)
  1931. }
  1932. // assert body
  1933. if r.Body == nil {
  1934. t.Errorf("expect body not to be nil")
  1935. }
  1936. body, _ := ioutil.ReadAll(r.Body)
  1937. awstesting.AssertQuery(t, `Action=OperationName&ListQueryName.1=a&ListQueryName.2=b&ListQueryName.3=c&Version=2014-01-01`, util.Trim(string(body)))
  1938. // assert URL
  1939. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1940. // assert headers
  1941. }
  1942. func TestInputService7ProtocolTestBase64EncodedBlobsCase1(t *testing.T) {
  1943. svc := NewInputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1944. input := &InputService7TestShapeInputService7TestCaseOperation1Input{
  1945. BlobArg: []byte("foo"),
  1946. }
  1947. req, _ := svc.InputService7TestCaseOperation1Request(input)
  1948. r := req.HTTPRequest
  1949. // build request
  1950. req.Build()
  1951. if req.Error != nil {
  1952. t.Errorf("expect no error, got %v", req.Error)
  1953. }
  1954. // assert body
  1955. if r.Body == nil {
  1956. t.Errorf("expect body not to be nil")
  1957. }
  1958. body, _ := ioutil.ReadAll(r.Body)
  1959. awstesting.AssertQuery(t, `Action=OperationName&BlobArg=Zm9v&Version=2014-01-01`, util.Trim(string(body)))
  1960. // assert URL
  1961. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1962. // assert headers
  1963. }
  1964. func TestInputService8ProtocolTestTimestampValuesCase1(t *testing.T) {
  1965. svc := NewInputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1966. input := &InputService8TestShapeInputService8TestCaseOperation1Input{
  1967. TimeArg: aws.Time(time.Unix(1422172800, 0)),
  1968. TimeCustom: aws.Time(time.Unix(1422172800, 0)),
  1969. TimeFormat: aws.Time(time.Unix(1422172800, 0)),
  1970. }
  1971. req, _ := svc.InputService8TestCaseOperation1Request(input)
  1972. r := req.HTTPRequest
  1973. // build request
  1974. req.Build()
  1975. if req.Error != nil {
  1976. t.Errorf("expect no error, got %v", req.Error)
  1977. }
  1978. // assert body
  1979. if r.Body == nil {
  1980. t.Errorf("expect body not to be nil")
  1981. }
  1982. body, _ := ioutil.ReadAll(r.Body)
  1983. awstesting.AssertQuery(t, `Action=OperationName&TimeArg=2015-01-25T08%3A00%3A00Z&TimeCustom=1422172800&TimeFormat=1422172800&Version=2014-01-01`, util.Trim(string(body)))
  1984. // assert URL
  1985. awstesting.AssertURL(t, "https://test/", r.URL.String())
  1986. // assert headers
  1987. }
  1988. func TestInputService9ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) {
  1989. svc := NewInputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1990. input := &InputService9TestShapeInputService9TestCaseOperation1Input{
  1991. Token: aws.String("abc123"),
  1992. }
  1993. req, _ := svc.InputService9TestCaseOperation1Request(input)
  1994. r := req.HTTPRequest
  1995. // build request
  1996. req.Build()
  1997. if req.Error != nil {
  1998. t.Errorf("expect no error, got %v", req.Error)
  1999. }
  2000. // assert body
  2001. if r.Body == nil {
  2002. t.Errorf("expect body not to be nil")
  2003. }
  2004. body, _ := ioutil.ReadAll(r.Body)
  2005. awstesting.AssertQuery(t, `Action=OperationName&Token=abc123&Version=2014-01-01`, util.Trim(string(body)))
  2006. // assert URL
  2007. awstesting.AssertURL(t, "https://test/", r.URL.String())
  2008. // assert headers
  2009. }
  2010. func TestInputService9ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) {
  2011. svc := NewInputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2012. input := &InputService9TestShapeInputService9TestCaseOperation2Input{}
  2013. req, _ := svc.InputService9TestCaseOperation2Request(input)
  2014. r := req.HTTPRequest
  2015. // build request
  2016. req.Build()
  2017. if req.Error != nil {
  2018. t.Errorf("expect no error, got %v", req.Error)
  2019. }
  2020. // assert body
  2021. if r.Body == nil {
  2022. t.Errorf("expect body not to be nil")
  2023. }
  2024. body, _ := ioutil.ReadAll(r.Body)
  2025. awstesting.AssertQuery(t, `Action=OperationName&Token=00000000-0000-4000-8000-000000000000&Version=2014-01-01`, util.Trim(string(body)))
  2026. // assert URL
  2027. awstesting.AssertURL(t, "https://test/", r.URL.String())
  2028. // assert headers
  2029. }
  2030. func TestInputService10ProtocolTestEnumCase1(t *testing.T) {
  2031. svc := NewInputService10ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2032. input := &InputService10TestShapeInputService10TestCaseOperation1Input{
  2033. ListEnums: []*string{
  2034. aws.String("foo"),
  2035. aws.String(""),
  2036. aws.String("bar"),
  2037. },
  2038. }
  2039. req, _ := svc.InputService10TestCaseOperation1Request(input)
  2040. r := req.HTTPRequest
  2041. // build request
  2042. req.Build()
  2043. if req.Error != nil {
  2044. t.Errorf("expect no error, got %v", req.Error)
  2045. }
  2046. // assert body
  2047. if r.Body == nil {
  2048. t.Errorf("expect body not to be nil")
  2049. }
  2050. body, _ := ioutil.ReadAll(r.Body)
  2051. awstesting.AssertQuery(t, `Action=OperationName&ListEnums.1=foo&ListEnums.2=&ListEnums.3=bar&Version=2014-01-01`, util.Trim(string(body)))
  2052. // assert URL
  2053. awstesting.AssertURL(t, "https://test/", r.URL.String())
  2054. // assert headers
  2055. }
  2056. func TestInputService10ProtocolTestEnumCase2(t *testing.T) {
  2057. svc := NewInputService10ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2058. input := &InputService10TestShapeInputService10TestCaseOperation2Input{}
  2059. req, _ := svc.InputService10TestCaseOperation2Request(input)
  2060. r := req.HTTPRequest
  2061. // build request
  2062. req.Build()
  2063. if req.Error != nil {
  2064. t.Errorf("expect no error, got %v", req.Error)
  2065. }
  2066. // assert body
  2067. if r.Body == nil {
  2068. t.Errorf("expect body not to be nil")
  2069. }
  2070. body, _ := ioutil.ReadAll(r.Body)
  2071. awstesting.AssertQuery(t, `Action=OperationName&Version=2014-01-01`, util.Trim(string(body)))
  2072. // assert URL
  2073. awstesting.AssertURL(t, "https://test/", r.URL.String())
  2074. // assert headers
  2075. }
  2076. func TestInputService11ProtocolTestEndpointHostTraitCase1(t *testing.T) {
  2077. svc := NewInputService11ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://service.region.amazonaws.com")})
  2078. input := &InputService11TestShapeInputService11TestCaseOperation1Input{
  2079. Name: aws.String("myname"),
  2080. }
  2081. req, _ := svc.InputService11TestCaseOperation1Request(input)
  2082. r := req.HTTPRequest
  2083. // build request
  2084. req.Build()
  2085. if req.Error != nil {
  2086. t.Errorf("expect no error, got %v", req.Error)
  2087. }
  2088. // assert body
  2089. if r.Body == nil {
  2090. t.Errorf("expect body not to be nil")
  2091. }
  2092. body, _ := ioutil.ReadAll(r.Body)
  2093. awstesting.AssertQuery(t, `Action=StaticOp&Name=myname&Version=2014-01-01`, util.Trim(string(body)))
  2094. // assert URL
  2095. awstesting.AssertURL(t, "https://data-service.region.amazonaws.com/", r.URL.String())
  2096. // assert headers
  2097. }
  2098. func TestInputService11ProtocolTestEndpointHostTraitCase2(t *testing.T) {
  2099. svc := NewInputService11ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://service.region.amazonaws.com")})
  2100. input := &InputService11TestShapeInputService11TestCaseOperation2Input{
  2101. Name: aws.String("myname"),
  2102. }
  2103. req, _ := svc.InputService11TestCaseOperation2Request(input)
  2104. r := req.HTTPRequest
  2105. // build request
  2106. req.Build()
  2107. if req.Error != nil {
  2108. t.Errorf("expect no error, got %v", req.Error)
  2109. }
  2110. // assert body
  2111. if r.Body == nil {
  2112. t.Errorf("expect body not to be nil")
  2113. }
  2114. body, _ := ioutil.ReadAll(r.Body)
  2115. awstesting.AssertQuery(t, `Action=MemberRefOp&Name=myname&Version=2014-01-01`, util.Trim(string(body)))
  2116. // assert URL
  2117. awstesting.AssertURL(t, "https://foo-myname.service.region.amazonaws.com/", r.URL.String())
  2118. // assert headers
  2119. }