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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "deviceapis/device/v1/DeviceapisDeviceRtspV1.pbrpc.h"
#import "deviceapis/device/v1/DeviceapisDeviceRtspV1.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 DEVICEAPISDEVICEV1RtspService

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

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

#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 GetRtsp(GetRtspRequest) returns (GetRtspResponse)

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

#pragma mark SaveRtsp(SaveRtspRequest) returns (SaveRtspResponse)

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

@end
#endif
