// @generated by protoc-gen-es v2.13.0 with parameter "target=ts,import_extension=js"
// @generated from file soulfire/proxy-check.proto (package soulfire.v1, syntax proto3)
/* eslint-disable */

import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
import type { ProxyProto } from "./common_pb.js";
import { file_soulfire_common } from "./common_pb.js";
import { file_soulfire_api_docs } from "./api_docs_pb.js";
import { file_google_api_field_behavior } from "../google/api/field_behavior_pb.js";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file soulfire/proxy-check.proto.
 */
export const file_soulfire_proxy_check: GenFile = /*@__PURE__*/
  fileDesc("Chpzb3VsZmlyZS9wcm94eS1jaGVjay5wcm90bxILc291bGZpcmUudjEiZAoRUHJveHlDaGVja1JlcXVlc3QSIgoLaW5zdGFuY2VfaWQYASABKAlCDeBBAtLzGAYKBHV1aWQSKwoFcHJveHkYAiADKAsyFy5zb3VsZmlyZS52MS5Qcm94eVByb3RvQgPgQQIihwEKGFByb3h5Q2hlY2tSZXNwb25zZVNpbmdsZRIrCgVwcm94eRgBIAEoCzIXLnNvdWxmaXJlLnYxLlByb3h5UHJvdG9CA+BBAhISCgV2YWxpZBgCIAEoCEID4EECEhQKB2xhdGVuY3kYAyABKAVCA+BBAhIUCgdyZWFsX2lwGAQgASgJQgPgQQIiDwoNUHJveHlDaGVja0VuZCKAAQoSUHJveHlDaGVja1Jlc3BvbnNlEjcKBnNpbmdsZRgEIAEoCzIlLnNvdWxmaXJlLnYxLlByb3h5Q2hlY2tSZXNwb25zZVNpbmdsZUgAEikKA2VuZBgFIAEoCzIaLnNvdWxmaXJlLnYxLlByb3h5Q2hlY2tFbmRIAEIGCgRkYXRhMtMBChFQcm94eUNoZWNrU2VydmljZRK9AQoFQ2hlY2sSHi5zb3VsZmlyZS52MS5Qcm94eUNoZWNrUmVxdWVzdBofLnNvdWxmaXJlLnYxLlByb3h5Q2hlY2tSZXNwb25zZSJxyvMYbQoNQ2hlY2sgcHJveGllcxoLQ0hFQ0tfUFJPWFkiCGluc3RhbmNlMhBTZXJ2ZXIgc3RyZWFtaW5nOjNTdHJlYW1zIHByb3h5LWNoZWNrIHJlc3VsdHMgYXMgZWFjaCBwcm94eSBmaW5pc2hlcy4wAUIhCh1jb20uc291bGZpcmVtYy5ncnBjLmdlbmVyYXRlZFABYgZwcm90bzM", [file_soulfire_common, file_soulfire_api_docs, file_google_api_field_behavior]);

/**
 * Request message for checking the validity of one or more proxies.
 * The check is performed by attempting to connect to a Minecraft server
 * through each proxy and measuring the connection latency.
 *
 * @generated from message soulfire.v1.ProxyCheckRequest
 */
export type ProxyCheckRequest = Message<"soulfire.v1.ProxyCheckRequest"> & {
  /**
   * The UUID of the instance to use for proxy checking.
   * The instance provides configuration such as the target Minecraft server address
   * (configured via ProxySettings.PROXY_CHECK_ADDRESS, defaults to "mc.hypixel.net"),
   * the protocol version, and concurrency settings.
   * The user must have CHECK_PROXY permission on this instance.
   *
   * @generated from field: string instance_id = 1;
   */
  instanceId: string;

  /**
   * List of proxies to check. Each proxy will be tested by attempting to
   * establish a connection to the configured Minecraft server through it.
   * Proxies are checked concurrently based on the instance's PROXY_CHECK_CONCURRENCY
   * setting (defaults to 10 concurrent checks).
   *
   * @generated from field: repeated soulfire.v1.ProxyProto proxy = 2;
   */
  proxy: ProxyProto[];
};

/**
 * Describes the message soulfire.v1.ProxyCheckRequest.
 * Use `create(ProxyCheckRequestSchema)` to create a new message.
 */
export const ProxyCheckRequestSchema: GenMessage<ProxyCheckRequest> = /*@__PURE__*/
  messageDesc(file_soulfire_proxy_check, 0);

/**
 * Result of checking a single proxy's validity and performance.
 *
 * @generated from message soulfire.v1.ProxyCheckResponseSingle
 */
