/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

    package com.ywt.gapi.third.cloudfilm;

import org.apache.dubbo.common.stream.StreamObserver;
import com.google.protobuf.Message;

import java.util.HashMap;
import java.util.Map;
import java.util.function.BiConsumer;
import java.util.concurrent.CompletableFuture;

public interface CloudfilmService extends org.apache.dubbo.rpc.model.DubboStub {

    String JAVA_SERVICE_NAME = "com.ywt.gapi.third.cloudfilm.CloudfilmService";
    String SERVICE_NAME = "com.ywt.gapi.third.cloudfilm.CloudfilmService";

        /**
         * <pre>
         * 医院Id（太和医院为12）
         * </pre>
         */
    com.ywt.gapi.third.cloudfilm.GetOrderListResponse getOrderList(com.ywt.gapi.third.cloudfilm.GetOrderListRequest request);

    default CompletableFuture<com.ywt.gapi.third.cloudfilm.GetOrderListResponse> getOrderListAsync(com.ywt.gapi.third.cloudfilm.GetOrderListRequest request){
        return CompletableFuture.completedFuture(getOrderList(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getOrderList(com.ywt.gapi.third.cloudfilm.GetOrderListRequest request, StreamObserver<com.ywt.gapi.third.cloudfilm.GetOrderListResponse> responseObserver){
        getOrderListAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.third.cloudfilm.SetCompleteResultResponse setCompleteResult(com.ywt.gapi.third.cloudfilm.SetCompleteResultRequest request);

    default CompletableFuture<com.ywt.gapi.third.cloudfilm.SetCompleteResultResponse> setCompleteResultAsync(com.ywt.gapi.third.cloudfilm.SetCompleteResultRequest request){
        return CompletableFuture.completedFuture(setCompleteResult(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void setCompleteResult(com.ywt.gapi.third.cloudfilm.SetCompleteResultRequest request, StreamObserver<com.ywt.gapi.third.cloudfilm.SetCompleteResultResponse> responseObserver){
        setCompleteResultAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.third.cloudfilm.CreateOrderResponse createOrder(com.ywt.gapi.third.cloudfilm.CreateOrderRequest request);

    default CompletableFuture<com.ywt.gapi.third.cloudfilm.CreateOrderResponse> createOrderAsync(com.ywt.gapi.third.cloudfilm.CreateOrderRequest request){
        return CompletableFuture.completedFuture(createOrder(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void createOrder(com.ywt.gapi.third.cloudfilm.CreateOrderRequest request, StreamObserver<com.ywt.gapi.third.cloudfilm.CreateOrderResponse> responseObserver){
        createOrderAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 门诊号或者住院院号
         * </pre>
         */
    com.ywt.gapi.third.cloudfilm.PayCallbackResponse payCallback(com.ywt.gapi.third.cloudfilm.PayCallbackRequest request);

    default CompletableFuture<com.ywt.gapi.third.cloudfilm.PayCallbackResponse> payCallbackAsync(com.ywt.gapi.third.cloudfilm.PayCallbackRequest request){
        return CompletableFuture.completedFuture(payCallback(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void payCallback(com.ywt.gapi.third.cloudfilm.PayCallbackRequest request, StreamObserver<com.ywt.gapi.third.cloudfilm.PayCallbackResponse> responseObserver){
        payCallbackAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 本地医院ID，需求转换成虎丘的医生ID
         * </pre>
         */
    com.ywt.gapi.third.cloudfilm.GetConfigResponse getConfig(com.ywt.gapi.third.cloudfilm.GetConfigRequest request);

    default CompletableFuture<com.ywt.gapi.third.cloudfilm.GetConfigResponse> getConfigAsync(com.ywt.gapi.third.cloudfilm.GetConfigRequest request){
        return CompletableFuture.completedFuture(getConfig(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getConfig(com.ywt.gapi.third.cloudfilm.GetConfigRequest request, StreamObserver<com.ywt.gapi.third.cloudfilm.GetConfigResponse> responseObserver){
        getConfigAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 检查单号
         * </pre>
         */
    com.ywt.gapi.third.cloudfilm.GetReportInfoResponse getReportInfo(com.ywt.gapi.third.cloudfilm.GetReportInfoRequest request);

    default CompletableFuture<com.ywt.gapi.third.cloudfilm.GetReportInfoResponse> getReportInfoAsync(com.ywt.gapi.third.cloudfilm.GetReportInfoRequest request){
        return CompletableFuture.completedFuture(getReportInfo(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getReportInfo(com.ywt.gapi.third.cloudfilm.GetReportInfoRequest request, StreamObserver<com.ywt.gapi.third.cloudfilm.GetReportInfoResponse> responseObserver){
        getReportInfoAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 病人ID
         * </pre>
         */
    com.ywt.gapi.third.cloudfilm.GetOrderBillResponse getOrderBill(com.ywt.gapi.third.cloudfilm.GetOrderBillRequest request);

    default CompletableFuture<com.ywt.gapi.third.cloudfilm.GetOrderBillResponse> getOrderBillAsync(com.ywt.gapi.third.cloudfilm.GetOrderBillRequest request){
        return CompletableFuture.completedFuture(getOrderBill(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getOrderBill(com.ywt.gapi.third.cloudfilm.GetOrderBillRequest request, StreamObserver<com.ywt.gapi.third.cloudfilm.GetOrderBillResponse> responseObserver){
        getOrderBillAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.third.cloudfilm.RefundCheckResultOrderCallbackResponse refundCheckResultOrderCallback(com.ywt.gapi.third.cloudfilm.RefundCheckResultOrderCallbackRequest request);

    default CompletableFuture<com.ywt.gapi.third.cloudfilm.RefundCheckResultOrderCallbackResponse> refundCheckResultOrderCallbackAsync(com.ywt.gapi.third.cloudfilm.RefundCheckResultOrderCallbackRequest request){
        return CompletableFuture.completedFuture(refundCheckResultOrderCallback(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void refundCheckResultOrderCallback(com.ywt.gapi.third.cloudfilm.RefundCheckResultOrderCallbackRequest request, StreamObserver<com.ywt.gapi.third.cloudfilm.RefundCheckResultOrderCallbackResponse> responseObserver){
        refundCheckResultOrderCallbackAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }






}
