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

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

    String JAVA_SERVICE_NAME = "com.ywt.gapi.message.WeChatMessageService";
    String SERVICE_NAME = "com.ywt.gapi.message.WeChatMessageService";

        /**
         * <pre>
         *  调用终端
         * </pre>
         */
    com.ywt.gapi.message.SendTemplateMessageResponse sendTemplateMessage(com.ywt.gapi.message.SendTemplateMessageRequest request);

    default CompletableFuture<com.ywt.gapi.message.SendTemplateMessageResponse> sendTemplateMessageAsync(com.ywt.gapi.message.SendTemplateMessageRequest request){
        return CompletableFuture.completedFuture(sendTemplateMessage(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 sendTemplateMessage(com.ywt.gapi.message.SendTemplateMessageRequest request, StreamObserver<com.ywt.gapi.message.SendTemplateMessageResponse> responseObserver){
        sendTemplateMessageAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  调用服务名称
         * </pre>
         */
    com.ywt.gapi.message.SendCustomMessageResponse sendCustomMessage(com.ywt.gapi.message.SendCustomMessageRequest request);

    default CompletableFuture<com.ywt.gapi.message.SendCustomMessageResponse> sendCustomMessageAsync(com.ywt.gapi.message.SendCustomMessageRequest request){
        return CompletableFuture.completedFuture(sendCustomMessage(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 sendCustomMessage(com.ywt.gapi.message.SendCustomMessageRequest request, StreamObserver<com.ywt.gapi.message.SendCustomMessageResponse> responseObserver){
        sendCustomMessageAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  IP
         * </pre>
         */
    com.ywt.gapi.message.SendTemplateMessageAsyncResponse sendTemplateMessageAsynk(com.ywt.gapi.message.SendTemplateMessageAsyncRequest request);

    default CompletableFuture<com.ywt.gapi.message.SendTemplateMessageAsyncResponse> sendTemplateMessageAsynkAsync(com.ywt.gapi.message.SendTemplateMessageAsyncRequest request){
        return CompletableFuture.completedFuture(sendTemplateMessageAsynk(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 sendTemplateMessageAsynk(com.ywt.gapi.message.SendTemplateMessageAsyncRequest request, StreamObserver<com.ywt.gapi.message.SendTemplateMessageAsyncResponse> responseObserver){
        sendTemplateMessageAsynkAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  方法名
         * </pre>
         */
    com.ywt.gapi.message.SendMPTemplateMessageResponse sendMPTemplateMessage(com.ywt.gapi.message.SendMPTemplateMessageRequest request);

    default CompletableFuture<com.ywt.gapi.message.SendMPTemplateMessageResponse> sendMPTemplateMessageAsync(com.ywt.gapi.message.SendMPTemplateMessageRequest request){
        return CompletableFuture.completedFuture(sendMPTemplateMessage(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 sendMPTemplateMessage(com.ywt.gapi.message.SendMPTemplateMessageRequest request, StreamObserver<com.ywt.gapi.message.SendMPTemplateMessageResponse> responseObserver){
        sendMPTemplateMessageAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  网关鉴权信息
         * </pre>
         */
    com.ywt.gapi.message.SendMPTemplateMessageByLogIdResponse sendMPTemplateMessageByLogId(com.ywt.gapi.message.SendMPTemplateMessageByLogIdRequest request);

    default CompletableFuture<com.ywt.gapi.message.SendMPTemplateMessageByLogIdResponse> sendMPTemplateMessageByLogIdAsync(com.ywt.gapi.message.SendMPTemplateMessageByLogIdRequest request){
        return CompletableFuture.completedFuture(sendMPTemplateMessageByLogId(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 sendMPTemplateMessageByLogId(com.ywt.gapi.message.SendMPTemplateMessageByLogIdRequest request, StreamObserver<com.ywt.gapi.message.SendMPTemplateMessageByLogIdResponse> responseObserver){
        sendMPTemplateMessageByLogIdAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

        /**
         * <pre>
         *  其他额外信息
         * </pre>
         */
    com.ywt.gapi.message.SendMPSubscribeMessageResponse sendMPSubscribeMessage(com.ywt.gapi.message.SendMPSubscribeMessageRequest request);

    default CompletableFuture<com.ywt.gapi.message.SendMPSubscribeMessageResponse> sendMPSubscribeMessageAsync(com.ywt.gapi.message.SendMPSubscribeMessageRequest request){
        return CompletableFuture.completedFuture(sendMPSubscribeMessage(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 sendMPSubscribeMessage(com.ywt.gapi.message.SendMPSubscribeMessageRequest request, StreamObserver<com.ywt.gapi.message.SendMPSubscribeMessageResponse> responseObserver){
        sendMPSubscribeMessageAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.message.SendMPSubscribeMessageByLogIdResponse sendMPSubscribeMessageByLogId(com.ywt.gapi.message.SendMPSubscribeMessageByLogIdRequest request);

    default CompletableFuture<com.ywt.gapi.message.SendMPSubscribeMessageByLogIdResponse> sendMPSubscribeMessageByLogIdAsync(com.ywt.gapi.message.SendMPSubscribeMessageByLogIdRequest request){
        return CompletableFuture.completedFuture(sendMPSubscribeMessageByLogId(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 sendMPSubscribeMessageByLogId(com.ywt.gapi.message.SendMPSubscribeMessageByLogIdRequest request, StreamObserver<com.ywt.gapi.message.SendMPSubscribeMessageByLogIdResponse> responseObserver){
        sendMPSubscribeMessageByLogIdAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }






}
