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

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

#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"

@implementation KEYAPISDIALV1CallService

#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.dial.v1"
                 serviceName:@"CallService"
                 callOptions:callOptions];
}

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

#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 PostCall(PostCallRequest) returns (PostCallResponse)

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

#pragma mark PostCallCancel(PostCallCancelRequest) returns (PostCallCancelResponse)

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

@end
#endif
