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

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

    String JAVA_SERVICE_NAME = "com.ywt.gapi.med_equip.MedEquipService";
    String SERVICE_NAME = "com.ywt.gapi.med_equip.MedEquipService";

        /**
         * <pre>
         *  unused
         * </pre>
         */
    com.ywt.gapi.med_equip.CreateOrderResponse createOrder(com.ywt.gapi.med_equip.CreateOrderRequest request);

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

        /**
         * <pre>
         *  开单医生 id
         * </pre>
         */
    com.ywt.gapi.med_equip.QueryOrderResponse queryOrder(com.ywt.gapi.med_equip.QueryOrderRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.QueryOrderResponse> queryOrderAsync(com.ywt.gapi.med_equip.QueryOrderRequest request){
        return CompletableFuture.completedFuture(queryOrder(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 queryOrder(com.ywt.gapi.med_equip.QueryOrderRequest request, StreamObserver<com.ywt.gapi.med_equip.QueryOrderResponse> responseObserver){
        queryOrderAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  科室 id, unused
         * </pre>
         */
    com.ywt.gapi.med_equip.QueryOrderRecordsResponse queryOrderRecords(com.ywt.gapi.med_equip.QueryOrderRecordsRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.QueryOrderRecordsResponse> queryOrderRecordsAsync(com.ywt.gapi.med_equip.QueryOrderRecordsRequest request){
        return CompletableFuture.completedFuture(queryOrderRecords(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 queryOrderRecords(com.ywt.gapi.med_equip.QueryOrderRecordsRequest request, StreamObserver<com.ywt.gapi.med_equip.QueryOrderRecordsResponse> responseObserver){
        queryOrderRecordsAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  诊断
         * </pre>
         */
    com.ywt.gapi.med_equip.QueryInspectionItemsResponse queryInspectionItems(com.ywt.gapi.med_equip.QueryInspectionItemsRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.QueryInspectionItemsResponse> queryInspectionItemsAsync(com.ywt.gapi.med_equip.QueryInspectionItemsRequest request){
        return CompletableFuture.completedFuture(queryInspectionItems(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 queryInspectionItems(com.ywt.gapi.med_equip.QueryInspectionItemsRequest request, StreamObserver<com.ywt.gapi.med_equip.QueryInspectionItemsResponse> responseObserver){
        queryInspectionItemsAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  检查项目列表
         * </pre>
         */
    com.ywt.gapi.med_equip.QueryEquipListResponse queryEquipList(com.ywt.gapi.med_equip.QueryEquipListRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.QueryEquipListResponse> queryEquipListAsync(com.ywt.gapi.med_equip.QueryEquipListRequest request){
        return CompletableFuture.completedFuture(queryEquipList(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 queryEquipList(com.ywt.gapi.med_equip.QueryEquipListRequest request, StreamObserver<com.ywt.gapi.med_equip.QueryEquipListResponse> responseObserver){
        queryEquipListAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  总价，单位：分, unused
         * </pre>
         */
    com.ywt.gapi.med_equip.ApplyForRefundResponse applyForRefund(com.ywt.gapi.med_equip.ApplyForRefundRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.ApplyForRefundResponse> applyForRefundAsync(com.ywt.gapi.med_equip.ApplyForRefundRequest request){
        return CompletableFuture.completedFuture(applyForRefund(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 applyForRefund(com.ywt.gapi.med_equip.ApplyForRefundRequest request, StreamObserver<com.ywt.gapi.med_equip.ApplyForRefundResponse> responseObserver){
        applyForRefundAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  医生签名 id
         * </pre>
         */
    com.ywt.gapi.med_equip.UpdateDiagnosisResponse updateDiagnosis(com.ywt.gapi.med_equip.UpdateDiagnosisRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.UpdateDiagnosisResponse> updateDiagnosisAsync(com.ywt.gapi.med_equip.UpdateDiagnosisRequest request){
        return CompletableFuture.completedFuture(updateDiagnosis(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 updateDiagnosis(com.ywt.gapi.med_equip.UpdateDiagnosisRequest request, StreamObserver<com.ywt.gapi.med_equip.UpdateDiagnosisResponse> responseObserver){
        updateDiagnosisAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  备注
         * </pre>
         */
    com.ywt.gapi.med_equip.PayCallbackResponse payCallback(com.ywt.gapi.med_equip.PayCallbackRequest request);

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

    com.ywt.gapi.med_equip.RefundNotifyResponse orderRefundNotify(com.ywt.gapi.med_equip.RefundNotifyRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.RefundNotifyResponse> orderRefundNotifyAsync(com.ywt.gapi.med_equip.RefundNotifyRequest request){
        return CompletableFuture.completedFuture(orderRefundNotify(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 orderRefundNotify(com.ywt.gapi.med_equip.RefundNotifyRequest request, StreamObserver<com.ywt.gapi.med_equip.RefundNotifyResponse> responseObserver){
        orderRefundNotifyAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.med_equip.UpdateOrderInfoResponse updateOrderInfo(com.ywt.gapi.med_equip.UpdateOrderInfoRequest request);

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

    com.ywt.gapi.med_equip.QueryReportListResponse queryReportList(com.ywt.gapi.med_equip.QueryReportListRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.QueryReportListResponse> queryReportListAsync(com.ywt.gapi.med_equip.QueryReportListRequest request){
        return CompletableFuture.completedFuture(queryReportList(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 queryReportList(com.ywt.gapi.med_equip.QueryReportListRequest request, StreamObserver<com.ywt.gapi.med_equip.QueryReportListResponse> responseObserver){
        queryReportListAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.med_equip.QueryReportDetailResponse queryReportDetail(com.ywt.gapi.med_equip.QueryReportDetailRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.QueryReportDetailResponse> queryReportDetailAsync(com.ywt.gapi.med_equip.QueryReportDetailRequest request){
        return CompletableFuture.completedFuture(queryReportDetail(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 queryReportDetail(com.ywt.gapi.med_equip.QueryReportDetailRequest request, StreamObserver<com.ywt.gapi.med_equip.QueryReportDetailResponse> responseObserver){
        queryReportDetailAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.med_equip.CheckIfUserHasAdminPermissionResponse checkIfUserHasAdminPermission(com.ywt.gapi.med_equip.CheckIfUserHasAdminPermissionRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.CheckIfUserHasAdminPermissionResponse> checkIfUserHasAdminPermissionAsync(com.ywt.gapi.med_equip.CheckIfUserHasAdminPermissionRequest request){
        return CompletableFuture.completedFuture(checkIfUserHasAdminPermission(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 checkIfUserHasAdminPermission(com.ywt.gapi.med_equip.CheckIfUserHasAdminPermissionRequest request, StreamObserver<com.ywt.gapi.med_equip.CheckIfUserHasAdminPermissionResponse> responseObserver){
        checkIfUserHasAdminPermissionAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.med_equip.GetEquipDeptListResponse getEquipDeptList(com.ywt.gapi.med_equip.GetEquipDeptListRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.GetEquipDeptListResponse> getEquipDeptListAsync(com.ywt.gapi.med_equip.GetEquipDeptListRequest request){
        return CompletableFuture.completedFuture(getEquipDeptList(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 getEquipDeptList(com.ywt.gapi.med_equip.GetEquipDeptListRequest request, StreamObserver<com.ywt.gapi.med_equip.GetEquipDeptListResponse> responseObserver){
        getEquipDeptListAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.med_equip.ChangeEquipCodeResponse changeEquipCode(com.ywt.gapi.med_equip.ChangeEquipCodeRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.ChangeEquipCodeResponse> changeEquipCodeAsync(com.ywt.gapi.med_equip.ChangeEquipCodeRequest request){
        return CompletableFuture.completedFuture(changeEquipCode(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 changeEquipCode(com.ywt.gapi.med_equip.ChangeEquipCodeRequest request, StreamObserver<com.ywt.gapi.med_equip.ChangeEquipCodeResponse> responseObserver){
        changeEquipCodeAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.med_equip.CheckIfUserEquipAdminResponse checkIfUserEquipAdmin(com.ywt.gapi.med_equip.CheckIfUserEquipAdminRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.CheckIfUserEquipAdminResponse> checkIfUserEquipAdminAsync(com.ywt.gapi.med_equip.CheckIfUserEquipAdminRequest request){
        return CompletableFuture.completedFuture(checkIfUserEquipAdmin(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 checkIfUserEquipAdmin(com.ywt.gapi.med_equip.CheckIfUserEquipAdminRequest request, StreamObserver<com.ywt.gapi.med_equip.CheckIfUserEquipAdminResponse> responseObserver){
        checkIfUserEquipAdminAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  展示给患者扫码支付的地址
         * </pre>
         */
    com.ywt.gapi.med_equip.TriggerScheduledJobResponse triggerScheduledJob(com.ywt.gapi.med_equip.TriggerScheduledJobRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.TriggerScheduledJobResponse> triggerScheduledJobAsync(com.ywt.gapi.med_equip.TriggerScheduledJobRequest request){
        return CompletableFuture.completedFuture(triggerScheduledJob(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 triggerScheduledJob(com.ywt.gapi.med_equip.TriggerScheduledJobRequest request, StreamObserver<com.ywt.gapi.med_equip.TriggerScheduledJobResponse> responseObserver){
        triggerScheduledJobAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  设备码
         * </pre>
         */
    com.ywt.gapi.med_equip.GetEquipAdminInfoResponse getEquipAdminInfo(com.ywt.gapi.med_equip.GetEquipAdminInfoRequest request);

    default CompletableFuture<com.ywt.gapi.med_equip.GetEquipAdminInfoResponse> getEquipAdminInfoAsync(com.ywt.gapi.med_equip.GetEquipAdminInfoRequest request){
        return CompletableFuture.completedFuture(getEquipAdminInfo(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 getEquipAdminInfo(com.ywt.gapi.med_equip.GetEquipAdminInfoRequest request, StreamObserver<com.ywt.gapi.med_equip.GetEquipAdminInfoResponse> responseObserver){
        getEquipAdminInfoAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }






}
