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

package test.fixtures.basic;

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 ping() throws org.apache.thrift.TException {
      pingWrapper(com.facebook.thrift.client.RpcOptions.EMPTY);
  }

  @java.lang.Override
  public void ping(
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      pingWrapper(rpcOptions);
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<Void> pingWrapper(
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.pingWrapper(rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }
  @java.lang.Override
  public String getRandomData() throws org.apache.thrift.TException {
      return getRandomDataWrapper(com.facebook.thrift.client.RpcOptions.EMPTY).getData();
  }

  @java.lang.Override
  public String getRandomData(
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      return getRandomDataWrapper(rpcOptions).getData();
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<String> getRandomDataWrapper(
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.getRandomDataWrapper(rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }
  @java.lang.Override
  public void sink( final long sink) throws org.apache.thrift.TException {
      sinkWrapper(sink, com.facebook.thrift.client.RpcOptions.EMPTY);
  }

  @java.lang.Override
  public void sink(
        final long sink,
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      sinkWrapper(sink,rpcOptions);
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<Void> sinkWrapper(
    final long sink,
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.sinkWrapper(sink, rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }
  @java.lang.Override
  public void putDataById( final long id, final String data) throws org.apache.thrift.TException {
      putDataByIdWrapper(id, data, com.facebook.thrift.client.RpcOptions.EMPTY);
  }

  @java.lang.Override
  public void putDataById(
        final long id,
        final String data,
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      putDataByIdWrapper(id,data,rpcOptions);
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<Void> putDataByIdWrapper(
    final long id,
    final String data,
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.putDataByIdWrapper(id, data, rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }
  @java.lang.Override
  public boolean hasDataById( final long id) throws org.apache.thrift.TException {
      return hasDataByIdWrapper(id, com.facebook.thrift.client.RpcOptions.EMPTY).getData();
  }

  @java.lang.Override
  public boolean hasDataById(
        final long id,
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      return hasDataByIdWrapper(id,rpcOptions).getData();
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<Boolean> hasDataByIdWrapper(
    final long id,
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.hasDataByIdWrapper(id, rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }
  @java.lang.Override
  public String getDataById( final long id) throws org.apache.thrift.TException {
      return getDataByIdWrapper(id, com.facebook.thrift.client.RpcOptions.EMPTY).getData();
  }

  @java.lang.Override
  public String getDataById(
        final long id,
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      return getDataByIdWrapper(id,rpcOptions).getData();
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<String> getDataByIdWrapper(
    final long id,
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.getDataByIdWrapper(id, rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }
  @java.lang.Override
  public void deleteDataById( final long id) throws org.apache.thrift.TException {
      deleteDataByIdWrapper(id, com.facebook.thrift.client.RpcOptions.EMPTY);
  }

  @java.lang.Override
  public void deleteDataById(
        final long id,
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      deleteDataByIdWrapper(id,rpcOptions);
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<Void> deleteDataByIdWrapper(
    final long id,
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.deleteDataByIdWrapper(id, rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }
  @java.lang.Override
  public void lobDataById( final long id, final String data) throws org.apache.thrift.TException {
      lobDataByIdWrapper(id, data, com.facebook.thrift.client.RpcOptions.EMPTY);
  }

  @java.lang.Override
  public void lobDataById(
        final long id,
        final String data,
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      lobDataByIdWrapper(id,data,rpcOptions);
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<Void> lobDataByIdWrapper(
    final long id,
    final String data,
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.lobDataByIdWrapper(id, data, rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }
  @java.lang.Override
  public Set<Float> invalidReturnForHack() throws org.apache.thrift.TException {
      return invalidReturnForHackWrapper(com.facebook.thrift.client.RpcOptions.EMPTY).getData();
  }

  @java.lang.Override
  public Set<Float> invalidReturnForHack(
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      return invalidReturnForHackWrapper(rpcOptions).getData();
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<Set<Float>> invalidReturnForHackWrapper(
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.invalidReturnForHackWrapper(rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }
  @java.lang.Override
  public void rpcSkippedCodegen() throws org.apache.thrift.TException {
      rpcSkippedCodegenWrapper(com.facebook.thrift.client.RpcOptions.EMPTY);
  }

  @java.lang.Override
  public void rpcSkippedCodegen(
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      rpcSkippedCodegenWrapper(rpcOptions);
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<Void> rpcSkippedCodegenWrapper(
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.rpcSkippedCodegenWrapper(rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }

}