export type ProxyCheckResponseSingle = Message<"soulfire.v1.ProxyCheckResponseSingle"> & {
  /**
   * The proxy that was checked. This is echoed back from the request
   * to allow correlation when checking multiple proxies.
   *
   * @generated from field: soulfire.v1.ProxyProto proxy = 1;
   */
  proxy?: ProxyProto | undefined;

  /**
   * Whether the proxy check was successful. A proxy is considered valid if
   * a connection through it to the Minecraft server was established successfully
   * and a status response packet was received within the 30-second timeout.
   * If false, the proxy failed to connect, timed out, or encountered an error.
   *
   * @generated from field: bool valid = 2;
   */
  valid: boolean;

  /**
   * The time in milliseconds taken to complete the proxy check.
   * This measures the total time from starting the connection attempt
   * until receiving the server status response (or until failure/timeout).
   * Useful for comparing proxy performance and choosing the fastest proxies.
   *
   * @generated from field: int32 latency = 3;
   */
  latency: number;

  /**
   * The real IP address as seen by the target server (if available).
   * This field may be empty if the IP could not be determined.
   * Note: Currently not populated by the implementation.
   *
   * @generated from field: string real_ip = 4;
   */
  realIp: string;
};

/**
 * Describes the message soulfire.v1.ProxyCheckResponseSingle.
 * Use `create(ProxyCheckResponseSingleSchema)` to create a new message.
 */
export const ProxyCheckResponseSingleSchema: GenMessage<ProxyCheckResponseSingle> = /*@__PURE__*/
  messageDesc(file_soulfire_proxy_check, 1);

/**
 * Sentinel message indicating that all proxy checks have completed.
 * This is the final message sent in the response stream, signaling
 * that no more ProxyCheckResponseSingle messages will follow.
 *
 * @generated from message soulfire.v1.ProxyCheckEnd
 */
export type ProxyCheckEnd = Message<"soulfire.v1.ProxyCheckEnd"> & {
};

/**
 * Describes the message soulfire.v1.ProxyCheckEnd.
 * Use `create(ProxyCheckEndSchema)` to create a new message.
 */
export const ProxyCheckEndSchema: GenMessage<ProxyCheckEnd> = /*@__PURE__*/
  messageDesc(file_soulfire_proxy_check, 2);

/**
 * Response message for proxy checking, sent as a stream.
 * Each message contains either a single proxy check result or an end marker.
 *
 * @generated from message soulfire.v1.ProxyCheckResponse
 */
export type ProxyCheckResponse = Message<"soulfire.v1.ProxyCheckResponse"> & {
  /**
   * @generated from oneof soulfire.v1.ProxyCheckResponse.data
   */
  data: {
    /**
     * A single proxy check result. Multiple of these will be streamed
     * as each proxy check completes, allowing the client to process
     * results incrementally rather than waiting for all checks to finish.
     *
     * @generated from field: soulfire.v1.ProxyCheckResponseSingle single = 4;
     */
    value: ProxyCheckResponseSingle;
    case: "single";
  } | {
    /**
     * End-of-stream marker indicating all proxy checks are complete.
     * This is always the last message in the stream before it closes.
     *
     * @generated from field: soulfire.v1.ProxyCheckEnd end = 5;
     */
    value: ProxyCheckEnd;
    case: "end";
  } | { case: undefined; value?: undefined };
};

/**
 * Describes the message soulfire.v1.ProxyCheckResponse.
 * Use `create(ProxyCheckResponseSchema)` to create a new message.
 */
export const ProxyCheckResponseSchema: GenMessage<ProxyCheckResponse> = /*@__PURE__*/
  messageDesc(file_soulfire_proxy_check, 3);

/**
 * Service for validating proxy servers by testing their ability to connect
 * to Minecraft servers. This is useful for filtering out dead or slow proxies
 * before using them for bot connections.
 *
 * The service tests proxies by attempting to establish a Minecraft protocol
 * connection through each proxy to a configurable target server and waiting
 * for a status response packet. Results include whether the proxy works and
 * its latency.
 *
 * @generated from service soulfire.v1.ProxyCheckService
 */
export const ProxyCheckService: GenService<{
  /**
   * Checks the validity of one or more proxies by attempting to connect
   * through them to a Minecraft server.
   *
   * The check process:
   * 1. For each proxy in the request, a connection attempt is made through
   *    the proxy to the Minecraft server configured in the instance settings
   * 2. The connection uses the protocol version configured in the instance
   * 3. A proxy is considered valid if it successfully connects and receives
   *    a server status response within 30 seconds
   * 4. Results are streamed back as each check completes
   * 5. A ProxyCheckEnd message is sent when all checks are complete
   *
   * Concurrency is controlled by the instance's PROXY_CHECK_CONCURRENCY setting.
   *
   * Required permission: CHECK_PROXY on the specified instance.
   *
   * Error cases:
   * - NOT_FOUND: The specified instance_id does not exist
   * - PERMISSION_DENIED: The user lacks CHECK_PROXY permission on the instance
   * - INTERNAL: An unexpected error occurred during proxy checking
   *
   * The stream can be cancelled by the client at any time, which will
   * terminate any in-progress proxy checks.
   *
   * @generated from rpc soulfire.v1.ProxyCheckService.Check
   */
  check: {
    methodKind: "server_streaming";
    input: typeof ProxyCheckRequestSchema;
    output: typeof ProxyCheckResponseSchema;
  },
}> = /*@__PURE__*/
  serviceDesc(file_soulfire_proxy_check, 0);
