///
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js';
import _m0 from 'protobufjs/minimal';
import { Role } from '../../../../yandex/cloud/iam/v1/role';
export declare const protobufPackage = "yandex.cloud.iam.v1";
export interface GetRoleRequest {
/**
* ID of the Role resource to return.
* To get the role ID, use a [RoleService.List] request.
*/
roleId: string;
}
export interface ListRolesRequest {
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size],
* the service returns a [ListRolesResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
* Default value: 100.
*/
pageSize: number;
/**
* Page token. To get the next page of results, set [page_token]
* to the [ListRolesResponse.next_page_token]
* returned by a previous list request.
*/
pageToken: string;
/** A filter expression that filters resources listed in the response. */
filter: string;
}
export interface ListRolesResponse {
/** List of Role resources. */
roles: Role[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListRolesRequest.page_size], use
* the [next_page_token] as the value
* for the [ListRolesRequest.page_token] query parameter
* in the next list request. Each subsequent list request will have its own
* [next_page_token] to continue paging through the results.
*/
nextPageToken: string;
}
export declare const GetRoleRequest: {
encode(message: GetRoleRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): GetRoleRequest;
fromJSON(object: any): GetRoleRequest;
toJSON(message: GetRoleRequest): unknown;
fromPartial, never>>(object: I): GetRoleRequest;
};
export declare const ListRolesRequest: {
encode(message: ListRolesRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): ListRolesRequest;
fromJSON(object: any): ListRolesRequest;
toJSON(message: ListRolesRequest): unknown;
fromPartial, never>>(object: I): ListRolesRequest;
};
export declare const ListRolesResponse: {
encode(message: ListRolesResponse, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): ListRolesResponse;
fromJSON(object: any): ListRolesResponse;
toJSON(message: ListRolesResponse): unknown;
fromPartial, never>)[] & Record, never>) | undefined;
nextPageToken?: string | undefined;
} & Record, never>>(object: I): ListRolesResponse;
};
/** A set of methods for managing Role resources. */
export declare const RoleServiceService: {
/**
* Returns the specified Role resource.
*
* To get the list of available Role resources, make a [List] request.
*/
readonly get: {
readonly path: "/yandex.cloud.iam.v1.RoleService/Get";
readonly requestStream: false;
readonly responseStream: false;
readonly requestSerialize: (value: GetRoleRequest) => Buffer;
readonly requestDeserialize: (value: Buffer) => GetRoleRequest;
readonly responseSerialize: (value: Role) => Buffer;
readonly responseDeserialize: (value: Buffer) => Role;
};
/** Retrieves the list of Role resources. */
readonly list: {
readonly path: "/yandex.cloud.iam.v1.RoleService/List";
readonly requestStream: false;
readonly responseStream: false;
readonly requestSerialize: (value: ListRolesRequest) => Buffer;
readonly requestDeserialize: (value: Buffer) => ListRolesRequest;
readonly responseSerialize: (value: ListRolesResponse) => Buffer;
readonly responseDeserialize: (value: Buffer) => ListRolesResponse;
};
};
export interface RoleServiceServer extends UntypedServiceImplementation {
/**
* Returns the specified Role resource.
*
* To get the list of available Role resources, make a [List] request.
*/
get: handleUnaryCall;
/** Retrieves the list of Role resources. */
list: handleUnaryCall;
}
export interface RoleServiceClient extends Client {
/**
* Returns the specified Role resource.
*
* To get the list of available Role resources, make a [List] request.
*/
get(request: GetRoleRequest, callback: (error: ServiceError | null, response: Role) => void): ClientUnaryCall;
get(request: GetRoleRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Role) => void): ClientUnaryCall;
get(request: GetRoleRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Role) => void): ClientUnaryCall;
/** Retrieves the list of Role resources. */
list(request: ListRolesRequest, callback: (error: ServiceError | null, response: ListRolesResponse) => void): ClientUnaryCall;
list(request: ListRolesRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListRolesResponse) => void): ClientUnaryCall;
list(request: ListRolesRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListRolesResponse) => void): ClientUnaryCall;
}
export declare const RoleServiceClient: {
new (address: string, credentials: ChannelCredentials, options?: Partial): RoleServiceClient;
service: typeof RoleServiceService;
};
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