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

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

#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBTimestamp.pbobjc.h>
#else
#import "GPBTimestamp.pbobjc.h"
#endif
#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#import "google/protobuf/Descriptor.pbobjc.h"
#import "keyapis/device/v1/KeyapisDeviceDeviceV1.pbobjc.h"

@implementation KEYAPISDEVICEV1CmsPhoneService

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

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

#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 GetCmsPhone(GetCmsPhoneRequest) returns (GetCmsPhoneResponse)

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

#pragma mark GetCmsPhoneList(GetCmsPhoneListRequest) returns (stream GetCmsPhoneListResponse)

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

#pragma mark GetCmsPhoneCount(GetCmsPhoneCountRequest) returns (GetCmsPhoneCountResponse)

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

#pragma mark DeleteCmsPhone(DeleteCmsPhoneRequest) returns (DeleteCmsPhoneResponse)

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

#pragma mark DeleteCmsPhoneDeviceId(DeleteCmsPhoneDeviceIdRequest) returns (DeleteCmsPhoneDeviceIdResponse)

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

#pragma mark DeleteCmsPhoneOrponId(DeleteCmsPhoneOrponIdRequest) returns (DeleteCmsPhoneOrponIdResponse)

/**
 * Метод удаления аналоговой трубки по идентификатору ОРПОН.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)deleteCmsPhoneOrponIdWithRequest:(KEYAPISDEVICEV1DeleteCmsPhoneOrponIdRequest *)request handler:(void(^)(KEYAPISDEVICEV1DeleteCmsPhoneOrponIdResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToDeleteCmsPhoneOrponIdWithRequest: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 *)RPCToDeleteCmsPhoneOrponIdWithRequest:(KEYAPISDEVICEV1DeleteCmsPhoneOrponIdRequest *)request handler:(void(^)(KEYAPISDEVICEV1DeleteCmsPhoneOrponIdResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"DeleteCmsPhoneOrponId"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISDEVICEV1DeleteCmsPhoneOrponIdResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаления аналоговой трубки по идентификатору ОРПОН.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)deleteCmsPhoneOrponIdWithMessage:(KEYAPISDEVICEV1DeleteCmsPhoneOrponIdRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"DeleteCmsPhoneOrponId"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISDEVICEV1DeleteCmsPhoneOrponIdResponse class]];
}

#pragma mark DeleteCmsPhoneOrponIdRoomNumber(DeleteCmsPhoneOrponIdRoomNumberRequest) returns (DeleteCmsPhoneOrponIdRoomNumberResponse)

/**
 * Метод удаления аналоговой трубки по идентификатору ОРПОН и номеру квартиры.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)deleteCmsPhoneOrponIdRoomNumberWithRequest:(KEYAPISDEVICEV1DeleteCmsPhoneOrponIdRoomNumberRequest *)request handler:(void(^)(KEYAPISDEVICEV1DeleteCmsPhoneOrponIdRoomNumberResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToDeleteCmsPhoneOrponIdRoomNumberWithRequest: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 *)RPCToDeleteCmsPhoneOrponIdRoomNumberWithRequest:(KEYAPISDEVICEV1DeleteCmsPhoneOrponIdRoomNumberRequest *)request handler:(void(^)(KEYAPISDEVICEV1DeleteCmsPhoneOrponIdRoomNumberResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"DeleteCmsPhoneOrponIdRoomNumber"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISDEVICEV1DeleteCmsPhoneOrponIdRoomNumberResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаления аналоговой трубки по идентификатору ОРПОН и номеру квартиры.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)deleteCmsPhoneOrponIdRoomNumberWithMessage:(KEYAPISDEVICEV1DeleteCmsPhoneOrponIdRoomNumberRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"DeleteCmsPhoneOrponIdRoomNumber"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISDEVICEV1DeleteCmsPhoneOrponIdRoomNumberResponse class]];
}

#pragma mark PostCmsPhoneRefresh(PostCmsPhoneRefreshRequest) returns (PostCmsPhoneRefreshResponse)

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

#pragma mark DeleteCmsPhoneOrponRoomNumberDeviceId(DeleteCmsPhoneOrponRoomNumberDeviceIdRequest) returns (DeleteCmsPhoneOrponRoomNumberDeviceIdResponse)

/**
 * Метод удаления аналоговой трубки по идентификатору ОРПОН, номеру квартиры и идентификатору устройства.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)deleteCmsPhoneOrponRoomNumberDeviceIdWithRequest:(KEYAPISDEVICEV1DeleteCmsPhoneOrponRoomNumberDeviceIdRequest *)request handler:(void(^)(KEYAPISDEVICEV1DeleteCmsPhoneOrponRoomNumberDeviceIdResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToDeleteCmsPhoneOrponRoomNumberDeviceIdWithRequest: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 *)RPCToDeleteCmsPhoneOrponRoomNumberDeviceIdWithRequest:(KEYAPISDEVICEV1DeleteCmsPhoneOrponRoomNumberDeviceIdRequest *)request handler:(void(^)(KEYAPISDEVICEV1DeleteCmsPhoneOrponRoomNumberDeviceIdResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"DeleteCmsPhoneOrponRoomNumberDeviceId"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISDEVICEV1DeleteCmsPhoneOrponRoomNumberDeviceIdResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаления аналоговой трубки по идентификатору ОРПОН, номеру квартиры и идентификатору устройства.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)deleteCmsPhoneOrponRoomNumberDeviceIdWithMessage:(KEYAPISDEVICEV1DeleteCmsPhoneOrponRoomNumberDeviceIdRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"DeleteCmsPhoneOrponRoomNumberDeviceId"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISDEVICEV1DeleteCmsPhoneOrponRoomNumberDeviceIdResponse class]];
}

@end
#endif
