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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/access_control/v1/KeyapisAccessControlRoomDeviceV1.pbrpc.h"
#import "keyapis/access_control/v1/KeyapisAccessControlRoomDeviceV1.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
#import "keyapis/access_control/v1/KeyapisAccessControlAccessControlV1.pbobjc.h"

@implementation KEYAPISACCESSCONTROLV1RoomDeviceService

#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:@"RoomDeviceService"
                 callOptions:callOptions];
}

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

#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 PutRoomDeviceAttach(PutRoomDeviceAttachRequest) returns (PutRoomDeviceAttachResponse)

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

#pragma mark PutRoomDeviceDetach(PutRoomDeviceDetachRequest) returns (PutRoomDeviceDetachResponse)

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

#pragma mark GetRoomDeviceList(GetRoomDeviceListRequest) returns (stream GetRoomDeviceListResponse)

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

#pragma mark GetRoomDeviceCount(GetRoomDeviceCountRequest) returns (GetRoomDeviceCountResponse)

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

@end
#endif
