/*
* 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.ordercenter;

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 OrderCenterService extends org.apache.dubbo.rpc.model.DubboStub {

    String JAVA_SERVICE_NAME = "com.ywt.gapi.ordercenter.OrderCenterService";
    String SERVICE_NAME = "com.ywt.gapi.ordercenter.OrderCenterService";

    com.ywt.gapi.ordercenter.CreateOrderResponse createOrder(com.ywt.gapi.ordercenter.CreateOrderRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.CreateOrderResponse> createOrderAsync(com.ywt.gapi.ordercenter.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.ordercenter.CreateOrderRequest request, StreamObserver<com.ywt.gapi.ordercenter.CreateOrderResponse> responseObserver){
        createOrderAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 微信
         * </pre>
         */
    com.ywt.gapi.ordercenter.PayByAdminResponse payByAdmin(com.ywt.gapi.ordercenter.PayByAdminRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.PayByAdminResponse> payByAdminAsync(com.ywt.gapi.ordercenter.PayByAdminRequest request){
        return CompletableFuture.completedFuture(payByAdmin(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 payByAdmin(com.ywt.gapi.ordercenter.PayByAdminRequest request, StreamObserver<com.ywt.gapi.ordercenter.PayByAdminResponse> responseObserver){
        payByAdminAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 支付宝
         * </pre>
         */
    com.ywt.gapi.ordercenter.WechatPaymentResponse wechatPayment(com.ywt.gapi.ordercenter.WechatPaymentRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.WechatPaymentResponse> wechatPaymentAsync(com.ywt.gapi.ordercenter.WechatPaymentRequest request){
        return CompletableFuture.completedFuture(wechatPayment(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 wechatPayment(com.ywt.gapi.ordercenter.WechatPaymentRequest request, StreamObserver<com.ywt.gapi.ordercenter.WechatPaymentResponse> responseObserver){
        wechatPaymentAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 现金
         * </pre>
         */
    com.ywt.gapi.ordercenter.WechatPaymentNotifyResponse wechatPaymentNotify(com.ywt.gapi.ordercenter.WechatPaymentNotifyRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.WechatPaymentNotifyResponse> wechatPaymentNotifyAsync(com.ywt.gapi.ordercenter.WechatPaymentNotifyRequest request){
        return CompletableFuture.completedFuture(wechatPaymentNotify(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 wechatPaymentNotify(com.ywt.gapi.ordercenter.WechatPaymentNotifyRequest request, StreamObserver<com.ywt.gapi.ordercenter.WechatPaymentNotifyResponse> responseObserver){
        wechatPaymentNotifyAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 诊疗卡
         * </pre>
         */
    com.ywt.gapi.ordercenter.GetOrderInfeResponse getOrderInfo(com.ywt.gapi.ordercenter.GetOrderInfoRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.GetOrderInfeResponse> getOrderInfoAsync(com.ywt.gapi.ordercenter.GetOrderInfoRequest request){
        return CompletableFuture.completedFuture(getOrderInfo(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 getOrderInfo(com.ywt.gapi.ordercenter.GetOrderInfoRequest request, StreamObserver<com.ywt.gapi.ordercenter.GetOrderInfeResponse> responseObserver){
        getOrderInfoAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * pos机
         * </pre>
         */
    com.ywt.gapi.ordercenter.UpdateOrderInfoResponse updateOrderInfo(com.ywt.gapi.ordercenter.UpdateOrderInfoRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.UpdateOrderInfoResponse> updateOrderInfoAsync(com.ywt.gapi.ordercenter.UpdateOrderInfoRequest request){
        return CompletableFuture.completedFuture(updateOrderInfo(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 updateOrderInfo(com.ywt.gapi.ordercenter.UpdateOrderInfoRequest request, StreamObserver<com.ywt.gapi.ordercenter.UpdateOrderInfoResponse> responseObserver){
        updateOrderInfoAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 无须支付
         * </pre>
         */
    com.ywt.gapi.ordercenter.RefundResponse refund(com.ywt.gapi.ordercenter.RefundRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.RefundResponse> refundAsync(com.ywt.gapi.ordercenter.RefundRequest request){
        return CompletableFuture.completedFuture(refund(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 refund(com.ywt.gapi.ordercenter.RefundRequest request, StreamObserver<com.ywt.gapi.ordercenter.RefundResponse> responseObserver){
        refundAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 医保
         * </pre>
         */
    com.ywt.gapi.ordercenter.WechatRefundNotifyResponse wechatRefundNotify(com.ywt.gapi.ordercenter.WechatRefundNotifyRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.WechatRefundNotifyResponse> wechatRefundNotifyAsync(com.ywt.gapi.ordercenter.WechatRefundNotifyRequest request){
        return CompletableFuture.completedFuture(wechatRefundNotify(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 wechatRefundNotify(com.ywt.gapi.ordercenter.WechatRefundNotifyRequest request, StreamObserver<com.ywt.gapi.ordercenter.WechatRefundNotifyResponse> responseObserver){
        wechatRefundNotifyAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 支付成功后回调grpc方法，结构：(/${package}.${service}/${method})，如：/com.ywt.gapi.mq.MQExecutorService/executeGRPC
         * </pre>
         */
    com.ywt.gapi.ordercenter.GetOrderBillResponse getOrderBill(com.ywt.gapi.ordercenter.GetOrderBillRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.GetOrderBillResponse> getOrderBillAsync(com.ywt.gapi.ordercenter.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.ordercenter.GetOrderBillRequest request, StreamObserver<com.ywt.gapi.ordercenter.GetOrderBillResponse> responseObserver){
        getOrderBillAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.ordercenter.PrePayByPOSResponse prePayByPOS(com.ywt.gapi.ordercenter.PrePayByPOSRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.PrePayByPOSResponse> prePayByPOSAsync(com.ywt.gapi.ordercenter.PrePayByPOSRequest request){
        return CompletableFuture.completedFuture(prePayByPOS(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 prePayByPOS(com.ywt.gapi.ordercenter.PrePayByPOSRequest request, StreamObserver<com.ywt.gapi.ordercenter.PrePayByPOSResponse> responseObserver){
        prePayByPOSAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 自定义数据
         * </pre>
         */
    com.ywt.gapi.ordercenter.FinishPayByPOSResponse finishPayByPOS(com.ywt.gapi.ordercenter.FinishPayByPOSRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.FinishPayByPOSResponse> finishPayByPOSAsync(com.ywt.gapi.ordercenter.FinishPayByPOSRequest request){
        return CompletableFuture.completedFuture(finishPayByPOS(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 finishPayByPOS(com.ywt.gapi.ordercenter.FinishPayByPOSRequest request, StreamObserver<com.ywt.gapi.ordercenter.FinishPayByPOSResponse> responseObserver){
        finishPayByPOSAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 支付代码--支付中心统一编码
         * </pre>
         */
    com.ywt.gapi.ordercenter.ICBCPaymentResponse icbcPayment(com.ywt.gapi.ordercenter.ICBCPaymentRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.ICBCPaymentResponse> icbcPaymentAsync(com.ywt.gapi.ordercenter.ICBCPaymentRequest request){
        return CompletableFuture.completedFuture(icbcPayment(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 icbcPayment(com.ywt.gapi.ordercenter.ICBCPaymentRequest request, StreamObserver<com.ywt.gapi.ordercenter.ICBCPaymentResponse> responseObserver){
        icbcPaymentAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.ordercenter.ICBCPaymentNotifyResponse icbcPaymentNotify(com.ywt.gapi.ordercenter.ICBCPaymentNotifyRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.ICBCPaymentNotifyResponse> icbcPaymentNotifyAsync(com.ywt.gapi.ordercenter.ICBCPaymentNotifyRequest request){
        return CompletableFuture.completedFuture(icbcPaymentNotify(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 icbcPaymentNotify(com.ywt.gapi.ordercenter.ICBCPaymentNotifyRequest request, StreamObserver<com.ywt.gapi.ordercenter.ICBCPaymentNotifyResponse> responseObserver){
        icbcPaymentNotifyAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.ordercenter.ICBCRefundNotifyResponse icbcRefundNotify(com.ywt.gapi.ordercenter.ICBCRefundNotifyRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.ICBCRefundNotifyResponse> icbcRefundNotifyAsync(com.ywt.gapi.ordercenter.ICBCRefundNotifyRequest request){
        return CompletableFuture.completedFuture(icbcRefundNotify(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 icbcRefundNotify(com.ywt.gapi.ordercenter.ICBCRefundNotifyRequest request, StreamObserver<com.ywt.gapi.ordercenter.ICBCRefundNotifyResponse> responseObserver){
        icbcRefundNotifyAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 退款成功后回调rest服务方法，url格式: rest://com.ywt.MgDrugApiService/path1/path2
         * </pre>
         */
    com.ywt.gapi.ordercenter.CleanPayLockResponse cleanPayLock(com.ywt.gapi.ordercenter.CleanPayLockRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.CleanPayLockResponse> cleanPayLockAsync(com.ywt.gapi.ordercenter.CleanPayLockRequest request){
        return CompletableFuture.completedFuture(cleanPayLock(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 cleanPayLock(com.ywt.gapi.ordercenter.CleanPayLockRequest request, StreamObserver<com.ywt.gapi.ordercenter.CleanPayLockResponse> responseObserver){
        cleanPayLockAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         * 判断是否在支付中
         * </pre>
         */
    com.ywt.gapi.ordercenter.CheckIsPayingResponse checkIsPaying(com.ywt.gapi.ordercenter.CheckIsPayingRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.CheckIsPayingResponse> checkIsPayingAsync(com.ywt.gapi.ordercenter.CheckIsPayingRequest request){
        return CompletableFuture.completedFuture(checkIsPaying(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 checkIsPaying(com.ywt.gapi.ordercenter.CheckIsPayingRequest request, StreamObserver<com.ywt.gapi.ordercenter.CheckIsPayingResponse> responseObserver){
        checkIsPayingAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  创建支付宝订单
         * </pre>
         */
    com.ywt.gapi.ordercenter.CreateAlipayOrderResponse createAlipayOrder(com.ywt.gapi.ordercenter.CreateAlipayOrderRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.CreateAlipayOrderResponse> createAlipayOrderAsync(com.ywt.gapi.ordercenter.CreateAlipayOrderRequest request){
        return CompletableFuture.completedFuture(createAlipayOrder(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 createAlipayOrder(com.ywt.gapi.ordercenter.CreateAlipayOrderRequest request, StreamObserver<com.ywt.gapi.ordercenter.CreateAlipayOrderResponse> responseObserver){
        createAlipayOrderAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  支付宝支付回调
         * </pre>
         */
    com.ywt.gapi.ordercenter.AlipayNotifyResponse alipayNotify(com.ywt.gapi.ordercenter.AlipayNotifyRequest request);

    default CompletableFuture<com.ywt.gapi.ordercenter.AlipayNotifyResponse> alipayNotifyAsync(com.ywt.gapi.ordercenter.AlipayNotifyRequest request){
        return CompletableFuture.completedFuture(alipayNotify(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 alipayNotify(com.ywt.gapi.ordercenter.AlipayNotifyRequest request, StreamObserver<com.ywt.gapi.ordercenter.AlipayNotifyResponse> responseObserver){
        alipayNotifyAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }






}
