import type { BinaryWriteOptions } from '@protobuf-ts/runtime';
import type { IBinaryWriter } from '@protobuf-ts/runtime';
import type { BinaryReadOptions } from '@protobuf-ts/runtime';
import type { IBinaryReader } from '@protobuf-ts/runtime';
import type { PartialMessage } from '@protobuf-ts/runtime';
import { MessageType } from '@protobuf-ts/runtime';
import { ParticipantPermission } from './state_service.js';
import { TraceContext } from './trace_context.js';
import { Timestamp } from '../../../../../google/protobuf/timestamp.js';
/**
 * @generated from protobuf message com.daml.ledger.api.v2.TopologyTransaction
 */
export interface TopologyTransaction {
    /**
     * Assigned by the server. Useful for correlating logs.
     * Must be a valid LedgerString (as described in ``value.proto``).
     * Required
     *
     * @generated from protobuf field: string update_id = 1
     */
    updateId: string;
    /**
     * The absolute offset. The details of this field are described in ``community/ledger-api/README.md``.
     * Required, it is a valid absolute offset (positive integer).
     *
     * @generated from protobuf field: int64 offset = 2
     */
    offset: bigint;
    /**
     * A valid synchronizer id.
     * Identifies the synchronizer that synchronized the topology transaction.
     * Required
     *
     * @generated from protobuf field: string synchronizer_id = 3
     */
    synchronizerId: string;
    /**
     * The time at which the changes in the topology transaction become effective. There is a small delay between a
     * topology transaction being sequenced and the changes it contains becoming effective. Topology transactions appear
     * in order relative to a synchronizer based on their effective time rather than their sequencing time.
     * Required
     *
     * @generated from protobuf field: google.protobuf.Timestamp record_time = 4
     */
    recordTime?: Timestamp;
    /**
     * A non-empty list of topology events.
     * Required
     *
     * @generated from protobuf field: repeated com.daml.ledger.api.v2.TopologyEvent events = 5
     */
    events: TopologyEvent[];
    /**
     * Optional; ledger API trace context
     *
     * The trace context transported in this message corresponds to the trace context supplied
     * by the client application in a HTTP2 header of the original command submission.
     * We typically use a header to transfer this type of information. Here we use message
     * body, because it is used in gRPC streams which do not support per message headers.
     * This field will be populated with the trace context contained in the original submission.
     * If that was not provided, a unique ledger-api-server generated trace context will be used
     * instead.
     *
     * @generated from protobuf field: com.daml.ledger.api.v2.TraceContext trace_context = 6
     */
    traceContext?: TraceContext;
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.TopologyEvent
 */
export interface TopologyEvent {
    /**
     * @generated from protobuf oneof: event
     */
    event: {
        oneofKind: 'participantAuthorizationChanged';
        /**
         * @generated from protobuf field: com.daml.ledger.api.v2.ParticipantAuthorizationChanged participant_authorization_changed = 1
         */
        participantAuthorizationChanged: ParticipantAuthorizationChanged;
    } | {
        oneofKind: 'participantAuthorizationRevoked';
        /**
         * @generated from protobuf field: com.daml.ledger.api.v2.ParticipantAuthorizationRevoked participant_authorization_revoked = 2
         */
        participantAuthorizationRevoked: ParticipantAuthorizationRevoked;
    } | {
        oneofKind: 'participantAuthorizationAdded';
        /**
         * @generated from protobuf field: com.daml.ledger.api.v2.ParticipantAuthorizationAdded participant_authorization_added = 3
         */
        participantAuthorizationAdded: ParticipantAuthorizationAdded;
    } | {
        oneofKind: undefined;
    };
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.ParticipantAuthorizationAdded
 */
export interface ParticipantAuthorizationAdded {
    /**
     * Required
     *
     * @generated from protobuf field: string party_id = 1
     */
    partyId: string;
    /**
     * Required
     *
     * @generated from protobuf field: string participant_id = 2
     */
    participantId: string;
    /**
     * Required
     *
     * @generated from protobuf field: com.daml.ledger.api.v2.ParticipantPermission participant_permission = 3
     */
    participantPermission: ParticipantPermission;
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.ParticipantAuthorizationChanged
 */
export interface ParticipantAuthorizationChanged {
    /**
     * Required
     *
     * @generated from protobuf field: string party_id = 1
     */
    partyId: string;
    /**
     * Required
     *
     * @generated from protobuf field: string participant_id = 2
     */
    participantId: string;
    /**
     * Required
     *
     * @generated from protobuf field: com.daml.ledger.api.v2.ParticipantPermission participant_permission = 3
     */
    participantPermission: ParticipantPermission;
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.ParticipantAuthorizationRevoked
 */
export interface ParticipantAuthorizationRevoked {
    /**
     * Required
     *
     * @generated from protobuf field: string party_id = 1
     */
    partyId: string;
    /**
     * Required
     *
     * @generated from protobuf field: string participant_id = 2
     */
    participantId: string;
}
declare class TopologyTransaction$Type extends MessageType<TopologyTransaction> {
    constructor();
    create(value?: PartialMessage<TopologyTransaction>): TopologyTransaction;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TopologyTransaction): TopologyTransaction;
    internalBinaryWrite(message: TopologyTransaction, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.TopologyTransaction
 */
export declare const TopologyTransaction: TopologyTransaction$Type;
declare class TopologyEvent$Type extends MessageType<TopologyEvent> {
    constructor();
    create(value?: PartialMessage<TopologyEvent>): TopologyEvent;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TopologyEvent): TopologyEvent;
    internalBinaryWrite(message: TopologyEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.TopologyEvent
 */
export declare const TopologyEvent: TopologyEvent$Type;
declare class ParticipantAuthorizationAdded$Type extends MessageType<ParticipantAuthorizationAdded> {
    constructor();
    create(value?: PartialMessage<ParticipantAuthorizationAdded>): ParticipantAuthorizationAdded;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ParticipantAuthorizationAdded): ParticipantAuthorizationAdded;
    internalBinaryWrite(message: ParticipantAuthorizationAdded, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.ParticipantAuthorizationAdded
 */
export declare const ParticipantAuthorizationAdded: ParticipantAuthorizationAdded$Type;
declare class ParticipantAuthorizationChanged$Type extends MessageType<ParticipantAuthorizationChanged> {
    constructor();
    create(value?: PartialMessage<ParticipantAuthorizationChanged>): ParticipantAuthorizationChanged;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ParticipantAuthorizationChanged): ParticipantAuthorizationChanged;
    internalBinaryWrite(message: ParticipantAuthorizationChanged, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.ParticipantAuthorizationChanged
 */
export declare const ParticipantAuthorizationChanged: ParticipantAuthorizationChanged$Type;
declare class ParticipantAuthorizationRevoked$Type extends MessageType<ParticipantAuthorizationRevoked> {
    constructor();
    create(value?: PartialMessage<ParticipantAuthorizationRevoked>): ParticipantAuthorizationRevoked;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ParticipantAuthorizationRevoked): ParticipantAuthorizationRevoked;
    internalBinaryWrite(message: ParticipantAuthorizationRevoked, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.ParticipantAuthorizationRevoked
 */
export declare const ParticipantAuthorizationRevoked: ParticipantAuthorizationRevoked$Type;
export {};
//# sourceMappingURL=topology_transaction.d.ts.map