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

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

#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#import "google/protobuf/Descriptor.pbobjc.h"
#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBTimestamp.pbobjc.h>
#else
#import "GPBTimestamp.pbobjc.h"
#endif
#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBWrappers.pbobjc.h>
#else
#import "GPBWrappers.pbobjc.h"
#endif

@implementation KEYAPISECOSYSTEMV1LegoAdapterService

#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.ecosystem.v1"
                 serviceName:@"LegoAdapterService"
                 callOptions:callOptions];
}

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

#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 GetLegoAdapterServiceCheck(GetLegoAdapterServiceCheckRequest) returns (GetLegoAdapterServiceCheckResponse)

/**
 * Метод проверки услуги.
 * Возвращает true если хотя бы у одного аккаунта на квартире есть нужный сервис и он содержит активный компонент.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getLegoAdapterServiceCheckWithRequest:(KEYAPISECOSYSTEMV1GetLegoAdapterServiceCheckRequest *)request handler:(void(^)(KEYAPISECOSYSTEMV1GetLegoAdapterServiceCheckResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetLegoAdapterServiceCheckWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод проверки услуги.
 * Возвращает true если хотя бы у одного аккаунта на квартире есть нужный сервис и он содержит активный компонент.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetLegoAdapterServiceCheckWithRequest:(KEYAPISECOSYSTEMV1GetLegoAdapterServiceCheckRequest *)request handler:(void(^)(KEYAPISECOSYSTEMV1GetLegoAdapterServiceCheckResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetLegoAdapterServiceCheck"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISECOSYSTEMV1GetLegoAdapterServiceCheckResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод проверки услуги.
 * Возвращает true если хотя бы у одного аккаунта на квартире есть нужный сервис и он содержит активный компонент.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)getLegoAdapterServiceCheckWithMessage:(KEYAPISECOSYSTEMV1GetLegoAdapterServiceCheckRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetLegoAdapterServiceCheck"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISECOSYSTEMV1GetLegoAdapterServiceCheckResponse class]];
}

@end
#endif
