// Code generated by gRPC proto compiler.  DO NOT EDIT!
// source: keyapis/telemetry_control/v1/keyapis_telemetry_control_stream_v1.proto

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

#import "google/api/FieldBehavior.pbobjc.h"
#import "keyapis/telemetry_control/v1/KeyapisTelemetryControlBuildingV1.pbobjc.h"
#import "keyapis/telemetry_control/v1/KeyapisTelemetryControlDeviceV1.pbobjc.h"

@implementation KEYAPISTELEMETRYCONTROLV1StreamService

#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:@"keyapis.telemetry_control.v1"
                 serviceName:@"StreamService"
                 callOptions:callOptions];
}

- (instancetype)initWithHost:(NSString *)host {
  return [super initWithHost:host
                 packageName:@"keyapis.telemetry_control.v1"
                 serviceName:@"StreamService"];
}

#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 PostResourceFullDuplex(stream PostResourceFullDuplexRequest) returns (stream PostResourceFullDuplexResponse)

/**
 * Полнодуплексный отправки статусов получения ресурсов на сервер и получения изменения ресурсов со стороны сервера.
 * Метод доступен для: ApiKey: Без учета разрешений. С контролем привязки домов к группе
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postResourceFullDuplexWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYCONTROLV1PostResourceFullDuplexResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToPostResourceFullDuplexWithRequestsWriter:requestWriter eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Полнодуплексный отправки статусов получения ресурсов на сервер и получения изменения ресурсов со стороны сервера.
 * Метод доступен для: ApiKey: Без учета разрешений. С контролем привязки домов к группе
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostResourceFullDuplexWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYCONTROLV1PostResourceFullDuplexResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"PostResourceFullDuplex"
            requestsWriter:requestWriter
             responseClass:[KEYAPISTELEMETRYCONTROLV1PostResourceFullDuplexResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Полнодуплексный отправки статусов получения ресурсов на сервер и получения изменения ресурсов со стороны сервера.
 * Метод доступен для: ApiKey: Без учета разрешений. С контролем привязки домов к группе
 */
- (GRPCStreamingProtoCall *)postResourceFullDuplexWithResponseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostResourceFullDuplex"
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1PostResourceFullDuplexResponse class]];
}

@end
#endif
