/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */

package test.fixtures.basicannotations;

import com.facebook.thrift.client.*;
import java.util.*;

public class BadServiceAsyncReactiveWrapper 
    implements BadService.Reactive {
    private final BadService.Async _delegate;

    public BadServiceAsyncReactiveWrapper(BadService.Async _delegate) {
        
        this._delegate = _delegate;
    }

    @java.lang.Override
    public void dispose() {
        _delegate.close();
    }

    @java.lang.Override
    public reactor.core.publisher.Mono<Integer> bar() {
        return com.facebook.thrift.util.FutureUtil.toMono(() -> _delegate.bar());
    }

    public class BadInteractionImpl implements BadInteraction {
        private BadService.Async.BadInteraction _delegateInteraction;

        BadInteractionImpl(BadService.Async.BadInteraction delegateInteraction) {
            this._delegateInteraction = delegateInteraction;
        }

        public reactor.core.publisher.Mono<Void> foo() {
            return com.facebook.thrift.util.FutureUtil.toMono(() -> _delegateInteraction.foo());
        }

        public reactor.core.publisher.Mono<Void> foo(RpcOptions rpcOptions) {
            return com.facebook.thrift.util.FutureUtil.toMono(() -> _delegateInteraction.foo( rpcOptions));
        }

        public reactor.core.publisher.Mono<ResponseWrapper<Void>> fooWrapper(RpcOptions rpcOptions) {
            return com.facebook.thrift.util.FutureUtil.toMono(() -> _delegateInteraction.fooWrapper( rpcOptions));
        }

        @java.lang.Override
        public void dispose() {
            _delegateInteraction.close();
        }
    }

    public BadInteraction createBadInteraction() {
        return new BadInteractionImpl(_delegate.createBadInteraction());
    }
}
