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 { ConfigChange } from "../../config_change";
import { Timestamp } from "../../../protobuf/timestamp";
/**
 * The full representation of a Service that is managed by
 * Google Service Management.
 *
 * @generated from protobuf message google.api.servicemanagement.v1.ManagedService
 */
export interface ManagedService {
    /**
     * The name of the service. See the
     * [overview](https://cloud.google.com/service-infrastructure/docs/overview)
     * for naming requirements.
     *
     * @generated from protobuf field: string service_name = 2;
     */
    serviceName: string;
    /**
     * ID of the project that produces and owns this service.
     *
     * @generated from protobuf field: string producer_project_id = 3;
     */
    producerProjectId: string;
}
/**
 * The metadata associated with a long running operation resource.
 *
 * @generated from protobuf message google.api.servicemanagement.v1.OperationMetadata
 */
export interface OperationMetadata {
    /**
     * The full name of the resources that this operation is directly
     * associated with.
     *
     * @generated from protobuf field: repeated string resource_names = 1;
     */
    resourceNames: string[];
    /**
     * Detailed status information for each step. The order is undetermined.
     *
     * @generated from protobuf field: repeated google.api.servicemanagement.v1.OperationMetadata.Step steps = 2;
     */
    steps: OperationMetadata_Step[];
    /**
     * Percentage of completion of this operation, ranging from 0 to 100.
     *
     * @generated from protobuf field: int32 progress_percentage = 3;
     */
    progressPercentage: number;
    /**
     * The start time of the operation.
     *
     * @generated from protobuf field: google.protobuf.Timestamp start_time = 4;
     */
    startTime?: Timestamp;
}
/**
 * Represents the status of one operation step.
 *
 * @generated from protobuf message google.api.servicemanagement.v1.OperationMetadata.Step
 */
export interface OperationMetadata_Step {
    /**
     * The short description of the step.
     *
     * @generated from protobuf field: string description = 2;
     */
    description: string;
    /**
     * The status code.
     *
     * @generated from protobuf field: google.api.servicemanagement.v1.OperationMetadata.Status status = 4;
     */
    status: OperationMetadata_Status;
}
/**
 * Code describes the status of the operation (or one of its steps).
 *
 * @generated from protobuf enum google.api.servicemanagement.v1.OperationMetadata.Status
 */
export declare enum OperationMetadata_Status {
    /**
     * Unspecifed code.
     *
     * @generated from protobuf enum value: STATUS_UNSPECIFIED = 0;
     */
    STATUS_UNSPECIFIED = 0,
    /**
     * The operation or step has completed without errors.
     *
     * @generated from protobuf enum value: DONE = 1;
     */
    DONE = 1,
    /**
     * The operation or step has not started yet.
     *
     * @generated from protobuf enum value: NOT_STARTED = 2;
     */
    NOT_STARTED = 2,
    /**
     * The operation or step is in progress.
     *
     * @generated from protobuf enum value: IN_PROGRESS = 3;
     */
    IN_PROGRESS = 3,
    /**
     * The operation or step has completed with errors. If the operation is
     * rollbackable, the rollback completed with errors too.
     *
     * @generated from protobuf enum value: FAILED = 4;
     */
    FAILED = 4,
    /**
     * The operation or step has completed with cancellation.
     *
     * @generated from protobuf enum value: CANCELLED = 5;
     */
    CANCELLED = 5
}
/**
 * Represents a diagnostic message (error or warning)
 *
 * @generated from protobuf message google.api.servicemanagement.v1.Diagnostic
 */
export interface Diagnostic {
    /**
     * File name and line number of the error or warning.
     *
     * @generated from protobuf field: string location = 1;
     */
    location: string;
    /**
     * The kind of diagnostic information provided.
     *
     * @generated from protobuf field: google.api.servicemanagement.v1.Diagnostic.Kind kind = 2;
     */
    kind: Diagnostic_Kind;
    /**
     * Message describing the error or warning.
     *
     * @generated from protobuf field: string message = 3;
     */
    message: string;
}
/**
 * The kind of diagnostic information possible.
 *
 * @generated from protobuf enum google.api.servicemanagement.v1.Diagnostic.Kind
 */
export declare enum Diagnostic_Kind {
    /**
     * Warnings and errors
     *
     * @generated from protobuf enum value: WARNING = 0;
     */
    WARNING = 0,
    /**
     * Only errors
     *
     * @generated from protobuf enum value: ERROR = 1;
     */
    ERROR = 1
}
/**
 * Represents a source file which is used to generate the service configuration
 * defined by `google.api.Service`.
 *
 * @generated from protobuf message google.api.servicemanagement.v1.ConfigSource
 */
