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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/device/v1/KeyapisDeviceSipPhoneV1.pbrpc.h"
#import "keyapis/device/v1/KeyapisDeviceSipPhoneV1.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 KEYAPISDEVICEV1SipPhoneService

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

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

#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 GetSipPhone(GetSipPhoneRequest) returns (GetSipPhoneResponse)

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

#pragma mark GetSipPhoneList(GetSipPhoneListRequest) returns (stream GetSipPhoneListResponse)

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

#pragma mark GetSipPhoneCount(GetSipPhoneCountRequest) returns (GetSipPhoneCountResponse)

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

#pragma mark PostSipPhoneGetList(PostSipPhoneGetListRequest) returns (PostSipPhoneGetListResponse)

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

#pragma mark PostSipPhoneGetCount(PostSipPhoneGetCountRequest) returns (PostSipPhoneGetCountResponse)

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

@end
#endif
