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

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

@implementation KEYAPISACCESSCONTROLV1RoomUserService

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

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

#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 GetRoomUserList(GetRoomUserListRequest) returns (stream GetRoomUserListResponse)

/**
 * Метод получения списка связей помещений и пользователей.
 * Метод доступен для: admin, service, bti, ltp_first
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getRoomUserListWithRequest:(KEYAPISACCESSCONTROLV1GetRoomUserListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISACCESSCONTROLV1GetRoomUserListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetRoomUserListWithRequest: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 *)RPCToGetRoomUserListWithRequest:(KEYAPISACCESSCONTROLV1GetRoomUserListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISACCESSCONTROLV1GetRoomUserListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetRoomUserList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSCONTROLV1GetRoomUserListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка связей помещений и пользователей.
 * Метод доступен для: admin, service, bti, ltp_first
 */
- (GRPCUnaryProtoCall *)getRoomUserListWithMessage:(KEYAPISACCESSCONTROLV1GetRoomUserListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetRoomUserList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSCONTROLV1GetRoomUserListResponse class]];
}

#pragma mark GetRoomUserCount(GetRoomUserCountRequest) returns (GetRoomUserCountResponse)

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

@end
#endif
