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

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

#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBTimestamp.pbobjc.h>
#else
#import "GPBTimestamp.pbobjc.h"
#endif
#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#import "keyapis/iot_connect/v1/KeyapisIotConnectCallbackV1.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

@implementation KEYAPISIOTCONNECTV1IotConnectManageService

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

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

#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 PostManageState(PostManageStateRequest) returns (PostManageStateResponse)

/**
 * Зачем.
 * Ключ отправляет внешнему партнёру факт изменения состояния устройства.
 * В данном случае имеется в виду переход состояния домофона из состояния "нет вызова в квартиру" -> "есть вызов в квартиру".
 * Метод доступен для: admin
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postManageStateWithRequest:(KEYAPISIOTCONNECTV1PostManageStateRequest *)request handler:(void(^)(KEYAPISIOTCONNECTV1PostManageStateResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostManageStateWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Зачем.
 * Ключ отправляет внешнему партнёру факт изменения состояния устройства.
 * В данном случае имеется в виду переход состояния домофона из состояния "нет вызова в квартиру" -> "есть вызов в квартиру".
 * Метод доступен для: admin
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostManageStateWithRequest:(KEYAPISIOTCONNECTV1PostManageStateRequest *)request handler:(void(^)(KEYAPISIOTCONNECTV1PostManageStateResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostManageState"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISIOTCONNECTV1PostManageStateResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Зачем.
 * Ключ отправляет внешнему партнёру факт изменения состояния устройства.
 * В данном случае имеется в виду переход состояния домофона из состояния "нет вызова в квартиру" -> "есть вызов в квартиру".
 * Метод доступен для: admin
 */
- (GRPCUnaryProtoCall *)postManageStateWithMessage:(KEYAPISIOTCONNECTV1PostManageStateRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostManageState"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISIOTCONNECTV1PostManageStateResponse class]];
}

#pragma mark PutManageUserDetach(PutManageUserDetachRequest) returns (PutManageUserDetachResponse)

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

@end
#endif
