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

package test.fixtures.adapter;

import com.facebook.swift.codec.*;
import com.facebook.swift.codec.ThriftField.Requiredness;
import com.facebook.swift.service.*;
import com.facebook.thrift.client.*;
import com.google.common.util.concurrent.ListenableFuture;
import java.io.*;
import java.util.*;
import reactor.core.publisher.Mono;

@SwiftGenerated
@com.facebook.swift.service.ThriftService("Service")
public interface Service extends java.io.Closeable, com.facebook.thrift.util.BlockingService {
    static com.facebook.thrift.server.RpcServerHandlerBuilder<Service> serverHandlerBuilder(Service _serverImpl) {
        return new com.facebook.thrift.server.RpcServerHandlerBuilder<Service>(_serverImpl) {
                @java.lang.Override
                public com.facebook.thrift.server.RpcServerHandler build() {
                return new ServiceRpcServerHandler(impl, eventHandlers);
            }
        };
    }

    static com.facebook.thrift.client.ClientBuilder<Service> clientBuilder() {
        return new ClientBuilder<Service>() {
            @java.lang.Override
            public Service build(Mono<RpcClient> rpcClientMono) {
                Service.Reactive _delegate =
                    new ServiceReactiveClient(protocolId, rpcClientMono, headersMono, persistentHeadersMono);
                return new ServiceReactiveBlockingWrapper(_delegate);
            }
        };
    }

    @com.facebook.swift.service.ThriftService("Service")
    public interface Async extends java.io.Closeable, com.facebook.thrift.util.AsyncService {
        static com.facebook.thrift.server.RpcServerHandlerBuilder<Service.Async> serverHandlerBuilder(Service.Async _serverImpl) {
            return new com.facebook.thrift.server.RpcServerHandlerBuilder<Service.Async>(_serverImpl) {
                @java.lang.Override
                public com.facebook.thrift.server.RpcServerHandler build() {
                    return new ServiceRpcServerHandler(impl, eventHandlers);
                }
            };
        }

        static com.facebook.thrift.client.ClientBuilder<Service.Async> clientBuilder() {
            return new ClientBuilder<Service.Async>() {
                @java.lang.Override
                public Service.Async build(Mono<RpcClient> rpcClientMono) {
                    Service.Reactive _delegate =
                        new ServiceReactiveClient(protocolId, rpcClientMono, headersMono, persistentHeadersMono);
                    return new ServiceReactiveAsyncWrapper(_delegate);
                }
            };
        }

        @java.lang.Override void close();

        @ThriftMethod(value = "func")
        ListenableFuture<Integer> func(
            @com.facebook.swift.codec.ThriftField(value=1, name="arg1", requiredness=Requiredness.NONE) final String arg1,
            @com.facebook.swift.codec.ThriftField(value=2, name="arg2", requiredness=Requiredness.NONE) final String arg2,
            @com.facebook.swift.codec.ThriftField(value=3, name="arg3", requiredness=Requiredness.NONE) final test.fixtures.adapter.Foo arg3);

        default ListenableFuture<Integer> func(
            @com.facebook.swift.codec.ThriftField(value=1, name="arg1", requiredness=Requiredness.NONE) final String arg1,
            @com.facebook.swift.codec.ThriftField(value=2, name="arg2", requiredness=Requiredness.NONE) final String arg2,
            @com.facebook.swift.codec.ThriftField(value=3, name="arg3", requiredness=Requiredness.NONE) final test.fixtures.adapter.Foo arg3,
            RpcOptions rpcOptions) {
            throw new UnsupportedOperationException();
        }

        default ListenableFuture<ResponseWrapper<Integer>> funcWrapper(
            @com.facebook.swift.codec.ThriftField(value=1, name="arg1", requiredness=Requiredness.NONE) final String arg1,
            @com.facebook.swift.codec.ThriftField(value=2, name="arg2", requiredness=Requiredness.NONE) final String arg2,
            @com.facebook.swift.codec.ThriftField(value=3, name="arg3", requiredness=Requiredness.NONE) final test.fixtures.adapter.Foo arg3,
            RpcOptions rpcOptions) {
            throw new UnsupportedOperationException();
        }
    }
    @java.lang.Override void close();

    @ThriftMethod(value = "func")
    int func(
        @com.facebook.swift.codec.ThriftField(value=1, name="arg1", requiredness=Requiredness.NONE) final String arg1,
        @com.facebook.swift.codec.ThriftField(value=2, name="arg2", requiredness=Requiredness.NONE) final String arg2,
        @com.facebook.swift.codec.ThriftField(value=3, name="arg3", requiredness=Requiredness.NONE) final test.fixtures.adapter.Foo arg3) throws org.apache.thrift.TException;

    default int func(
        @com.facebook.swift.codec.ThriftField(value=1, name="arg1", requiredness=Requiredness.NONE) final String arg1,
        @com.facebook.swift.codec.ThriftField(value=2, name="arg2", requiredness=Requiredness.NONE) final String arg2,
        @com.facebook.swift.codec.ThriftField(value=3, name="arg3", requiredness=Requiredness.NONE) final test.fixtures.adapter.Foo arg3,
        RpcOptions rpcOptions) throws org.apache.thrift.TException {
        throw new UnsupportedOperationException();
    }

    default ResponseWrapper<Integer> funcWrapper(
        @com.facebook.swift.codec.ThriftField(value=1, name="arg1", requiredness=Requiredness.NONE) final String arg1,
        @com.facebook.swift.codec.ThriftField(value=2, name="arg2", requiredness=Requiredness.NONE) final String arg2,
        @com.facebook.swift.codec.ThriftField(value=3, name="arg3", requiredness=Requiredness.NONE) final test.fixtures.adapter.Foo arg3,
        RpcOptions rpcOptions) throws org.apache.thrift.TException {
        throw new UnsupportedOperationException();
    }

    @com.facebook.swift.service.ThriftService("Service")
    interface Reactive extends reactor.core.Disposable, com.facebook.thrift.util.ReactiveService {
        static com.facebook.thrift.server.RpcServerHandlerBuilder<Service.Reactive> serverHandlerBuilder(Service.Reactive _serverImpl) {
            return new com.facebook.thrift.server.RpcServerHandlerBuilder<Service.Reactive>(_serverImpl) {
                @java.lang.Override
                public com.facebook.thrift.server.RpcServerHandler build() {
                    return new ServiceRpcServerHandler(impl, eventHandlers);
                }
            };
        }

        static com.facebook.thrift.client.ClientBuilder<Service.Reactive> clientBuilder() {
            return new ClientBuilder<Service.Reactive>() {
                @java.lang.Override
                public Service.Reactive build(Mono<RpcClient> rpcClientMono) {
                    return new ServiceReactiveClient(protocolId, rpcClientMono, headersMono, persistentHeadersMono);
                }
            };
        }

        @ThriftMethod(value = "func")
        reactor.core.publisher.Mono<Integer> func(final String arg1, final String arg2, final test.fixtures.adapter.Foo arg3);

        default reactor.core.publisher.Mono<Integer> func(final String arg1, final String arg2, final test.fixtures.adapter.Foo arg3, RpcOptions rpcOptions) {
            throw new UnsupportedOperationException();
        }

        default reactor.core.publisher.Mono<ResponseWrapper<Integer>> funcWrapper(final String arg1, final String arg2, final test.fixtures.adapter.Foo arg3, RpcOptions rpcOptions) {
            throw new UnsupportedOperationException();
        }

    }
}
