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

package test.fixtures.includes;

import java.util.*;

public class MyServiceReactiveBlockingWrapper 
  implements MyService {
  private final MyService.Reactive _delegate;

  public MyServiceReactiveBlockingWrapper(MyService.Reactive _delegate) {
    
    this._delegate = _delegate;
  }

  public MyServiceReactiveBlockingWrapper(org.apache.thrift.ProtocolId _protocolId, reactor.core.publisher.Mono<? extends com.facebook.thrift.client.RpcClient> _rpcClient, Map<String, String> _headers, Map<String, String> _persistentHeaders) {
    this(new MyServiceReactiveClient(_protocolId, _rpcClient, _headers, _persistentHeaders));
  }

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

  @java.lang.Override
  public void query( final test.fixtures.includes.MyStruct s, final test.fixtures.includes.includes.Included i) throws org.apache.thrift.TException {
      queryWrapper(s, i, com.facebook.thrift.client.RpcOptions.EMPTY);
  }

  @java.lang.Override
  public void query(
        final test.fixtures.includes.MyStruct s,
        final test.fixtures.includes.includes.Included i,
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      queryWrapper(s,i,rpcOptions);
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<Void> queryWrapper(
    final test.fixtures.includes.MyStruct s,
    final test.fixtures.includes.includes.Included i,
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.queryWrapper(s, i, rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }
  @java.lang.Override
  public void hasArgDocs( final test.fixtures.includes.MyStruct s, final test.fixtures.includes.includes.Included i) throws org.apache.thrift.TException {
      hasArgDocsWrapper(s, i, com.facebook.thrift.client.RpcOptions.EMPTY);
  }

  @java.lang.Override
  public void hasArgDocs(
        final test.fixtures.includes.MyStruct s,
        final test.fixtures.includes.includes.Included i,
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      hasArgDocsWrapper(s,i,rpcOptions);
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<Void> hasArgDocsWrapper(
    final test.fixtures.includes.MyStruct s,
    final test.fixtures.includes.includes.Included i,
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.hasArgDocsWrapper(s, i, rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }

}
