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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/access_control/v1/KeyapisAccessControlAccessControlV1.pbrpc.h"
#import "keyapis/access_control/v1/KeyapisAccessControlAccessControlV1.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/GPBTimestamp.pbobjc.h>
#else
#import "GPBTimestamp.pbobjc.h"
#endif
#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBWrappers.pbobjc.h>
#else
#import "GPBWrappers.pbobjc.h"
#endif

@implementation KEYAPISACCESSCONTROLV1AccessControlService

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

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

#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 GetRoom(GetRoomRequest) returns (GetRoomResponse)

/**
 * Метод получения Квартиры.
 * Метод доступен для: admin, service, ltp_first, owner, employee
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getRoomWithRequest:(KEYAPISACCESSCONTROLV1GetRoomRequest *)request handler:(void(^)(KEYAPISACCESSCONTROLV1GetRoomResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetRoomWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения Квартиры.
 * Метод доступен для: admin, service, ltp_first, owner, employee
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetRoomWithRequest:(KEYAPISACCESSCONTROLV1GetRoomRequest *)request handler:(void(^)(KEYAPISACCESSCONTROLV1GetRoomResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetRoom"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSCONTROLV1GetRoomResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения Квартиры.
 * Метод доступен для: admin, service, ltp_first, owner, employee
 */
- (GRPCUnaryProtoCall *)getRoomWithMessage:(KEYAPISACCESSCONTROLV1GetRoomRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetRoom"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSCONTROLV1GetRoomResponse class]];
}

#pragma mark GetRoomList(GetRoomListRequest) returns (stream GetRoomListResponse)

/**
 * Метод получения списка квартир.
 * Метод доступен для: admin, service, ltp_first, owner, employee, bti
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getRoomListWithRequest:(KEYAPISACCESSCONTROLV1GetRoomListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISACCESSCONTROLV1GetRoomListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetRoomListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения списка квартир.
 * Метод доступен для: admin, service, ltp_first, owner, employee, bti
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetRoomListWithRequest:(KEYAPISACCESSCONTROLV1GetRoomListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISACCESSCONTROLV1GetRoomListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetRoomList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSCONTROLV1GetRoomListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка квартир.
 * Метод доступен для: admin, service, ltp_first, owner, employee, bti
 */
- (GRPCUnaryProtoCall *)getRoomListWithMessage:(KEYAPISACCESSCONTROLV1GetRoomListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetRoomList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSCONTROLV1GetRoomListResponse class]];
}

#pragma mark GetRoomCount(GetRoomCountRequest) returns (GetRoomCountResponse)

/**
 * Метод получения количества квартир.
 * Метод доступен для: admin, service, ltp_first, owner, employee, bti
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getRoomCountWithRequest:(KEYAPISACCESSCONTROLV1GetRoomCountRequest *)request handler:(void(^)(KEYAPISACCESSCONTROLV1GetRoomCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetRoomCountWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения количества квартир.
 * Метод доступен для: admin, service, ltp_first, owner, employee, bti
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetRoomCountWithRequest:(KEYAPISACCESSCONTROLV1GetRoomCountRequest *)request handler:(void(^)(KEYAPISACCESSCONTROLV1GetRoomCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetRoomCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSCONTROLV1GetRoomCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества квартир.
 * Метод доступен для: admin, service, ltp_first, owner, employee, bti
 */
- (GRPCUnaryProtoCall *)getRoomCountWithMessage:(KEYAPISACCESSCONTROLV1GetRoomCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetRoomCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSCONTROLV1GetRoomCountResponse class]];
}

#pragma mark PatchRoomSetSubscriptionMode(PatchRoomSetSubscriptionModeRequest) returns (PatchRoomSetSubscriptionModeResponse)

/**
 * Метод установки режима подписок.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)patchRoomSetSubscriptionModeWithRequest:(KEYAPISACCESSCONTROLV1PatchRoomSetSubscriptionModeRequest *)request handler:(void(^)(KEYAPISACCESSCONTROLV1PatchRoomSetSubscriptionModeResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPatchRoomSetSubscriptionModeWithRequest: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 *)RPCToPatchRoomSetSubscriptionModeWithRequest:(KEYAPISACCESSCONTROLV1PatchRoomSetSubscriptionModeRequest *)request handler:(void(^)(KEYAPISACCESSCONTROLV1PatchRoomSetSubscriptionModeResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PatchRoomSetSubscriptionMode"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSCONTROLV1PatchRoomSetSubscriptionModeResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод установки режима подписок.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)patchRoomSetSubscriptionModeWithMessage:(KEYAPISACCESSCONTROLV1PatchRoomSetSubscriptionModeRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PatchRoomSetSubscriptionMode"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSCONTROLV1PatchRoomSetSubscriptionModeResponse class]];
}

#pragma mark GetRoomOrponNumberExists(GetRoomOrponNumberExistsRequest) returns (GetRoomOrponNumberExistsResponse)

/**
 * Метод проверки существования квартиры по ОРПОН и её номеру.
 * Возвращает true если найдена квартира с указанными параметрами.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getRoomOrponNumberExistsWithRequest:(KEYAPISACCESSCONTROLV1GetRoomOrponNumberExistsRequest *)request handler:(void(^)(KEYAPISACCESSCONTROLV1GetRoomOrponNumberExistsResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetRoomOrponNumberExistsWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод проверки существования квартиры по ОРПОН и её номеру.
 * Возвращает true если найдена квартира с указанными параметрами.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetRoomOrponNumberExistsWithRequest:(KEYAPISACCESSCONTROLV1GetRoomOrponNumberExistsRequest *)request handler:(void(^)(KEYAPISACCESSCONTROLV1GetRoomOrponNumberExistsResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetRoomOrponNumberExists"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSCONTROLV1GetRoomOrponNumberExistsResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод проверки существования квартиры по ОРПОН и её номеру.
 * Возвращает true если найдена квартира с указанными параметрами.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)getRoomOrponNumberExistsWithMessage:(KEYAPISACCESSCONTROLV1GetRoomOrponNumberExistsRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetRoomOrponNumberExists"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSCONTROLV1GetRoomOrponNumberExistsResponse class]];
}

@end
#endif
