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

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

@implementation DEVICEAPISDEVICEV1FtpService

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

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

#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 EditFtp(EditFtpRequest) returns (EditFtpResponse)

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

#pragma mark GetFtp(GetFtpRequest) returns (GetFtpResponse)

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

#pragma mark PostFtpBackup(PostFtpBackupRequest) returns (PostFtpBackupResponse)

/**
 * Создать бэкап и положить на FTP папку
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postFtpBackupWithRequest:(DEVICEAPISDEVICEV1PostFtpBackupRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostFtpBackupResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostFtpBackupWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Создать бэкап и положить на FTP папку
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostFtpBackupWithRequest:(DEVICEAPISDEVICEV1PostFtpBackupRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostFtpBackupResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostFtpBackup"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1PostFtpBackupResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Создать бэкап и положить на FTP папку
 */
- (GRPCUnaryProtoCall *)postFtpBackupWithMessage:(DEVICEAPISDEVICEV1PostFtpBackupRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostFtpBackup"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1PostFtpBackupResponse class]];
}

#pragma mark PostFtpBackupApply(PostFtpBackupApplyRequest) returns (PostFtpBackupApplyResponse)

/**
 * Скачать бэкап из FTP папки и применить
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postFtpBackupApplyWithRequest:(DEVICEAPISDEVICEV1PostFtpBackupApplyRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostFtpBackupApplyResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostFtpBackupApplyWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Скачать бэкап из FTP папки и применить
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostFtpBackupApplyWithRequest:(DEVICEAPISDEVICEV1PostFtpBackupApplyRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostFtpBackupApplyResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostFtpBackupApply"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1PostFtpBackupApplyResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Скачать бэкап из FTP папки и применить
 */
- (GRPCUnaryProtoCall *)postFtpBackupApplyWithMessage:(DEVICEAPISDEVICEV1PostFtpBackupApplyRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostFtpBackupApply"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1PostFtpBackupApplyResponse class]];
}

@end
#endif
