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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "deviceapis/device/v1/DeviceapisDeviceRelayV1.pbrpc.h"
#import "deviceapis/device/v1/DeviceapisDeviceRelayV1.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/GPBFieldMask.pbobjc.h>
#else
#import "GPBFieldMask.pbobjc.h"
#endif
#import "deviceapis/device/v1/DeviceapisDeviceCommonV1.pbobjc.h"
#import "protoc-gen-openapiv2/options/Annotations.pbobjc.h"

@implementation DEVICEAPISDEVICEV1RelayService

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

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

#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 PostRelayClose(PostRelayCloseRequest) returns (PostRelayCloseResponse)

/**
 * Метод закрытия реле.
 * Закрытие реле принудительно без учета времени открытия.
 * Отмена режима постоянного открытия
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postRelayCloseWithRequest:(DEVICEAPISDEVICEV1PostRelayCloseRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostRelayCloseResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostRelayCloseWithRequest: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 *)RPCToPostRelayCloseWithRequest:(DEVICEAPISDEVICEV1PostRelayCloseRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostRelayCloseResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostRelayClose"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1PostRelayCloseResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод закрытия реле.
 * Закрытие реле принудительно без учета времени открытия.
 * Отмена режима постоянного открытия
 */
- (GRPCUnaryProtoCall *)postRelayCloseWithMessage:(DEVICEAPISDEVICEV1PostRelayCloseRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostRelayClose"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1PostRelayCloseResponse class]];
}

#pragma mark PostRelayOpen(PostRelayOpenRequest) returns (PostRelayOpenResponse)

/**
 * Метод открытия реле
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postRelayOpenWithRequest:(DEVICEAPISDEVICEV1PostRelayOpenRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostRelayOpenResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostRelayOpenWithRequest: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 *)RPCToPostRelayOpenWithRequest:(DEVICEAPISDEVICEV1PostRelayOpenRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostRelayOpenResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostRelayOpen"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1PostRelayOpenResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод открытия реле
 */
- (GRPCUnaryProtoCall *)postRelayOpenWithMessage:(DEVICEAPISDEVICEV1PostRelayOpenRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostRelayOpen"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1PostRelayOpenResponse class]];
}

#pragma mark PostRelayOpenPermanently(PostRelayOpenPermanentlyRequest) returns (PostRelayOpenPermanentlyResponse)

/**
 * Метод открытия реле без дальнейшего закрытия
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postRelayOpenPermanentlyWithRequest:(DEVICEAPISDEVICEV1PostRelayOpenPermanentlyRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostRelayOpenPermanentlyResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostRelayOpenPermanentlyWithRequest: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 *)RPCToPostRelayOpenPermanentlyWithRequest:(DEVICEAPISDEVICEV1PostRelayOpenPermanentlyRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostRelayOpenPermanentlyResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostRelayOpenPermanently"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1PostRelayOpenPermanentlyResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод открытия реле без дальнейшего закрытия
 */
- (GRPCUnaryProtoCall *)postRelayOpenPermanentlyWithMessage:(DEVICEAPISDEVICEV1PostRelayOpenPermanentlyRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostRelayOpenPermanently"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1PostRelayOpenPermanentlyResponse class]];
}

#pragma mark EditRelayPropsOpen(EditRelayPropsOpenRequest) returns (EditRelayPropsOpenResponse)

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

#pragma mark GetRelayOpenList(GetRelayOpenListRequest) returns (GetRelayOpenListResponse)

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

#pragma mark EditRelayPropsDtmf(EditRelayPropsDtmfRequest) returns (EditRelayPropsDtmfResponse)

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

#pragma mark GetRelayDtmfList(GetRelayDtmfListRequest) returns (GetRelayDtmfListResponse)

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

#pragma mark GetRelayStatusList(GetRelayStatusListRequest) returns (GetRelayStatusListResponse)

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

@end
#endif
