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

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

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

@implementation KEYAPISTELEMETRYCONTROLV1MetricPointService

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

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

#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 GetMetricPoint(GetMetricPointRequest) returns (GetMetricPointResponse)

/**
 * Метод получения ТУ.
 * Разрешения: telemetry_control:metric_point:card, telemetry_control:metric_point: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)getMetricPointWithRequest:(KEYAPISTELEMETRYCONTROLV1GetMetricPointRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1GetMetricPointResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetMetricPointWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения ТУ.
 * Разрешения: telemetry_control:metric_point:card, telemetry_control:metric_point: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 *)RPCToGetMetricPointWithRequest:(KEYAPISTELEMETRYCONTROLV1GetMetricPointRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1GetMetricPointResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetMetricPoint"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetMetricPointResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения ТУ.
 * Разрешения: telemetry_control:metric_point:card, telemetry_control:metric_point:card:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. Без учета разрешений.
 * Метод доступен для: ApiKey: При наличии разрешений
 */
- (GRPCUnaryProtoCall *)getMetricPointWithMessage:(KEYAPISTELEMETRYCONTROLV1GetMetricPointRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetMetricPoint"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetMetricPointResponse class]];
}

#pragma mark GetMetricPointList(GetMetricPointListRequest) returns (stream GetMetricPointListResponse)

/**
 * Метод получения списка ТУ.
 * Разрешения: telemetry_control:metric_point:list, telemetry_control:metric_point: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)getMetricPointListWithRequest:(KEYAPISTELEMETRYCONTROLV1GetMetricPointListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYCONTROLV1GetMetricPointListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetMetricPointListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения списка ТУ.
 * Разрешения: telemetry_control:metric_point:list, telemetry_control:metric_point: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 *)RPCToGetMetricPointListWithRequest:(KEYAPISTELEMETRYCONTROLV1GetMetricPointListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYCONTROLV1GetMetricPointListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetMetricPointList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetMetricPointListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка ТУ.
 * Разрешения: telemetry_control:metric_point:list, telemetry_control:metric_point:list:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. Без учета разрешений.
 * Метод доступен для: ApiKey: При наличии разрешений
 */
- (GRPCUnaryProtoCall *)getMetricPointListWithMessage:(KEYAPISTELEMETRYCONTROLV1GetMetricPointListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetMetricPointList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetMetricPointListResponse class]];
}

#pragma mark GetMetricPointCount(GetMetricPointCountRequest) returns (GetMetricPointCountResponse)

/**
 * Метод получения количества ТУ.
 * Разрешения: telemetry_control:metric_point:list, telemetry_control:metric_point: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)getMetricPointCountWithRequest:(KEYAPISTELEMETRYCONTROLV1GetMetricPointCountRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1GetMetricPointCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetMetricPointCountWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения количества ТУ.
 * Разрешения: telemetry_control:metric_point:list, telemetry_control:metric_point: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 *)RPCToGetMetricPointCountWithRequest:(KEYAPISTELEMETRYCONTROLV1GetMetricPointCountRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1GetMetricPointCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetMetricPointCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetMetricPointCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества ТУ.
 * Разрешения: telemetry_control:metric_point:list, telemetry_control:metric_point:list:own.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. Без учета разрешений.
 * Метод доступен для: ApiKey: При наличии разрешений
 */
- (GRPCUnaryProtoCall *)getMetricPointCountWithMessage:(KEYAPISTELEMETRYCONTROLV1GetMetricPointCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetMetricPointCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1GetMetricPointCountResponse class]];
}

#pragma mark PostMetricPoint(PostMetricPointRequest) returns (PostMetricPointResponse)

/**
 * Метод сохранения ТУ.
 * Поддерживает создание и обновление.
 * Метод доступен для: 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)postMetricPointWithRequest:(KEYAPISTELEMETRYCONTROLV1PostMetricPointRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1PostMetricPointResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostMetricPointWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод сохранения ТУ.
 * Поддерживает создание и обновление.
 * Метод доступен для: 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 *)RPCToPostMetricPointWithRequest:(KEYAPISTELEMETRYCONTROLV1PostMetricPointRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1PostMetricPointResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostMetricPoint"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1PostMetricPointResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод сохранения ТУ.
 * Поддерживает создание и обновление.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. Без учета разрешений
 */
- (GRPCUnaryProtoCall *)postMetricPointWithMessage:(KEYAPISTELEMETRYCONTROLV1PostMetricPointRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostMetricPoint"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1PostMetricPointResponse class]];
}

#pragma mark DeleteMetricPoint(DeleteMetricPointRequest) returns (DeleteMetricPointResponse)

/**
 * Метод удаления ТУ.
 * Метод доступен для: 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)deleteMetricPointWithRequest:(KEYAPISTELEMETRYCONTROLV1DeleteMetricPointRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1DeleteMetricPointResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToDeleteMetricPointWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод удаления ТУ.
 * Метод доступен для: 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 *)RPCToDeleteMetricPointWithRequest:(KEYAPISTELEMETRYCONTROLV1DeleteMetricPointRequest *)request handler:(void(^)(KEYAPISTELEMETRYCONTROLV1DeleteMetricPointResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"DeleteMetricPoint"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYCONTROLV1DeleteMetricPointResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаления ТУ.
 * Метод доступен для: Token: admin, service, bti, seller, application, owner, employee. Без учета разрешений
 */
- (GRPCUnaryProtoCall *)deleteMetricPointWithMessage:(KEYAPISTELEMETRYCONTROLV1DeleteMetricPointRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"DeleteMetricPoint"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYCONTROLV1DeleteMetricPointResponse class]];
}

@end
#endif
