--[[
  Generated by Scrooge
    version: ?
    rev: ?
    built at: ?
    source file: scrooge/scrooge-generator-tests/src/test/resources/gold_file_input/gold.thrift
--]]

-- Import this file with:
--   require 'com.twitter.scrooge.test.gold.thriftlua.Response'
-- Note: This file depends on libthrift!

local ResponseUnion = require 'com.twitter.scrooge.test.gold.thriftlua.ResponseUnion'

local Response = {
  ttype = 'struct',
  name = 'Response',
  fields = { }
}

Response.fields[1] = { name = 'statusCode', required = true, ttype = 'i32', }
Response.fields[2] = { name = 'responseUnion', required = true, ttype = 'struct', fields = ResponseUnion.fields, }

local binaryCodec = require 'libthrift'

Response.__codec = binaryCodec.codec(Response)

function Response:read(bin)
  return self.__codec:read(bin)
end

function Response:readTensor(bin)
  return self.__codec:readTensor(bin)
end

function Response:write(params)
  return self.__codec:write(params)
end

function Response:writeTensor(params)
  return self.__codec:writeTensor(params)
end

return Response
