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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/telemetry_control/v1/KeyapisTelemetryControlBuildingV1.pbrpc.h"
#import "keyapis/telemetry_control/v1/KeyapisTelemetryControlBuildingV1.pbobjc.h"
#import <ProtoRPC/ProtoRPCLegacy.h>
#import <RxLibrary/GRXWriter+Immediate.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/GPBWrappers.pbobjc.h>
#else
#import "GPBWrappers.pbobjc.h"
#endif
#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBTimestamp.pbobjc.h>
#else
#import "GPBTimestamp.pbobjc.h"
#endif

@implementation KEYAPISTELEMETRYCONTROLV1BuildingService

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

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

#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 GetBuilding(GetBuildingRequest) returns (GetBuildingResponse)

/**
 * Метод получения объекта строительства.
 * Разрешения: telemetry_control:building:card, telemetry_control:building:card:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений.
 * Метод доступен для: ApiKey: При наличии разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getBuildingWithRequest:(KEYAPISTELEMETRYCONTROLV1GetBuildingRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1GetBuildingResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetBuildingWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения объекта строительства.
 * Разрешения: telemetry_control:building:card, telemetry_control:building:card:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений.
 * Метод доступен для: ApiKey: При наличии разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetBuildingWithRequest:(KEYAPISTELEMETRYCONTROLV1GetBuildingRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1GetBuildingResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetBuilding"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetBuildingResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения объекта строительства.
 * Разрешения: telemetry_control:building:card, telemetry_control:building:card:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений.
 * Метод доступен для: ApiKey: При наличии разрешений
 */
- (GRPCUnaryProtoCall *)getBuildingWithMessage:(KEYAPISTELEMETRYCONTROLV1GetBuildingRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetBuilding"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetBuildingResponse class]];
}

#pragma mark GetBuildingList(GetBuildingListRequest) returns (stream GetBuildingListResponse)

/**
 * Метод получения списка объектов строительства.
 * Разрешения: telemetry_control:building:list, telemetry_control:building:list:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений.
 * Метод доступен для: ApiKey: При наличии разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getBuildingListWithRequest:(KEYAPISTELEMETRYCONTROLV1GetBuildingListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYCONTROLV1GetBuildingListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetBuildingListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения списка объектов строительства.
 * Разрешения: telemetry_control:building:list, telemetry_control:building:list:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений.
 * Метод доступен для: ApiKey: При наличии разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetBuildingListWithRequest:(KEYAPISTELEMETRYCONTROLV1GetBuildingListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYCONTROLV1GetBuildingListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetBuildingList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetBuildingListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка объектов строительства.
 * Разрешения: telemetry_control:building:list, telemetry_control:building:list:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений.
 * Метод доступен для: ApiKey: При наличии разрешений
 */
- (GRPCUnaryProtoCall *)getBuildingListWithMessage:(KEYAPISTELEMETRYCONTROLV1GetBuildingListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetBuildingList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetBuildingListResponse class]];
}

#pragma mark GetBuildingCount(GetBuildingCountRequest) returns (GetBuildingCountResponse)

/**
 * Метод получения количества объектов строительства.
 * Разрешения: telemetry_control:building:list, telemetry_control:building:list:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений.
 * Метод доступен для: ApiKey: При наличии разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getBuildingCountWithRequest:(KEYAPISTELEMETRYCONTROLV1GetBuildingCountRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1GetBuildingCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetBuildingCountWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения количества объектов строительства.
 * Разрешения: telemetry_control:building:list, telemetry_control:building:list:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений.
 * Метод доступен для: ApiKey: При наличии разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetBuildingCountWithRequest:(KEYAPISTELEMETRYCONTROLV1GetBuildingCountRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1GetBuildingCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetBuildingCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetBuildingCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества объектов строительства.
 * Разрешения: telemetry_control:building:list, telemetry_control:building:list:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений.
 * Метод доступен для: ApiKey: При наличии разрешений
 */
- (GRPCUnaryProtoCall *)getBuildingCountWithMessage:(KEYAPISTELEMETRYCONTROLV1GetBuildingCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetBuildingCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetBuildingCountResponse class]];
}

#pragma mark PostBuilding(PostBuildingRequest) returns (PostBuildingResponse)