export interface ConfigSource {
    /**
     * A unique ID for a specific instance of this message, typically assigned
     * by the client for tracking purpose. If empty, the server may choose to
     * generate one instead.
     *
     * @generated from protobuf field: string id = 5;
     */
    id: string;
    /**
     * Set of source configuration files that are used to generate a service
     * configuration (`google.api.Service`).
     *
     * @generated from protobuf field: repeated google.api.servicemanagement.v1.ConfigFile files = 2;
     */
    files: ConfigFile[];
}
/**
 * Generic specification of a source configuration file
 *
 * @generated from protobuf message google.api.servicemanagement.v1.ConfigFile
 */
export interface ConfigFile {
    /**
     * The file name of the configuration file (full or relative path).
     *
     * @generated from protobuf field: string file_path = 1;
     */
    filePath: string;
    /**
     * The bytes that constitute the file.
     *
     * @generated from protobuf field: bytes file_contents = 3;
     */
    fileContents: Uint8Array;
    /**
     * The type of configuration file this represents.
     *
     * @generated from protobuf field: google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4;
     */
    fileType: ConfigFile_FileType;
}
/**
 * @generated from protobuf enum google.api.servicemanagement.v1.ConfigFile.FileType
 */
export declare enum ConfigFile_FileType {
    /**
     * Unknown file type.
     *
     * @generated from protobuf enum value: FILE_TYPE_UNSPECIFIED = 0;
     */
    FILE_TYPE_UNSPECIFIED = 0,
    /**
     * YAML-specification of service.
     *
     * @generated from protobuf enum value: SERVICE_CONFIG_YAML = 1;
     */
    SERVICE_CONFIG_YAML = 1,
    /**
     * OpenAPI specification, serialized in JSON.
     *
     * @generated from protobuf enum value: OPEN_API_JSON = 2;
     */
    OPEN_API_JSON = 2,
    /**
     * OpenAPI specification, serialized in YAML.
     *
     * @generated from protobuf enum value: OPEN_API_YAML = 3;
     */
    OPEN_API_YAML = 3,
    /**
     * FileDescriptorSet, generated by protoc.
     *
     * To generate, use protoc with imports and source info included.
     * For an example test.proto file, the following command would put the value
     * in a new file named out.pb.
     *
     * $protoc --include_imports --include_source_info test.proto -o out.pb
     *
     * @generated from protobuf enum value: FILE_DESCRIPTOR_SET_PROTO = 4;
     */
    FILE_DESCRIPTOR_SET_PROTO = 4,
    /**
     * Uncompiled Proto file. Used for storage and display purposes only,
     * currently server-side compilation is not supported. Should match the
     * inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A
     * file of this type can only be included if at least one file of type
     * FILE_DESCRIPTOR_SET_PROTO is included.
     *
     * @generated from protobuf enum value: PROTO_FILE = 6;
     */
    PROTO_FILE = 6
}
/**
 * Represents a service configuration with its name and id.
 *
 * @generated from protobuf message google.api.servicemanagement.v1.ConfigRef
 */
export interface ConfigRef {
    /**
     * Resource name of a service config. It must have the following
     * format: "services/{service name}/configs/{config id}".
     *
     * @generated from protobuf field: string name = 1;
     */
    name: string;
}
/**
 * Change report associated with a particular service configuration.
 *
 * It contains a list of ConfigChanges based on the comparison between
 * two service configurations.
 *
 * @generated from protobuf message google.api.servicemanagement.v1.ChangeReport
 */
export interface ChangeReport {
    /**
     * List of changes between two service configurations.
     * The changes will be alphabetically sorted based on the identifier
     * of each change.
     * A ConfigChange identifier is a dot separated path to the configuration.
     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
     *
     * @generated from protobuf field: repeated google.api.ConfigChange config_changes = 1;
     */
    configChanges: ConfigChange[];
}
/**
 * A rollout resource that defines how service configuration versions are pushed
 * to control plane systems. Typically, you create a new version of the
 * service config, and then create a Rollout to push the service config.
 *
 * @generated from protobuf message google.api.servicemanagement.v1.Rollout
 */
