unmarshal_test.go 58 KB

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