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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/telemetry_metric/v1/KeyapisTelemetryMetricMeasurementV1.pbrpc.h"
#import "keyapis/telemetry_metric/v1/KeyapisTelemetryMetricMeasurementV1.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 KEYAPISTELEMETRYMETRICYV1MeasurementService

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

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

#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 PostMeasurement(PostMeasurementRequest) returns (PostMeasurementResponse)

/**
 * Метод сохранения измерений.
 * Метод доступен для: service, application(telemetry:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postMeasurementWithRequest:(KEYAPISTELEMETRYMETRICYV1PostMeasurementRequest *)request handler:(void(^)(KEYAPISTELEMETRYMETRICYV1PostMeasurementResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostMeasurementWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод сохранения измерений.
 * Метод доступен для: service, application(telemetry:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostMeasurementWithRequest:(KEYAPISTELEMETRYMETRICYV1PostMeasurementRequest *)request handler:(void(^)(KEYAPISTELEMETRYMETRICYV1PostMeasurementResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostMeasurement"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYMETRICYV1PostMeasurementResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод сохранения измерений.
 * Метод доступен для: service, application(telemetry:edit)
 */
- (GRPCUnaryProtoCall *)postMeasurementWithMessage:(KEYAPISTELEMETRYMETRICYV1PostMeasurementRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostMeasurement"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYMETRICYV1PostMeasurementResponse class]];
}

#pragma mark PostMeasurementHalfDuplex(stream PostMeasurementHalfDuplexRequest) returns (PostMeasurementHalfDuplexResponse)

/**
 * Полудуплексный метод сохранения потока измерений.
 * Метод доступен для: service, application(telemetry:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postMeasurementHalfDuplexWithRequestsWriter:(GRXWriter *)requestWriter handler:(void(^)(KEYAPISTELEMETRYMETRICYV1PostMeasurementHalfDuplexResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostMeasurementHalfDuplexWithRequestsWriter:requestWriter handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Полудуплексный метод сохранения потока измерений.
 * Метод доступен для: service, application(telemetry:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostMeasurementHalfDuplexWithRequestsWriter:(GRXWriter *)requestWriter handler:(void(^)(KEYAPISTELEMETRYMETRICYV1PostMeasurementHalfDuplexResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostMeasurementHalfDuplex"
            requestsWriter:requestWriter
             responseClass:[KEYAPISTELEMETRYMETRICYV1PostMeasurementHalfDuplexResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Полудуплексный метод сохранения потока измерений.
 * Метод доступен для: service, application(telemetry:edit)
 */
- (GRPCStreamingProtoCall *)postMeasurementHalfDuplexWithResponseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostMeasurementHalfDuplex"
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYMETRICYV1PostMeasurementHalfDuplexResponse class]];
}

#pragma mark GetMeasurementList(GetMeasurementListRequest) returns (stream GetMeasurementListResponse)

/**
 * Метод получения списка измерений.
 * Метод доступен для: service, application(telemetry:read или telemetry:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getMeasurementListWithRequest:(KEYAPISTELEMETRYMETRICYV1GetMeasurementListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYMETRICYV1GetMeasurementListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetMeasurementListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения списка измерений.
 * Метод доступен для: service, application(telemetry:read или telemetry:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetMeasurementListWithRequest:(KEYAPISTELEMETRYMETRICYV1GetMeasurementListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYMETRICYV1GetMeasurementListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetMeasurementList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYMETRICYV1GetMeasurementListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка измерений.
 * Метод доступен для: service, application(telemetry:read или telemetry:edit)
 */
- (GRPCUnaryProtoCall *)getMeasurementListWithMessage:(KEYAPISTELEMETRYMETRICYV1GetMeasurementListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetMeasurementList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYMETRICYV1GetMeasurementListResponse class]];
}

#pragma mark GetMeasurementCount(GetMeasurementCountRequest) returns (GetMeasurementCountResponse)

/**
 * Метод получения количества измерений.
 * Метод доступен для: service, application(telemetry:read или telemetry:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getMeasurementCountWithRequest:(KEYAPISTELEMETRYMETRICYV1GetMeasurementCountRequest *)request handler:(void(^)(KEYAPISTELEMETRYMETRICYV1GetMeasurementCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetMeasurementCountWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения количества измерений.
 * Метод доступен для: service, application(telemetry:read или telemetry:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetMeasurementCountWithRequest:(KEYAPISTELEMETRYMETRICYV1GetMeasurementCountRequest *)request handler:(void(^)(KEYAPISTELEMETRYMETRICYV1GetMeasurementCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetMeasurementCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYMETRICYV1GetMeasurementCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества измерений.
 * Метод доступен для: service, application(telemetry:read или telemetry:edit)
 */
- (GRPCUnaryProtoCall *)getMeasurementCountWithMessage:(KEYAPISTELEMETRYMETRICYV1GetMeasurementCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetMeasurementCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYMETRICYV1GetMeasurementCountResponse class]];
}

#pragma mark GetMeasurementConvertedList(GetMeasurementConvertedListRequest) returns (stream GetMeasurementConvertedListResponse)

/**
 * Метод получения списка преобразованных измерений.
 * Метод доступен для: service, application(telemetry:read или telemetry:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getMeasurementConvertedListWithRequest:(KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetMeasurementConvertedListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения списка преобразованных измерений.
 * Метод доступен для: service, application(telemetry:read или telemetry:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetMeasurementConvertedListWithRequest:(KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetMeasurementConvertedList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка преобразованных измерений.
 * Метод доступен для: service, application(telemetry:read или telemetry:edit)
 */
- (GRPCUnaryProtoCall *)getMeasurementConvertedListWithMessage:(KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetMeasurementConvertedList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedListResponse class]];
}

#pragma mark GetMeasurementConvertedCount(GetMeasurementConvertedCountRequest) returns (GetMeasurementConvertedCountResponse)

/**
 * Метод получения количества преобразованных измерений.
 * Метод доступен для: service, application(telemetry:read или telemetry:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getMeasurementConvertedCountWithRequest:(KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedCountRequest *)request handler:(void(^)(KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetMeasurementConvertedCountWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения количества преобразованных измерений.
 * Метод доступен для: service, application(telemetry:read или telemetry:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetMeasurementConvertedCountWithRequest:(KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedCountRequest *)request handler:(void(^)(KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetMeasurementConvertedCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества преобразованных измерений.
 * Метод доступен для: service, application(telemetry:read или telemetry:edit)
 */
- (GRPCUnaryProtoCall *)getMeasurementConvertedCountWithMessage:(KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetMeasurementConvertedCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYMETRICYV1GetMeasurementConvertedCountResponse class]];
}

@end
#endif
