//
// Copyright 2008-2026 Async-IO.org
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.

// @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
// @generated from file atmosphere.proto (package org.atmosphere.grpc, syntax proto3)
/* eslint-disable */

import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file atmosphere.proto.
 */
export const file_atmosphere: GenFile = /*@__PURE__*/
  fileDesc("ChBhdG1vc3BoZXJlLnByb3RvEhNvcmcuYXRtb3NwaGVyZS5ncnBjIoYCChFBdG1vc3BoZXJlTWVzc2FnZRIuCgR0eXBlGAEgASgOMiAub3JnLmF0bW9zcGhlcmUuZ3JwYy5NZXNzYWdlVHlwZRINCgV0b3BpYxgCIAEoCRIPCgdwYXlsb2FkGAMgASgJEhYKDmJpbmFyeV9wYXlsb2FkGAQgASgMEkQKB2hlYWRlcnMYBSADKAsyMy5vcmcuYXRtb3NwaGVyZS5ncnBjLkF0bW9zcGhlcmVNZXNzYWdlLkhlYWRlcnNFbnRyeRITCgt0cmFja2luZ19pZBgGIAEoCRouCgxIZWFkZXJzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ASpdCgtNZXNzYWdlVHlwZRINCglTVUJTQ1JJQkUQABIPCgtVTlNVQlNDUklCRRABEgsKB01FU1NBR0UQAhINCglIRUFSVEJFQVQQAxIHCgNBQ0sQBBIJCgVFUlJPUhAFMqgCChFBdG1vc3BoZXJlU2VydmljZRJcCgZTdHJlYW0SJi5vcmcuYXRtb3NwaGVyZS5ncnBjLkF0bW9zcGhlcmVNZXNzYWdlGiYub3JnLmF0bW9zcGhlcmUuZ3JwYy5BdG1vc3BoZXJlTWVzc2FnZSgBMAESXQoJU3Vic2NyaWJlEiYub3JnLmF0bW9zcGhlcmUuZ3JwYy5BdG1vc3BoZXJlTWVzc2FnZRomLm9yZy5hdG1vc3BoZXJlLmdycGMuQXRtb3NwaGVyZU1lc3NhZ2UwARJWCgRTZW5kEiYub3JnLmF0bW9zcGhlcmUuZ3JwYy5BdG1vc3BoZXJlTWVzc2FnZRomLm9yZy5hdG1vc3BoZXJlLmdycGMuQXRtb3NwaGVyZU1lc3NhZ2VCLgoZb3JnLmF0bW9zcGhlcmUuZ3JwYy5wcm90b0IPQXRtb3NwaGVyZVByb3RvUAFiBnByb3RvMw");

/**
 * @generated from message org.atmosphere.grpc.AtmosphereMessage
 */
export type AtmosphereMessage = Message<"org.atmosphere.grpc.AtmosphereMessage"> & {
  /**
   * Message type
   *
   * @generated from field: org.atmosphere.grpc.MessageType type = 1;
   */
  type: MessageType;

  /**
   * Broadcaster topic/path (e.g., "/chat", "/notifications")
   *
   * @generated from field: string topic = 2;
   */
  topic: string;

  /**
   * Text payload
   *
   * @generated from field: string payload = 3;
   */
  payload: string;

  /**
   * Binary payload
   *
   * @generated from field: bytes binary_payload = 4;
   */
  binaryPayload: Uint8Array;

  /**
   * Arbitrary metadata (tracking-id, custom headers, etc.)
   *
   * @generated from field: map<string, string> headers = 5;
   */
  headers: { [key: string]: string };

  /**
   * Server-assigned tracking ID for the connection
   *
   * @generated from field: string tracking_id = 6;
   */
  trackingId: string;
};

/**
 * Describes the message org.atmosphere.grpc.AtmosphereMessage.
 * Use `create(AtmosphereMessageSchema)` to create a new message.
 */
export const AtmosphereMessageSchema: GenMessage<AtmosphereMessage> = /*@__PURE__*/
  messageDesc(file_atmosphere, 0);

/**
 * @generated from enum org.atmosphere.grpc.MessageType
 */
export enum MessageType {
  /**
   * Client subscribes to a broadcaster topic
   *
   * @generated from enum value: SUBSCRIBE = 0;
   */
  SUBSCRIBE = 0,

  /**
   * Client unsubscribes from a broadcaster topic
   *
   * @generated from enum value: UNSUBSCRIBE = 1;
   */
  UNSUBSCRIBE = 1,

  /**
   * Regular message (client → server or server → client)
   *
   * @generated from enum value: MESSAGE = 2;
   */
  MESSAGE = 2,

  /**
   * Keepalive heartbeat
   *
   * @generated from enum value: HEARTBEAT = 3;
   */
  HEARTBEAT = 3,

  /**
   * Server acknowledgement (e.g., subscribe confirmation)
   *
   * @generated from enum value: ACK = 4;
   */
  ACK = 4,

  /**
   * Error response from server
   *
   * @generated from enum value: ERROR = 5;
   */
  ERROR = 5,
}

/**
 * Describes the enum org.atmosphere.grpc.MessageType.
 */
export const MessageTypeSchema: GenEnum<MessageType> = /*@__PURE__*/
  enumDesc(file_atmosphere, 0);

/**
 * Bidirectional streaming service for Atmosphere Framework.
 * Clients connect via a single Stream RPC and exchange AtmosphereMessages
 * to subscribe/unsubscribe to broadcasters and send/receive messages.
 *
 * @generated from service org.atmosphere.grpc.AtmosphereService
 */
export const AtmosphereService: GenService<{
  /**
   * Bidirectional streaming — client and server exchange messages (native gRPC clients)
   *
   * @generated from rpc org.atmosphere.grpc.AtmosphereService.Stream
   */
  stream: {
    methodKind: "bidi_streaming";
    input: typeof AtmosphereMessageSchema;
    output: typeof AtmosphereMessageSchema;
  },
  /**
   * Server-streaming subscribe — browser-compatible via Connect / gRPC-Web.
   * Client sends a single SUBSCRIBE message; server streams back all topic messages.
   *
   * @generated from rpc org.atmosphere.grpc.AtmosphereService.Subscribe
   */
  subscribe: {
    methodKind: "server_streaming";
    input: typeof AtmosphereMessageSchema;
    output: typeof AtmosphereMessageSchema;
  },
  /**
   * Unary send — browser-compatible via Connect / gRPC-Web.
   * Client sends a MESSAGE; server returns an ACK.
   *
   * @generated from rpc org.atmosphere.grpc.AtmosphereService.Send
   */
  send: {
    methodKind: "unary";
    input: typeof AtmosphereMessageSchema;
    output: typeof AtmosphereMessageSchema;
  },
}> = /*@__PURE__*/
  serviceDesc(file_atmosphere, 0);

