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

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

@implementation KEYAPISDIALV1TrunkConfigService

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

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

#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 GetTrunkConfig(GetTrunkConfigRequest) returns (GetTrunkConfigResponse)

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

#pragma mark GetTrunkConfigList(GetTrunkConfigListRequest) returns (stream GetTrunkConfigListResponse)

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

#pragma mark GetTrunkConfigCount(GetTrunkConfigCountRequest) returns (GetTrunkConfigCountResponse)

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

#pragma mark PostTrunkConfig(PostTrunkConfigRequest) returns (PostTrunkConfigResponse)

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

#pragma mark DeleteTrunkConfig(DeleteTrunkConfigRequest) returns (DeleteTrunkConfigResponse)

/**
 * Метод архивации trunk-конфигурации.
 * Метод доступен для: admin, service, device_admin
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)deleteTrunkConfigWithRequest:(KEYAPISDIALV1DeleteTrunkConfigRequest *)request handler:(void(^)(KEYAPISDIALV1DeleteTrunkConfigResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToDeleteTrunkConfigWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод архивации trunk-конфигурации.
 * Метод доступен для: admin, service, device_admin
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToDeleteTrunkConfigWithRequest:(KEYAPISDIALV1DeleteTrunkConfigRequest *)request handler:(void(^)(KEYAPISDIALV1DeleteTrunkConfigResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"DeleteTrunkConfig"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISDIALV1DeleteTrunkConfigResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод архивации trunk-конфигурации.
 * Метод доступен для: admin, service, device_admin
 */
- (GRPCUnaryProtoCall *)deleteTrunkConfigWithMessage:(KEYAPISDIALV1DeleteTrunkConfigRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"DeleteTrunkConfig"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISDIALV1DeleteTrunkConfigResponse class]];
}

#pragma mark PostTrunkConfigRestore(PostTrunkConfigRestoreRequest) returns (PostTrunkConfigRestoreResponse)

/**
 * Метод разархивации trunk-конфигурации.
 * Метод доступен для: admin, service, device_admin
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postTrunkConfigRestoreWithRequest:(KEYAPISDIALV1PostTrunkConfigRestoreRequest *)request handler:(void(^)(KEYAPISDIALV1PostTrunkConfigRestoreResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostTrunkConfigRestoreWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод разархивации trunk-конфигурации.
 * Метод доступен для: admin, service, device_admin
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostTrunkConfigRestoreWithRequest:(KEYAPISDIALV1PostTrunkConfigRestoreRequest *)request handler:(void(^)(KEYAPISDIALV1PostTrunkConfigRestoreResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostTrunkConfigRestore"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISDIALV1PostTrunkConfigRestoreResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод разархивации trunk-конфигурации.
 * Метод доступен для: admin, service, device_admin
 */
- (GRPCUnaryProtoCall *)postTrunkConfigRestoreWithMessage:(KEYAPISDIALV1PostTrunkConfigRestoreRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostTrunkConfigRestore"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISDIALV1PostTrunkConfigRestoreResponse class]];
}

@end
#endif
