import { ServiceType } from "@protobuf-ts/runtime-rpc"; 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 { Status } from "../../../rpc/status"; import { CheckError } from "./check_error"; import { Operation } from "./operation"; /** * Request message for the Check method. * * @generated from protobuf message google.api.servicecontrol.v1.CheckRequest */ export interface CheckRequest { /** * The service name as specified in its service configuration. For example, * `"pubsub.googleapis.com"`. * * See * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) * for the definition of a service name. * * @generated from protobuf field: string service_name = 1; */ serviceName: string; /** * The operation to be checked. * * @generated from protobuf field: google.api.servicecontrol.v1.Operation operation = 2; */ operation?: Operation; /** * Specifies which version of service configuration should be used to process * the request. * * If unspecified or no matching version can be found, the * latest one will be used. * * @generated from protobuf field: string service_config_id = 4; */ serviceConfigId: string; } /** * Response message for the Check method. * * @generated from protobuf message google.api.servicecontrol.v1.CheckResponse */ export interface CheckResponse { /** * The same operation_id value used in the * [CheckRequest][google.api.servicecontrol.v1.CheckRequest]. Used for logging * and diagnostics purposes. * * @generated from protobuf field: string operation_id = 1; */ operationId: string; /** * Indicate the decision of the check. * * If no check errors are present, the service should process the operation. * Otherwise the service should use the list of errors to determine the * appropriate action. * * @generated from protobuf field: repeated google.api.servicecontrol.v1.CheckError check_errors = 2; */ checkErrors: CheckError[]; /** * The actual config id used to process the request. * * @generated from protobuf field: string service_config_id = 5; */ serviceConfigId: string; /** * The current service rollout id used to process the request. * * @generated from protobuf field: string service_rollout_id = 11; */ serviceRolloutId: string; /** * Feedback data returned from the server during processing a Check request. * * @generated from protobuf field: google.api.servicecontrol.v1.CheckResponse.CheckInfo check_info = 6; */ checkInfo?: CheckResponse_CheckInfo; } /** * Contains additional information about the check operation. * * @generated from protobuf message google.api.servicecontrol.v1.CheckResponse.CheckInfo */ export interface CheckResponse_CheckInfo { /** * A list of fields and label keys that are ignored by the server. * The client doesn't need to send them for following requests to improve * performance and allow better aggregation. * * @generated from protobuf field: repeated string unused_arguments = 1; */ unusedArguments: string[]; /** * Consumer info of this check. * * @generated from protobuf field: google.api.servicecontrol.v1.CheckResponse.ConsumerInfo consumer_info = 2; */ consumerInfo?: CheckResponse_ConsumerInfo; } /** * `ConsumerInfo` provides information about the consumer. * * @generated from protobuf message google.api.servicecontrol.v1.CheckResponse.ConsumerInfo */ export interface CheckResponse_ConsumerInfo { /** * The Google cloud project number, e.g. 1234567890. A value of 0 indicates * no project number is found. * * NOTE: This field is deprecated after we support flexible consumer * id. New code should not depend on this field anymore. * * @generated from protobuf field: int64 project_number = 1; */ projectNumber: bigint; /** * The type of the consumer which should have been defined in * [Google Resource Manager](https://cloud.google.com/resource-manager/). * * @generated from protobuf field: google.api.servicecontrol.v1.CheckResponse.ConsumerInfo.ConsumerType type = 2; */ type: CheckResponse_ConsumerInfo_ConsumerType; /** * The consumer identity number, can be Google cloud project number, folder * number or organization number e.g. 1234567890. A value of 0 indicates no * consumer number is found. * * @generated from protobuf field: int64 consumer_number = 3; */ consumerNumber: bigint; } /** * The type of the consumer as defined in * [Google Resource Manager](https://cloud.google.com/resource-manager/). * * @generated from protobuf enum google.api.servicecontrol.v1.CheckResponse.ConsumerInfo.ConsumerType */ export declare enum CheckResponse_ConsumerInfo_ConsumerType { /** * This is never used. * * @generated from protobuf enum value: CONSUMER_TYPE_UNSPECIFIED = 0; */ CONSUMER_TYPE_UNSPECIFIED = 0, /** * The consumer is a Google Cloud Project. * * @generated from protobuf enum value: PROJECT = 1; */ PROJECT = 1, /** * The consumer is a Google Cloud Folder. * * @generated from protobuf enum value: FOLDER = 2; */ FOLDER = 2, /** * The consumer is a Google Cloud Organization. * * @generated from protobuf enum value: ORGANIZATION = 3; */ ORGANIZATION = 3, /** * Service-specific resource container which is defined by the service * producer to offer their users the ability to manage service control * functionalities at a finer level of granularity than the PROJECT. * * @generated from protobuf enum value: SERVICE_SPECIFIC = 4; */ SERVICE_SPECIFIC = 4 } /** * Request message for the Report method. * * @generated from protobuf message google.api.servicecontrol.v1.ReportRequest */ export interface ReportRequest { /** * The service name as specified in its service configuration. For example, * `"pubsub.googleapis.com"`. * * See * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) * for the definition of a service name. * * @generated from protobuf field: string service_name = 1; */ serviceName: string; /** * Operations to be reported. * * Typically the service should report one operation per request. * Putting multiple operations into a single request is allowed, but should * be used only when multiple operations are natually available at the time * of the report. * * There is no limit on the number of operations in the same ReportRequest, * however the ReportRequest size should be no larger than 1MB. See * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors] * for partial failure behavior. * * @generated from protobuf field: repeated google.api.servicecontrol.v1.Operation operations = 2; */ operations: Operation[]; /** * Specifies which version of service config should be used to process the * request. * * If unspecified or no matching version can be found, the * latest one will be used. * * @generated from protobuf field: string service_config_id = 3; */ serviceConfigId: string; } /** * Response message for the Report method. * * @generated from protobuf message google.api.servicecontrol.v1.ReportResponse */ export interface ReportResponse { /** * Partial failures, one for each `Operation` in the request that failed * processing. There are three possible combinations of the RPC status: * * 1. The combination of a successful RPC status and an empty `report_errors` * list indicates a complete success where all `Operations` in the * request are processed successfully. * 2. The combination of a successful RPC status and a non-empty * `report_errors` list indicates a partial success where some * `Operations` in the request succeeded. Each * `Operation` that failed processing has a corresponding item * in this list. * 3. A failed RPC status indicates a general non-deterministic failure. * When this happens, it's impossible to know which of the * 'Operations' in the request succeeded or failed. * * @generated from protobuf field: repeated google.api.servicecontrol.v1.ReportResponse.ReportError report_errors = 1; */ reportErrors: ReportResponse_ReportError[]; /** * The actual config id used to process the request. * * @generated from protobuf field: string service_config_id = 2; */ serviceConfigId: string; /** * The current service rollout id used to process the request. * * @generated from protobuf field: string service_rollout_id = 4; */ serviceRolloutId: string; } /** * Represents the processing error of one * [Operation][google.api.servicecontrol.v1.Operation] in the request. * * @generated from protobuf message google.api.servicecontrol.v1.ReportResponse.ReportError */ export interface ReportResponse_ReportError { /** * The * [Operation.operation_id][google.api.servicecontrol.v1.Operation.operation_id] * value from the request. * * @generated from protobuf field: string operation_id = 1; */ operationId: string; /** * Details of the error when processing the * [Operation][google.api.servicecontrol.v1.Operation]. * * @generated from protobuf field: google.rpc.Status status = 2; */ status?: Status; } declare class CheckRequest$Type extends MessageType { constructor(); create(value?: PartialMessage): CheckRequest; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CheckRequest): CheckRequest; internalBinaryWrite(message: CheckRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.servicecontrol.v1.CheckRequest */ export declare const CheckRequest: CheckRequest$Type; declare class CheckResponse$Type extends MessageType { constructor(); create(value?: PartialMessage): CheckResponse; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CheckResponse): CheckResponse; internalBinaryWrite(message: CheckResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.servicecontrol.v1.CheckResponse */ export declare const CheckResponse: CheckResponse$Type; declare class CheckResponse_CheckInfo$Type extends MessageType { constructor(); create(value?: PartialMessage): CheckResponse_CheckInfo; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CheckResponse_CheckInfo): CheckResponse_CheckInfo; internalBinaryWrite(message: CheckResponse_CheckInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.servicecontrol.v1.CheckResponse.CheckInfo */ export declare const CheckResponse_CheckInfo: CheckResponse_CheckInfo$Type; declare class CheckResponse_ConsumerInfo$Type extends MessageType { constructor(); create(value?: PartialMessage): CheckResponse_ConsumerInfo; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CheckResponse_ConsumerInfo): CheckResponse_ConsumerInfo; internalBinaryWrite(message: CheckResponse_ConsumerInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.servicecontrol.v1.CheckResponse.ConsumerInfo */ export declare const CheckResponse_ConsumerInfo: CheckResponse_ConsumerInfo$Type; declare class ReportRequest$Type extends MessageType { constructor(); create(value?: PartialMessage): ReportRequest; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReportRequest): ReportRequest; internalBinaryWrite(message: ReportRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.servicecontrol.v1.ReportRequest */ export declare const ReportRequest: ReportRequest$Type; declare class ReportResponse$Type extends MessageType { constructor(); create(value?: PartialMessage): ReportResponse; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReportResponse): ReportResponse; internalBinaryWrite(message: ReportResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.servicecontrol.v1.ReportResponse */ export declare const ReportResponse: ReportResponse$Type; declare class ReportResponse_ReportError$Type extends MessageType { constructor(); create(value?: PartialMessage): ReportResponse_ReportError; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReportResponse_ReportError): ReportResponse_ReportError; internalBinaryWrite(message: ReportResponse_ReportError, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.servicecontrol.v1.ReportResponse.ReportError */ export declare const ReportResponse_ReportError: ReportResponse_ReportError$Type; /** * @generated ServiceType for protobuf service google.api.servicecontrol.v1.ServiceController */ export declare const ServiceController: ServiceType; export {};