/// import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js'; import _m0 from 'protobufjs/minimal'; import { GroupMapping, GroupMappingItem } from '../../../../yandex/cloud/organizationmanager/v1/group_mapping'; import { FieldMask } from '../../../../google/protobuf/field_mask'; import { Operation } from '../../../../yandex/cloud/operation/operation'; export declare const protobufPackage = "yandex.cloud.organizationmanager.v1"; export interface GetGroupMappingRequest { federationId: string; } export interface GetGroupMappingResponse { groupMapping?: GroupMapping; } export interface CreateGroupMappingRequest { /** Federation the group mapping will be created for */ federationId: string; /** Synchronization status. */ enabled: boolean; } export interface CreateGroupMappingMetadata { federationId: string; } /** Request for updating group mapping configuration */ export interface UpdateGroupMappingRequest { /** Federation the group mapping update is requested */ federationId: string; /** A set of fields that should be updated */ updateMask?: FieldMask; /** A new state of synchronization to update (if mentioned in update_mask). */ enabled: boolean; } export interface UpdateGroupMappingMetadata { federationId: string; } export interface DeleteGroupMappingRequest { /** Federation the group mapping deletion is requested */ federationId: string; } export interface DeleteGroupMappingMetadata { federationId: string; } /** Request for updating group mapping configuration */ export interface UpdateGroupMappingItemsRequest { /** Federation the group mapping update is requested */ federationId: string; /** A collection of mapping items to add or remove (ignores update_fields). */ groupMappingItemDeltas: GroupMappingItemDelta[]; } /** Message describes the user's request to change (add or remove) a single group mapping. */ export interface GroupMappingItemDelta { item?: GroupMappingItem; action: GroupMappingItemDelta_Action; } export declare enum GroupMappingItemDelta_Action { ACTION_UNSPECIFIED = 0, /** ADD - Group mapping item is to be added */ ADD = 1, /** REMOVE - Group mapping item is to be removed */ REMOVE = 2, UNRECOGNIZED = -1 } export declare function groupMappingItemDelta_ActionFromJSON(object: any): GroupMappingItemDelta_Action; export declare function groupMappingItemDelta_ActionToJSON(object: GroupMappingItemDelta_Action): string; export interface UpdateGroupMappingItemsMetadata { federationId: string; } export interface UpdateGroupMappingItemsResponse { /** Effective changes that were applied */ groupMappingItemDeltas: GroupMappingItemDelta[]; } export interface ListGroupMappingItemsRequest { federationId: string; pageSize: number; pageToken: string; filter: string; } export interface ListGroupMappingItemsResponse { groupMappingItems: GroupMappingItem[]; nextPageToken: string; } export declare const GetGroupMappingRequest: { encode(message: GetGroupMappingRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetGroupMappingRequest; fromJSON(object: any): GetGroupMappingRequest; toJSON(message: GetGroupMappingRequest): unknown; fromPartial, never>>(object: I): GetGroupMappingRequest; }; export declare const GetGroupMappingResponse: { encode(message: GetGroupMappingResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetGroupMappingResponse; fromJSON(object: any): GetGroupMappingResponse; toJSON(message: GetGroupMappingResponse): unknown; fromPartial, never>) | undefined; } & Record, never>>(object: I): GetGroupMappingResponse; }; export declare const CreateGroupMappingRequest: { encode(message: CreateGroupMappingRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateGroupMappingRequest; fromJSON(object: any): CreateGroupMappingRequest; toJSON(message: CreateGroupMappingRequest): unknown; fromPartial, never>>(object: I): CreateGroupMappingRequest; }; export declare const CreateGroupMappingMetadata: { encode(message: CreateGroupMappingMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateGroupMappingMetadata; fromJSON(object: any): CreateGroupMappingMetadata; toJSON(message: CreateGroupMappingMetadata): unknown; fromPartial, never>>(object: I): CreateGroupMappingMetadata; }; export declare const UpdateGroupMappingRequest: { encode(message: UpdateGroupMappingRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupMappingRequest; fromJSON(object: any): UpdateGroupMappingRequest; toJSON(message: UpdateGroupMappingRequest): unknown; fromPartial, never>) | undefined; } & Record, never>) | undefined; enabled?: boolean | undefined; } & Record, never>>(object: I): UpdateGroupMappingRequest; }; export declare const UpdateGroupMappingMetadata: { encode(message: UpdateGroupMappingMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupMappingMetadata; fromJSON(object: any): UpdateGroupMappingMetadata; toJSON(message: UpdateGroupMappingMetadata): unknown; fromPartial, never>>(object: I): UpdateGroupMappingMetadata; }; export declare const DeleteGroupMappingRequest: { encode(message: DeleteGroupMappingRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteGroupMappingRequest; fromJSON(object: any): DeleteGroupMappingRequest; toJSON(message: DeleteGroupMappingRequest): unknown; fromPartial, never>>(object: I): DeleteGroupMappingRequest; }; export declare const DeleteGroupMappingMetadata: { encode(message: DeleteGroupMappingMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteGroupMappingMetadata; fromJSON(object: any): DeleteGroupMappingMetadata; toJSON(message: DeleteGroupMappingMetadata): unknown; fromPartial, never>>(object: I): DeleteGroupMappingMetadata; }; export declare const UpdateGroupMappingItemsRequest: { encode(message: UpdateGroupMappingItemsRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupMappingItemsRequest; fromJSON(object: any): UpdateGroupMappingItemsRequest; toJSON(message: UpdateGroupMappingItemsRequest): unknown; fromPartial, never>) | undefined; action?: GroupMappingItemDelta_Action | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>>(object: I): UpdateGroupMappingItemsRequest; }; export declare const GroupMappingItemDelta: { encode(message: GroupMappingItemDelta, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GroupMappingItemDelta; fromJSON(object: any): GroupMappingItemDelta; toJSON(message: GroupMappingItemDelta): unknown; fromPartial, never>) | undefined; action?: GroupMappingItemDelta_Action | undefined; } & Record, never>>(object: I): GroupMappingItemDelta; }; export declare const UpdateGroupMappingItemsMetadata: { encode(message: UpdateGroupMappingItemsMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupMappingItemsMetadata; fromJSON(object: any): UpdateGroupMappingItemsMetadata; toJSON(message: UpdateGroupMappingItemsMetadata): unknown; fromPartial, never>>(object: I): UpdateGroupMappingItemsMetadata; }; export declare const UpdateGroupMappingItemsResponse: { encode(message: UpdateGroupMappingItemsResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupMappingItemsResponse; fromJSON(object: any): UpdateGroupMappingItemsResponse; toJSON(message: UpdateGroupMappingItemsResponse): unknown; fromPartial, never>) | undefined; action?: GroupMappingItemDelta_Action | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>>(object: I): UpdateGroupMappingItemsResponse; }; export declare const ListGroupMappingItemsRequest: { encode(message: ListGroupMappingItemsRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListGroupMappingItemsRequest; fromJSON(object: any): ListGroupMappingItemsRequest; toJSON(message: ListGroupMappingItemsRequest): unknown; fromPartial, never>>(object: I): ListGroupMappingItemsRequest; }; export declare const ListGroupMappingItemsResponse: { encode(message: ListGroupMappingItemsResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListGroupMappingItemsResponse; fromJSON(object: any): ListGroupMappingItemsResponse; toJSON(message: ListGroupMappingItemsResponse): unknown; fromPartial, never>)[] & Record, never>) | undefined; nextPageToken?: string | undefined; } & Record, never>>(object: I): ListGroupMappingItemsResponse; }; /** RPC service dedicated for federation group mapping. */ export declare const GroupMappingServiceService: { /** * Returns a group mapping configured for the specific federation * If a federation does not exist this call will return an error * NOT_FOUND will be returned * If a federation exist, but has not ever been configured for group mapping * the call FAILED_PRECONDITION will be returned. */ readonly get: { readonly path: "/yandex.cloud.organizationmanager.v1.GroupMappingService/Get"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: GetGroupMappingRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => GetGroupMappingRequest; readonly responseSerialize: (value: GetGroupMappingResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => GetGroupMappingResponse; }; /** * Adds a group mapping for a federation * If mapping already exist, ALREADY_EXISTS will be returned */ readonly create: { readonly path: "/yandex.cloud.organizationmanager.v1.GroupMappingService/Create"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: CreateGroupMappingRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => CreateGroupMappingRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** * Updates an existing group mapping for a federation * Errors: * - if federation is not found * In case of any error, no changes are applied to existing group mapping * * This call is idempotent. The following actions do nothing: * - enabling when already enabled * - disabling when disabled * Such parts of request will be ignored. Others will be applied. */ readonly update: { readonly path: "/yandex.cloud.organizationmanager.v1.GroupMappingService/Update"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: UpdateGroupMappingRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => UpdateGroupMappingRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** * Deletes a group mapping. This will remove all the mapping items * cascade. */ readonly delete: { readonly path: "/yandex.cloud.organizationmanager.v1.GroupMappingService/Delete"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: DeleteGroupMappingRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => DeleteGroupMappingRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** * Returns all the group mappings items * * Filtering is only supported by external_group_id or internal_group_id */ readonly listItems: { readonly path: "/yandex.cloud.organizationmanager.v1.GroupMappingService/ListItems"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListGroupMappingItemsRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListGroupMappingItemsRequest; readonly responseSerialize: (value: ListGroupMappingItemsResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListGroupMappingItemsResponse; }; /** * Updates group mapping items for a specified federation * Errors: * - if federation is not found * - if internal group in the mapping added does not exist * In case of any error, no changes are applied to existing group mapping * * This call is idempotent. The following actions do nothing: * - adding group mapping items that are already present * - removing group mapping items that are not present * Such parts of request will be ignored. Others will be applied. */ readonly updateItems: { readonly path: "/yandex.cloud.organizationmanager.v1.GroupMappingService/UpdateItems"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: UpdateGroupMappingItemsRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => UpdateGroupMappingItemsRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; }; export interface GroupMappingServiceServer extends UntypedServiceImplementation { /** * Returns a group mapping configured for the specific federation * If a federation does not exist this call will return an error * NOT_FOUND will be returned * If a federation exist, but has not ever been configured for group mapping * the call FAILED_PRECONDITION will be returned. */ get: handleUnaryCall; /** * Adds a group mapping for a federation * If mapping already exist, ALREADY_EXISTS will be returned */ create: handleUnaryCall; /** * Updates an existing group mapping for a federation * Errors: * - if federation is not found * In case of any error, no changes are applied to existing group mapping * * This call is idempotent. The following actions do nothing: * - enabling when already enabled * - disabling when disabled * Such parts of request will be ignored. Others will be applied. */ update: handleUnaryCall; /** * Deletes a group mapping. This will remove all the mapping items * cascade. */ delete: handleUnaryCall; /** * Returns all the group mappings items * * Filtering is only supported by external_group_id or internal_group_id */ listItems: handleUnaryCall; /** * Updates group mapping items for a specified federation * Errors: * - if federation is not found * - if internal group in the mapping added does not exist * In case of any error, no changes are applied to existing group mapping * * This call is idempotent. The following actions do nothing: * - adding group mapping items that are already present * - removing group mapping items that are not present * Such parts of request will be ignored. Others will be applied. */ updateItems: handleUnaryCall; } export interface GroupMappingServiceClient extends Client { /** * Returns a group mapping configured for the specific federation * If a federation does not exist this call will return an error * NOT_FOUND will be returned * If a federation exist, but has not ever been configured for group mapping * the call FAILED_PRECONDITION will be returned. */ get(request: GetGroupMappingRequest, callback: (error: ServiceError | null, response: GetGroupMappingResponse) => void): ClientUnaryCall; get(request: GetGroupMappingRequest, metadata: Metadata, callback: (error: ServiceError | null, response: GetGroupMappingResponse) => void): ClientUnaryCall; get(request: GetGroupMappingRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: GetGroupMappingResponse) => void): ClientUnaryCall; /** * Adds a group mapping for a federation * If mapping already exist, ALREADY_EXISTS will be returned */ create(request: CreateGroupMappingRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; create(request: CreateGroupMappingRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; create(request: CreateGroupMappingRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** * Updates an existing group mapping for a federation * Errors: * - if federation is not found * In case of any error, no changes are applied to existing group mapping * * This call is idempotent. The following actions do nothing: * - enabling when already enabled * - disabling when disabled * Such parts of request will be ignored. Others will be applied. */ update(request: UpdateGroupMappingRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; update(request: UpdateGroupMappingRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; update(request: UpdateGroupMappingRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** * Deletes a group mapping. This will remove all the mapping items * cascade. */ delete(request: DeleteGroupMappingRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; delete(request: DeleteGroupMappingRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; delete(request: DeleteGroupMappingRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** * Returns all the group mappings items * * Filtering is only supported by external_group_id or internal_group_id */ listItems(request: ListGroupMappingItemsRequest, callback: (error: ServiceError | null, response: ListGroupMappingItemsResponse) => void): ClientUnaryCall; listItems(request: ListGroupMappingItemsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListGroupMappingItemsResponse) => void): ClientUnaryCall; listItems(request: ListGroupMappingItemsRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListGroupMappingItemsResponse) => void): ClientUnaryCall; /** * Updates group mapping items for a specified federation * Errors: * - if federation is not found * - if internal group in the mapping added does not exist * In case of any error, no changes are applied to existing group mapping * * This call is idempotent. The following actions do nothing: * - adding group mapping items that are already present * - removing group mapping items that are not present * Such parts of request will be ignored. Others will be applied. */ updateItems(request: UpdateGroupMappingItemsRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; updateItems(request: UpdateGroupMappingItemsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; updateItems(request: UpdateGroupMappingItemsRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; } export declare const GroupMappingServiceClient: { new (address: string, credentials: ChannelCredentials, options?: Partial): GroupMappingServiceClient; service: typeof GroupMappingServiceService; }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & Record>, never>; export {};