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

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

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

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

#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 EditTicker(EditTickerRequest) returns (EditTickerResponse)

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

#pragma mark GetTicker(GetTickerRequest) returns (GetTickerResponse)

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

@end
#endif
