#
# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

require 'thrift'
require 'debug_proto_test_types'

module Thrift
  module Test
    module ReverseOrderService
      class Client
        include ::Thrift::Client

        def myMethod(first, second, third, fourth)
          send_myMethod(first, second, third, fourth)
          recv_myMethod()
        end

        def send_myMethod(first, second, third, fourth)
          send_message('myMethod', MyMethod_args, :first => first, :second => second, :third => third, :fourth => fourth)
        end

        def recv_myMethod()
          result = receive_message(MyMethod_result)
          return
        end

      end

      class Processor
        include ::Thrift::Processor

        def process_myMethod(seqid, iprot, oprot)
          args = read_args(iprot, MyMethod_args)
          result = MyMethod_result.new()
          @handler.myMethod(args.first, args.second, args.third, args.fourth)
          write_result(result, oprot, 'myMethod', seqid)
        end

      end

      # HELPER FUNCTIONS AND STRUCTURES

      class MyMethod_args
        include ::Thrift::Struct, ::Thrift::Struct_Union
        FIRST = 4
        SECOND = 3
        THIRD = 2
        FOURTH = 1

        FIELDS = {
          FIRST => {:type => ::Thrift::Types::STRING, :name => 'first'},
          SECOND => {:type => ::Thrift::Types::I16, :name => 'second'},
          THIRD => {:type => ::Thrift::Types::I32, :name => 'third'},
          FOURTH => {:type => ::Thrift::Types::I64, :name => 'fourth'}
        }

        def struct_fields; FIELDS; end

        def validate
        end

        ::Thrift::Struct.generate_accessors self
      end

      class MyMethod_result
        include ::Thrift::Struct, ::Thrift::Struct_Union

        FIELDS = {

        }

        def struct_fields; FIELDS; end

        def validate
        end

        ::Thrift::Struct.generate_accessors self
      end

    end

  end
end
