// Code generated by gRPC proto compiler.  DO NOT EDIT!
// source: keyapis/exchange/v1/keyapis_exchange_message_v1.proto

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/exchange/v1/KeyapisExchangeMessageV1.pbrpc.h"
#import "keyapis/exchange/v1/KeyapisExchangeMessageV1.pbobjc.h"
#import <ProtoRPC/ProtoRPCLegacy.h>
#import <RxLibrary/GRXWriter+Immediate.h>

#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBWrappers.pbobjc.h>
#else
#import "GPBWrappers.pbobjc.h"
#endif
#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBTimestamp.pbobjc.h>
#else
#import "GPBTimestamp.pbobjc.h"
#endif

@implementation KEYAPISEXCHANGEYV1MessageService

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-designated-initializers"

// Designated initializer
- (instancetype)initWithHost:(NSString *)host callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [super initWithHost:host
                 packageName:@"keyapis.exchange.v1"
                 serviceName:@"MessageService"
                 callOptions:callOptions];
}

- (instancetype)initWithHost:(NSString *)host {
  return [super initWithHost:host
                 packageName:@"keyapis.exchange.v1"
                 serviceName:@"MessageService"];
}

#pragma clang diagnostic pop

// Override superclass initializer to disallow different package and service names.
- (instancetype)initWithHost:(NSString *)host
                 packageName:(NSString *)packageName
                 serviceName:(NSString *)serviceName {
  return [self initWithHost:host];
}

- (instancetype)initWithHost:(NSString *)host
                 packageName:(NSString *)packageName
                 serviceName:(NSString *)serviceName
                 callOptions:(GRPCCallOptions *)callOptions {
  return [self initWithHost:host callOptions:callOptions];
}

#pragma mark - Class Methods

+ (instancetype)serviceWithHost:(NSString *)host {
  return [[self alloc] initWithHost:host];
}

+ (instancetype)serviceWithHost:(NSString *)host callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [[self alloc] initWithHost:host callOptions:callOptions];
}

#pragma mark - Method Implementations

#pragma mark PostMessageFullDuplex(stream PostMessageFullDuplexRequest) returns (stream PostMessageFullDuplexResponse)

/**
 * Полнодуплексный метод отправки задач и получения их результатов выполнения.
 * Метод доступен для: admin, service, application(exchange:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postMessageFullDuplexWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, KEYAPISEXCHANGEYV1PostMessageFullDuplexResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToPostMessageFullDuplexWithRequestsWriter:requestWriter eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Полнодуплексный метод отправки задач и получения их результатов выполнения.
 * Метод доступен для: admin, service, application(exchange:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostMessageFullDuplexWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, KEYAPISEXCHANGEYV1PostMessageFullDuplexResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"PostMessageFullDuplex"
            requestsWriter:requestWriter
             responseClass:[KEYAPISEXCHANGEYV1PostMessageFullDuplexResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Полнодуплексный метод отправки задач и получения их результатов выполнения.
 * Метод доступен для: admin, service, application(exchange:edit)
 */
- (GRPCStreamingProtoCall *)postMessageFullDuplexWithResponseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostMessageFullDuplex"
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISEXCHANGEYV1PostMessageFullDuplexResponse class]];
}

#pragma mark PostMessagePushCall(PostMessagePushCallRequest) returns (PostMessagePushCallResponse)

/**
 * Метод отправки задач и получения их результатов выполнения.
 * Метод доступен для: admin, service, application(exchange:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postMessagePushCallWithRequest:(KEYAPISEXCHANGEYV1PostMessagePushCallRequest *)request handler:(void(^)(KEYAPISEXCHANGEYV1PostMessagePushCallResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostMessagePushCallWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод отправки задач и получения их результатов выполнения.
 * Метод доступен для: admin, service, application(exchange:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostMessagePushCallWithRequest:(KEYAPISEXCHANGEYV1PostMessagePushCallRequest *)request handler:(void(^)(KEYAPISEXCHANGEYV1PostMessagePushCallResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostMessagePushCall"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISEXCHANGEYV1PostMessagePushCallResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод отправки задач и получения их результатов выполнения.
 * Метод доступен для: admin, service, application(exchange:edit)
 */
- (GRPCUnaryProtoCall *)postMessagePushCallWithMessage:(KEYAPISEXCHANGEYV1PostMessagePushCallRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostMessagePushCall"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISEXCHANGEYV1PostMessagePushCallResponse class]];
}

#pragma mark PostMessageMobilePushCall(PostMessageMobilePushCallRequest) returns (PostMessageMobilePushCallResponse)

/**
 * Метод отправки задач и получения их результатов выполнения для мобильного приложения.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postMessageMobilePushCallWithRequest:(KEYAPISEXCHANGEYV1PostMessageMobilePushCallRequest *)request handler:(void(^)(KEYAPISEXCHANGEYV1PostMessageMobilePushCallResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostMessageMobilePushCallWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод отправки задач и получения их результатов выполнения для мобильного приложения.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostMessageMobilePushCallWithRequest:(KEYAPISEXCHANGEYV1PostMessageMobilePushCallRequest *)request handler:(void(^)(KEYAPISEXCHANGEYV1PostMessageMobilePushCallResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostMessageMobilePushCall"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISEXCHANGEYV1PostMessageMobilePushCallResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод отправки задач и получения их результатов выполнения для мобильного приложения.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)postMessageMobilePushCallWithMessage:(KEYAPISEXCHANGEYV1PostMessageMobilePushCallRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostMessageMobilePushCall"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISEXCHANGEYV1PostMessageMobilePushCallResponse class]];
}

@end
#endif
