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

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

#import "deviceapis/device/v1/DeviceapisDeviceCommonV1.pbobjc.h"
#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#import "protoc-gen-openapiv2/options/Annotations.pbobjc.h"

@implementation DEVICEAPISDEVICEV1CodeService

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

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

#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 DeleteCode(DeleteCodeRequest) returns (DeleteCodeResponse)

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

#pragma mark DeleteCodeList(DeleteCodeListRequest) returns (DeleteCodeListResponse)

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

#pragma mark GetCode(GetCodeRequest) returns (GetCodeResponse)

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

#pragma mark GetCodeCount(GetCodeCountRequest) returns (GetCodeCountResponse)

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

#pragma mark GetCodeList(GetCodeListRequest) returns (GetCodeListResponse)

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

#pragma mark SaveCode(SaveCodeRequest) returns (SaveCodeResponse)

/**
 * Метод создания кода доступа
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)saveCodeWithRequest:(DEVICEAPISDEVICEV1SaveCodeRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1SaveCodeResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToSaveCodeWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод создания кода доступа
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToSaveCodeWithRequest:(DEVICEAPISDEVICEV1SaveCodeRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1SaveCodeResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"SaveCode"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1SaveCodeResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод создания кода доступа
 */
- (GRPCUnaryProtoCall *)saveCodeWithMessage:(DEVICEAPISDEVICEV1SaveCodeRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"SaveCode"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1SaveCodeResponse class]];
}

#pragma mark SaveCodeList(SaveCodeListRequest) returns (SaveCodeListResponse)

/**
 * Метод создания списка кодов доступа
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)saveCodeListWithRequest:(DEVICEAPISDEVICEV1SaveCodeListRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1SaveCodeListResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToSaveCodeListWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод создания списка кодов доступа
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToSaveCodeListWithRequest:(DEVICEAPISDEVICEV1SaveCodeListRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1SaveCodeListResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"SaveCodeList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1SaveCodeListResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод создания списка кодов доступа
 */
- (GRPCUnaryProtoCall *)saveCodeListWithMessage:(DEVICEAPISDEVICEV1SaveCodeListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"SaveCodeList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1SaveCodeListResponse class]];
}

@end
#endif