/**
 * Метод сохранения объекта строительства.
 * Поддерживает создание и обновление.
 * Разрешения: telemetry_control:building:save, telemetry_control:building:save:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postBuildingWithRequest:(KEYAPISTELEMETRYCONTROLV1PostBuildingRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1PostBuildingResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostBuildingWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод сохранения объекта строительства.
 * Поддерживает создание и обновление.
 * Разрешения: telemetry_control:building:save, telemetry_control:building:save:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostBuildingWithRequest:(KEYAPISTELEMETRYCONTROLV1PostBuildingRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1PostBuildingResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostBuilding"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1PostBuildingResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод сохранения объекта строительства.
 * Поддерживает создание и обновление.
 * Разрешения: telemetry_control:building:save, telemetry_control:building:save:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений
 */
- (GRPCUnaryProtoCall *)postBuildingWithMessage:(KEYAPISTELEMETRYCONTROLV1PostBuildingRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostBuilding"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1PostBuildingResponse class]];
}

#pragma mark PostBuildingFullDuplex(stream PostBuildingFullDuplexRequest) returns (stream PostBuildingFullDuplexResponse)

/**
 * Полнодуплексный метод отправки статусов на сервер и получения изменения со стороны сервера.
 * Разрешения: telemetry_control:building:list, telemetry_control:building:list:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений.
 * Метод доступен для: ApiKey: Без учета разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postBuildingFullDuplexWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYCONTROLV1PostBuildingFullDuplexResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToPostBuildingFullDuplexWithRequestsWriter:requestWriter eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Полнодуплексный метод отправки статусов на сервер и получения изменения со стороны сервера.
 * Разрешения: telemetry_control:building:list, telemetry_control:building:list:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений.
 * Метод доступен для: ApiKey: Без учета разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostBuildingFullDuplexWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYCONTROLV1PostBuildingFullDuplexResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"PostBuildingFullDuplex"
            requestsWriter:requestWriter
             responseClass:[KEYAPISTELEMETRYCONTROLV1PostBuildingFullDuplexResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Полнодуплексный метод отправки статусов на сервер и получения изменения со стороны сервера.
 * Разрешения: telemetry_control:building:list, telemetry_control:building:list:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. При наличии разрешений.
 * Метод доступен для: ApiKey: Без учета разрешений
 */
- (GRPCStreamingProtoCall *)postBuildingFullDuplexWithResponseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostBuildingFullDuplex"
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1PostBuildingFullDuplexResponse class]];
}

#pragma mark DeleteBuilding(DeleteBuildingRequest) returns (DeleteBuildingResponse)

/**
 * Метод удаления объекта строительства.
 * Разрешения: telemetry_control:building:remove, telemetry_control:building:remove:own.
 * Метод доступен для: admin, service, bti, seller, application, owner, employee. При наличии разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)deleteBuildingWithRequest:(KEYAPISTELEMETRYCONTROLV1DeleteBuildingRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1DeleteBuildingResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToDeleteBuildingWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод удаления объекта строительства.
 * Разрешения: telemetry_control:building:remove, telemetry_control:building:remove:own.
 * Метод доступен для: admin, service, bti, seller, application, owner, employee. При наличии разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToDeleteBuildingWithRequest:(KEYAPISTELEMETRYCONTROLV1DeleteBuildingRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1DeleteBuildingResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"DeleteBuilding"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1DeleteBuildingResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаления объекта строительства.
 * Разрешения: telemetry_control:building:remove, telemetry_control:building:remove:own.
 * Метод доступен для: admin, service, bti, seller, application, owner, employee. При наличии разрешений
 */
- (GRPCUnaryProtoCall *)deleteBuildingWithMessage:(KEYAPISTELEMETRYCONTROLV1DeleteBuildingRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"DeleteBuilding"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1DeleteBuildingResponse class]];
}

#pragma mark GetBuildingGroupList(GetBuildingGroupListRequest) returns (stream GetBuildingGroupListResponse)

/**
 * Метод получения списка связей объектов строительства и группы пользователя.
 * Метод доступен для: Token: admin, service, bti, seller. Без учета разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getBuildingGroupListWithRequest:(KEYAPISTELEMETRYCONTROLV1GetBuildingGroupListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYCONTROLV1GetBuildingGroupListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetBuildingGroupListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения списка связей объектов строительства и группы пользователя.
 * Метод доступен для: Token: admin, service, bti, seller. Без учета разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetBuildingGroupListWithRequest:(KEYAPISTELEMETRYCONTROLV1GetBuildingGroupListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYCONTROLV1GetBuildingGroupListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetBuildingGroupList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetBuildingGroupListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка связей объектов строительства и группы пользователя.
 * Метод доступен для: Token: admin, service, bti, seller. Без учета разрешений
 */
