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

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

    String JAVA_SERVICE_NAME = "com.ywt.gapi.wx_ins_pay.WxInsPayService";
    String SERVICE_NAME = "com.ywt.gapi.wx_ins_pay.WxInsPayService";

        /**
         * <pre>
         *  支付类型：RegPay=挂号支付 DiagPay=诊间 支付 InHospPay=住院
         * </pre>
         */
    com.ywt.gapi.wx_ins_pay.CreatePayInsOrderResponse createPayInsOrder(com.ywt.gapi.wx_ins_pay.CreatePayInsOrderRequest request);

    default CompletableFuture<com.ywt.gapi.wx_ins_pay.CreatePayInsOrderResponse> createPayInsOrderAsync(com.ywt.gapi.wx_ins_pay.CreatePayInsOrderRequest request){
        return CompletableFuture.completedFuture(createPayInsOrder(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 createPayInsOrder(com.ywt.gapi.wx_ins_pay.CreatePayInsOrderRequest request, StreamObserver<com.ywt.gapi.wx_ins_pay.CreatePayInsOrderResponse> responseObserver){
        createPayInsOrderAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  微信分配的公众账号 ID
         * </pre>
         */
    com.ywt.gapi.wx_ins_pay.QueryPayInsOrderResponse queryPayInsOrder(com.ywt.gapi.wx_ins_pay.QueryPayInsOrderRequest request);

    default CompletableFuture<com.ywt.gapi.wx_ins_pay.QueryPayInsOrderResponse> queryPayInsOrderAsync(com.ywt.gapi.wx_ins_pay.QueryPayInsOrderRequest request){
        return CompletableFuture.completedFuture(queryPayInsOrder(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 queryPayInsOrder(com.ywt.gapi.wx_ins_pay.QueryPayInsOrderRequest request, StreamObserver<com.ywt.gapi.wx_ins_pay.QueryPayInsOrderResponse> responseObserver){
        queryPayInsOrderAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  微信支付分配的商户号
         * </pre>
         */
    com.ywt.gapi.wx_ins_pay.WxPayCallbackResponse wxPayCallback(com.ywt.gapi.wx_ins_pay.WxPayCallbackRequest request);

    default CompletableFuture<com.ywt.gapi.wx_ins_pay.WxPayCallbackResponse> wxPayCallbackAsync(com.ywt.gapi.wx_ins_pay.WxPayCallbackRequest request){
        return CompletableFuture.completedFuture(wxPayCallback(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 wxPayCallback(com.ywt.gapi.wx_ins_pay.WxPayCallbackRequest request, StreamObserver<com.ywt.gapi.wx_ins_pay.WxPayCallbackResponse> responseObserver){
        wxPayCallbackAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.wx_ins_pay.VerifyMedInfoResponse verifyMedInfo(com.ywt.gapi.wx_ins_pay.VerifyMedInfoRequest request);

    default CompletableFuture<com.ywt.gapi.wx_ins_pay.VerifyMedInfoResponse> verifyMedInfoAsync(com.ywt.gapi.wx_ins_pay.VerifyMedInfoRequest request){
        return CompletableFuture.completedFuture(verifyMedInfo(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 verifyMedInfo(com.ywt.gapi.wx_ins_pay.VerifyMedInfoRequest request, StreamObserver<com.ywt.gapi.wx_ins_pay.VerifyMedInfoResponse> responseObserver){
        verifyMedInfoAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  第三方服务商平台自动生成的一个订单号
         * </pre>
         */
    com.ywt.gapi.wx_ins_pay.MarkOpOrderDeletedResponse markOpOrderDeleted(com.ywt.gapi.wx_ins_pay.MarkOpOrderDeletedRequest request);

    default CompletableFuture<com.ywt.gapi.wx_ins_pay.MarkOpOrderDeletedResponse> markOpOrderDeletedAsync(com.ywt.gapi.wx_ins_pay.MarkOpOrderDeletedRequest request){
        return CompletableFuture.completedFuture(markOpOrderDeleted(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 markOpOrderDeleted(com.ywt.gapi.wx_ins_pay.MarkOpOrderDeletedRequest request, StreamObserver<com.ywt.gapi.wx_ins_pay.MarkOpOrderDeletedResponse> responseObserver){
        markOpOrderDeletedAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.wx_ins_pay.WechatAutoRefundCallbackResponse wechatAutoRefundCallback(com.ywt.gapi.wx_ins_pay.WechatAutoRefundCallbackRequest request);

    default CompletableFuture<com.ywt.gapi.wx_ins_pay.WechatAutoRefundCallbackResponse> wechatAutoRefundCallbackAsync(com.ywt.gapi.wx_ins_pay.WechatAutoRefundCallbackRequest request){
        return CompletableFuture.completedFuture(wechatAutoRefundCallback(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 wechatAutoRefundCallback(com.ywt.gapi.wx_ins_pay.WechatAutoRefundCallbackRequest request, StreamObserver<com.ywt.gapi.wx_ins_pay.WechatAutoRefundCallbackResponse> responseObserver){
        wechatAutoRefundCallbackAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }






}
