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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/telemetry_status/v1/KeyapisTelemetryStatusDeviceV1.pbrpc.h"
#import "keyapis/telemetry_status/v1/KeyapisTelemetryStatusDeviceV1.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/GPBTimestamp.pbobjc.h>
#else
#import "GPBTimestamp.pbobjc.h"
#endif

@implementation KEYAPISTELEMETRYSTATUSV1DeviceStatusService

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

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

#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 GetDeviceStatusList(GetDeviceStatusListRequest) returns (stream GetDeviceStatusListResponse)

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

#pragma mark GetDeviceStatusCount(GetDeviceStatusCountRequest) returns (GetDeviceStatusCountResponse)

/**
 * Метод получения количества статусов доступности устройств.
 * Метод доступен для: Token: service, admin. Без учета разрешений.
 * Метод доступен для: ApiKey: Разрешения: telemetry_status:device_status:list
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getDeviceStatusCountWithRequest:(KEYAPISTELEMETRYSTATUSV1GetDeviceStatusCountRequest *)request handler:(void(^)(KEYAPISTELEMETRYSTATUSV1GetDeviceStatusCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetDeviceStatusCountWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения количества статусов доступности устройств.
 * Метод доступен для: Token: service, admin. Без учета разрешений.
 * Метод доступен для: ApiKey: Разрешения: telemetry_status:device_status:list
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetDeviceStatusCountWithRequest:(KEYAPISTELEMETRYSTATUSV1GetDeviceStatusCountRequest *)request handler:(void(^)(KEYAPISTELEMETRYSTATUSV1GetDeviceStatusCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetDeviceStatusCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISTELEMETRYSTATUSV1GetDeviceStatusCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества статусов доступности устройств.
 * Метод доступен для: Token: service, admin. Без учета разрешений.
 * Метод доступен для: ApiKey: Разрешения: telemetry_status:device_status:list
 */
- (GRPCUnaryProtoCall *)getDeviceStatusCountWithMessage:(KEYAPISTELEMETRYSTATUSV1GetDeviceStatusCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetDeviceStatusCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISTELEMETRYSTATUSV1GetDeviceStatusCountResponse class]];
}

@end
#endif