export interface Rollout {
    /**
     * Optional. Unique identifier of this Rollout. Must be no longer than 63
     * characters and only lower case letters, digits, '.', '_' and '-' are
     * allowed.
     *
     * If not specified by client, the server will generate one. The generated id
     * will have the form of <date><revision number>, where "date" is the create
     * date in ISO 8601 format.  "revision number" is a monotonically increasing
     * positive number that is reset every day for each service.
     * An example of the generated rollout_id is '2016-02-16r1'
     *
     * @generated from protobuf field: string rollout_id = 1;
     */
    rolloutId: string;
    /**
     * Creation time of the rollout. Readonly.
     *
     * @generated from protobuf field: google.protobuf.Timestamp create_time = 2;
     */
    createTime?: Timestamp;
    /**
     * The user who created the Rollout. Readonly.
     *
     * @generated from protobuf field: string created_by = 3;
     */
    createdBy: string;
    /**
     * The status of this rollout. Readonly. In case of a failed rollout,
     * the system will automatically rollback to the current Rollout
     * version. Readonly.
     *
     * @generated from protobuf field: google.api.servicemanagement.v1.Rollout.RolloutStatus status = 4;
     */
    status: Rollout_RolloutStatus;
    /**
     * @generated from protobuf oneof: strategy
     */
    strategy: {
        oneofKind: "trafficPercentStrategy";
        /**
         * Google Service Control selects service configurations based on
         * traffic percentage.
         *
         * @generated from protobuf field: google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5;
         */
        trafficPercentStrategy: Rollout_TrafficPercentStrategy;
    } | {
        oneofKind: "deleteServiceStrategy";
        /**
         * The strategy associated with a rollout to delete a `ManagedService`.
         * Readonly.
         *
         * @generated from protobuf field: google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200;
         */
        deleteServiceStrategy: Rollout_DeleteServiceStrategy;
    } | {
        oneofKind: undefined;
    };
    /**
     * The name of the service associated with this Rollout.
     *
     * @generated from protobuf field: string service_name = 8;
     */
    serviceName: string;
}
/**
 * Strategy that specifies how clients of Google Service Controller want to
 * send traffic to use different config versions. This is generally
 * used by API proxy to split traffic based on your configured percentage for
 * each config version.
 *
 * One example of how to gradually rollout a new service configuration using
 * this
 * strategy:
 * Day 1
 *
 *     Rollout {
 *       id: "example.googleapis.com/rollout_20160206"
 *       traffic_percent_strategy {
 *         percentages: {
 *           "example.googleapis.com/20160201": 70.00
 *           "example.googleapis.com/20160206": 30.00
 *         }
 *       }
 *     }
 *
 * Day 2
 *
 *     Rollout {
 *       id: "example.googleapis.com/rollout_20160207"
 *       traffic_percent_strategy: {
 *         percentages: {
 *           "example.googleapis.com/20160206": 100.00
 *         }
 *       }
 *     }
 *
 * @generated from protobuf message google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy
 */
export interface Rollout_TrafficPercentStrategy {
    /**
     * Maps service configuration IDs to their corresponding traffic percentage.
     * Key is the service configuration ID, Value is the traffic percentage
     * which must be greater than 0.0 and the sum must equal to 100.0.
     *
     * @generated from protobuf field: map<string, double> percentages = 1;
     */
    percentages: {
        [key: string]: number;
    };
}
/**
 * Strategy used to delete a service. This strategy is a placeholder only
 * used by the system generated rollout to delete a service.
 *
 * @generated from protobuf message google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy
 */
export interface Rollout_DeleteServiceStrategy {
}
/**
 * Status of a Rollout.
 *
 * @generated from protobuf enum google.api.servicemanagement.v1.Rollout.RolloutStatus
 */
