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

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

#import "google/api/Annotations.pbobjc.h"

@implementation KEYAPISADV1SystemService

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

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

#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 GetSystemStatus(GetSystemStatusRequest) returns (GetSystemStatusResponse)

/**
 * Метод получения статуса сервиса.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getSystemStatusWithRequest:(KEYAPISADV1GetSystemStatusRequest *)request handler:(void(^)(KEYAPISADV1GetSystemStatusResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetSystemStatusWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения статуса сервиса.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetSystemStatusWithRequest:(KEYAPISADV1GetSystemStatusRequest *)request handler:(void(^)(KEYAPISADV1GetSystemStatusResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetSystemStatus"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISADV1GetSystemStatusResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения статуса сервиса.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)getSystemStatusWithMessage:(KEYAPISADV1GetSystemStatusRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetSystemStatus"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISADV1GetSystemStatusResponse class]];
}

@end
#endif