- (GRPCUnaryProtoCall *)getBuildingGroupListWithMessage:(KEYAPISTELEMETRYCONTROLV1GetBuildingGroupListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetBuildingGroupList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetBuildingGroupListResponse class]];
}

#pragma mark GetBuildingGroupCount(GetBuildingGroupCountRequest) returns (GetBuildingGroupCountResponse)

/**
 * Метод получения количества связей объектов строительства и группы пользователя.
 * Метод доступен для: Token: admin, service, bti, seller. Без учета разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getBuildingGroupCountWithRequest:(KEYAPISTELEMETRYCONTROLV1GetBuildingGroupCountRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1GetBuildingGroupCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetBuildingGroupCountWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения количества связей объектов строительства и группы пользователя.
 * Метод доступен для: Token: admin, service, bti, seller. Без учета разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetBuildingGroupCountWithRequest:(KEYAPISTELEMETRYCONTROLV1GetBuildingGroupCountRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1GetBuildingGroupCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetBuildingGroupCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetBuildingGroupCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества связей объектов строительства и группы пользователя.
 * Метод доступен для: Token: admin, service, bti, seller. Без учета разрешений
 */
- (GRPCUnaryProtoCall *)getBuildingGroupCountWithMessage:(KEYAPISTELEMETRYCONTROLV1GetBuildingGroupCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetBuildingGroupCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetBuildingGroupCountResponse class]];
}

#pragma mark PutBuildingGroupAttach(PutBuildingGroupAttachRequest) returns (PutBuildingGroupAttachResponse)

/**
 * Метод сохранения связей объектов строительства и группы пользователя.
 * Поддерживает только создание.
 * Метод доступен для: Token: admin, service, bti, seller. Без учета разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)putBuildingGroupAttachWithRequest:(KEYAPISTELEMETRYCONTROLV1PutBuildingGroupAttachRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1PutBuildingGroupAttachResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPutBuildingGroupAttachWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод сохранения связей объектов строительства и группы пользователя.
 * Поддерживает только создание.
 * Метод доступен для: Token: admin, service, bti, seller. Без учета разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPutBuildingGroupAttachWithRequest:(KEYAPISTELEMETRYCONTROLV1PutBuildingGroupAttachRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1PutBuildingGroupAttachResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PutBuildingGroupAttach"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1PutBuildingGroupAttachResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод сохранения связей объектов строительства и группы пользователя.
 * Поддерживает только создание.
 * Метод доступен для: Token: admin, service, bti, seller. Без учета разрешений
 */
- (GRPCUnaryProtoCall *)putBuildingGroupAttachWithMessage:(KEYAPISTELEMETRYCONTROLV1PutBuildingGroupAttachRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PutBuildingGroupAttach"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1PutBuildingGroupAttachResponse class]];
}

#pragma mark PutBuildingGroupDetach(PutBuildingGroupDetachRequest) returns (PutBuildingGroupDetachResponse)

/**
 * Метод удаления связей объектов строительства и группы пользователя.
 * Метод доступен для: Token: admin, service, bti, seller. Без учета разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)putBuildingGroupDetachWithRequest:(KEYAPISTELEMETRYCONTROLV1PutBuildingGroupDetachRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1PutBuildingGroupDetachResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPutBuildingGroupDetachWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод удаления связей объектов строительства и группы пользователя.
 * Метод доступен для: Token: admin, service, bti, seller. Без учета разрешений
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPutBuildingGroupDetachWithRequest:(KEYAPISTELEMETRYCONTROLV1PutBuildingGroupDetachRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1PutBuildingGroupDetachResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PutBuildingGroupDetach"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1PutBuildingGroupDetachResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаления связей объектов строительства и группы пользователя.
 * Метод доступен для: Token: admin, service, bti, seller. Без учета разрешений
 */
- (GRPCUnaryProtoCall *)putBuildingGroupDetachWithMessage:(KEYAPISTELEMETRYCONTROLV1PutBuildingGroupDetachRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PutBuildingGroupDetach"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1PutBuildingGroupDetachResponse class]];
}

@end
#endif