export declare enum Rollout_RolloutStatus {
    /**
     * No status specified.
     *
     * @generated from protobuf enum value: ROLLOUT_STATUS_UNSPECIFIED = 0;
     */
    ROLLOUT_STATUS_UNSPECIFIED = 0,
    /**
     * The Rollout is in progress.
     *
     * @generated from protobuf enum value: IN_PROGRESS = 1;
     */
    IN_PROGRESS = 1,
    /**
     * The Rollout has completed successfully.
     *
     * @generated from protobuf enum value: SUCCESS = 2;
     */
    SUCCESS = 2,
    /**
     * The Rollout has been cancelled. This can happen if you have overlapping
     * Rollout pushes, and the previous ones will be cancelled.
     *
     * @generated from protobuf enum value: CANCELLED = 3;
     */
    CANCELLED = 3,
    /**
     * The Rollout has failed and the rollback attempt has failed too.
     *
     * @generated from protobuf enum value: FAILED = 4;
     */
    FAILED = 4,
    /**
     * The Rollout has not started yet and is pending for execution.
     *
     * @generated from protobuf enum value: PENDING = 5;
     */
    PENDING = 5,
    /**
     * The Rollout has failed and rolled back to the previous successful
     * Rollout.
     *
     * @generated from protobuf enum value: FAILED_ROLLED_BACK = 6;
     */
    FAILED_ROLLED_BACK = 6
}
declare class ManagedService$Type extends MessageType<ManagedService> {
    constructor();
    create(value?: PartialMessage<ManagedService>): ManagedService;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ManagedService): ManagedService;
    internalBinaryWrite(message: ManagedService, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.api.servicemanagement.v1.ManagedService
 */
export declare const ManagedService: ManagedService$Type;
declare class OperationMetadata$Type extends MessageType<OperationMetadata> {
    constructor();
    create(value?: PartialMessage<OperationMetadata>): OperationMetadata;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OperationMetadata): OperationMetadata;
    internalBinaryWrite(message: OperationMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.api.servicemanagement.v1.OperationMetadata
 */
export declare const OperationMetadata: OperationMetadata$Type;
declare class OperationMetadata_Step$Type extends MessageType<OperationMetadata_Step> {
    constructor();
    create(value?: PartialMessage<OperationMetadata_Step>): OperationMetadata_Step;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OperationMetadata_Step): OperationMetadata_Step;
    internalBinaryWrite(message: OperationMetadata_Step, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.api.servicemanagement.v1.OperationMetadata.Step
 */
export declare const OperationMetadata_Step: OperationMetadata_Step$Type;
declare class Diagnostic$Type extends MessageType<Diagnostic> {
    constructor();
    create(value?: PartialMessage<Diagnostic>): Diagnostic;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Diagnostic): Diagnostic;
    internalBinaryWrite(message: Diagnostic, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.api.servicemanagement.v1.Diagnostic
 */
export declare const Diagnostic: Diagnostic$Type;
declare class ConfigSource$Type extends MessageType<ConfigSource> {
    constructor();
    create(value?: PartialMessage<ConfigSource>): ConfigSource;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConfigSource): ConfigSource;
    internalBinaryWrite(message: ConfigSource, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.api.servicemanagement.v1.ConfigSource
 */
export declare const ConfigSource: ConfigSource$Type;
declare class ConfigFile$Type extends MessageType<ConfigFile> {
    constructor();
    create(value?: PartialMessage<ConfigFile>): ConfigFile;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConfigFile): ConfigFile;
    internalBinaryWrite(message: ConfigFile, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.api.servicemanagement.v1.ConfigFile
 */
export declare const ConfigFile: ConfigFile$Type;
declare class ConfigRef$Type extends MessageType<ConfigRef> {
    constructor();
    create(value?: PartialMessage<ConfigRef>): ConfigRef;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConfigRef): ConfigRef;
    internalBinaryWrite(message: ConfigRef, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.api.servicemanagement.v1.ConfigRef
 */
export declare const ConfigRef: ConfigRef$Type;
declare class ChangeReport$Type extends MessageType<ChangeReport> {
    constructor();
    create(value?: PartialMessage<ChangeReport>): ChangeReport;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ChangeReport): ChangeReport;
    internalBinaryWrite(message: ChangeReport, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.api.servicemanagement.v1.ChangeReport
 */
export declare const ChangeReport: ChangeReport$Type;
declare class Rollout$Type extends MessageType<Rollout> {
    constructor();
    create(value?: PartialMessage<Rollout>): Rollout;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Rollout): Rollout;
    internalBinaryWrite(message: Rollout, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.api.servicemanagement.v1.Rollout
 */
export declare const Rollout: Rollout$Type;
declare class Rollout_TrafficPercentStrategy$Type extends MessageType<Rollout_TrafficPercentStrategy> {
    constructor();
    create(value?: PartialMessage<Rollout_TrafficPercentStrategy>): Rollout_TrafficPercentStrategy;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Rollout_TrafficPercentStrategy): Rollout_TrafficPercentStrategy;
    private binaryReadMap1;
    internalBinaryWrite(message: Rollout_TrafficPercentStrategy, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy
 */
export declare const Rollout_TrafficPercentStrategy: Rollout_TrafficPercentStrategy$Type;
declare class Rollout_DeleteServiceStrategy$Type extends MessageType<Rollout_DeleteServiceStrategy> {
    constructor();
    create(value?: PartialMessage<Rollout_DeleteServiceStrategy>): Rollout_DeleteServiceStrategy;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Rollout_DeleteServiceStrategy): Rollout_DeleteServiceStrategy;
    internalBinaryWrite(message: Rollout_DeleteServiceStrategy, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy
 */
export declare const Rollout_DeleteServiceStrategy: Rollout_DeleteServiceStrategy$Type;
export {};
