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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/access_control/v1/KeyapisAccessControlBroadcastAlertV1.pbrpc.h"
#import "keyapis/access_control/v1/KeyapisAccessControlBroadcastAlertV1.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/access_control/v1/KeyapisAccessControlAccessControlV1.pbobjc.h"

@implementation KEYAPISACCESSCONTROLV1BroadcastAlertService

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

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

#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 PostBroadcastAlertStart(PostBroadcastAlertStartRequest) returns (PostBroadcastAlertStartResponse)

/**
 * Метод запуска массового оповещения через домофоны.
 * Метод доступен для: ApiKey
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postBroadcastAlertStartWithRequest:(KEYAPISACCESSCONTROLV1PostBroadcastAlertStartRequest *)request handler:(void(^)(KEYAPISACCESSCONTROLV1PostBroadcastAlertStartResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostBroadcastAlertStartWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод запуска массового оповещения через домофоны.
 * Метод доступен для: ApiKey
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostBroadcastAlertStartWithRequest:(KEYAPISACCESSCONTROLV1PostBroadcastAlertStartRequest *)request handler:(void(^)(KEYAPISACCESSCONTROLV1PostBroadcastAlertStartResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostBroadcastAlertStart"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSCONTROLV1PostBroadcastAlertStartResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод запуска массового оповещения через домофоны.
 * Метод доступен для: ApiKey
 */
- (GRPCUnaryProtoCall *)postBroadcastAlertStartWithMessage:(KEYAPISACCESSCONTROLV1PostBroadcastAlertStartRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostBroadcastAlertStart"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSCONTROLV1PostBroadcastAlertStartResponse class]];
}

#pragma mark PostBroadcastAlertStop(PostBroadcastAlertStopRequest) returns (PostBroadcastAlertStopResponse)

/**
 * Метод прекращения массового оповещения через домофоны.
 * Метод доступен для: ApiKey
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postBroadcastAlertStopWithRequest:(KEYAPISACCESSCONTROLV1PostBroadcastAlertStopRequest *)request handler:(void(^)(KEYAPISACCESSCONTROLV1PostBroadcastAlertStopResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostBroadcastAlertStopWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод прекращения массового оповещения через домофоны.
 * Метод доступен для: ApiKey
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostBroadcastAlertStopWithRequest:(KEYAPISACCESSCONTROLV1PostBroadcastAlertStopRequest *)request handler:(void(^)(KEYAPISACCESSCONTROLV1PostBroadcastAlertStopResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostBroadcastAlertStop"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSCONTROLV1PostBroadcastAlertStopResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод прекращения массового оповещения через домофоны.
 * Метод доступен для: ApiKey
 */
- (GRPCUnaryProtoCall *)postBroadcastAlertStopWithMessage:(KEYAPISACCESSCONTROLV1PostBroadcastAlertStopRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostBroadcastAlertStop"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSCONTROLV1PostBroadcastAlertStopResponse class]];
}

@end
#endif
