// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=none"
// @generated from file svc/query/v1/service.proto (package svc.query.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Duration, Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf";
import { LogQuery } from "../../../types/v1/logquery_pb";
import { LogEventGroup } from "../../../types/v1/logevent_pb";
import { DataStreamType } from "../../../types/v1/types_pb";
import { Cursor } from "../../../types/v1/cursor_pb";
import { Data } from "../../../types/v1/query_pb";
import { Symbol } from "../../../types/v1/symbol_pb";

/**
 * @generated from message svc.query.v1.SummarizeEventsRequest
 */
export class SummarizeEventsRequest extends Message<SummarizeEventsRequest> {
  /**
   * @generated from field: int64 environment_id = 1;
   */
  environmentId = protoInt64.zero;

  /**
   * @generated from field: optional google.protobuf.Timestamp from = 2;
   */
  from?: Timestamp;

  /**
   * @generated from field: optional google.protobuf.Timestamp to = 3;
   */
  to?: Timestamp;

  /**
   * @generated from field: uint32 bucket_count = 4;
   */
  bucketCount = 0;

  constructor(data?: PartialMessage<SummarizeEventsRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.SummarizeEventsRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "environment_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 2, name: "from", kind: "message", T: Timestamp, opt: true },
    { no: 3, name: "to", kind: "message", T: Timestamp, opt: true },
    { no: 4, name: "bucket_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SummarizeEventsRequest {
    return new SummarizeEventsRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SummarizeEventsRequest {
    return new SummarizeEventsRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SummarizeEventsRequest {
    return new SummarizeEventsRequest().fromJsonString(jsonString, options);
  }

  static equals(a: SummarizeEventsRequest | PlainMessage<SummarizeEventsRequest> | undefined, b: SummarizeEventsRequest | PlainMessage<SummarizeEventsRequest> | undefined): boolean {
    return proto3.util.equals(SummarizeEventsRequest, a, b);
  }
}

/**
 * @generated from message svc.query.v1.SummarizeEventsResponse
 */
export class SummarizeEventsResponse extends Message<SummarizeEventsResponse> {
  /**
   * @generated from field: google.protobuf.Duration bucket_width = 1;
   */
  bucketWidth?: Duration;

  /**
   * @generated from field: repeated svc.query.v1.SummarizeEventsResponse.Bucket buckets = 2;
   */
  buckets: SummarizeEventsResponse_Bucket[] = [];

  constructor(data?: PartialMessage<SummarizeEventsResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.SummarizeEventsResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "bucket_width", kind: "message", T: Duration },
    { no: 2, name: "buckets", kind: "message", T: SummarizeEventsResponse_Bucket, repeated: true },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SummarizeEventsResponse {
    return new SummarizeEventsResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SummarizeEventsResponse {
    return new SummarizeEventsResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SummarizeEventsResponse {
    return new SummarizeEventsResponse().fromJsonString(jsonString, options);
  }

  static equals(a: SummarizeEventsResponse | PlainMessage<SummarizeEventsResponse> | undefined, b: SummarizeEventsResponse | PlainMessage<SummarizeEventsResponse> | undefined): boolean {
    return proto3.util.equals(SummarizeEventsResponse, a, b);
  }
}

/**
 * @generated from message svc.query.v1.SummarizeEventsResponse.Bucket
 */
export class SummarizeEventsResponse_Bucket extends Message<SummarizeEventsResponse_Bucket> {
  /**
   * @generated from field: google.protobuf.Timestamp ts = 1;
   */
  ts?: Timestamp;

  /**
   * @generated from field: uint64 event_count = 2;
   */
  eventCount = protoInt64.zero;

  constructor(data?: PartialMessage<SummarizeEventsResponse_Bucket>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.SummarizeEventsResponse.Bucket";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "ts", kind: "message", T: Timestamp },
    { no: 2, name: "event_count", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SummarizeEventsResponse_Bucket {
    return new SummarizeEventsResponse_Bucket().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SummarizeEventsResponse_Bucket {
    return new SummarizeEventsResponse_Bucket().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SummarizeEventsResponse_Bucket {
    return new SummarizeEventsResponse_Bucket().fromJsonString(jsonString, options);
  }

  static equals(a: SummarizeEventsResponse_Bucket | PlainMessage<SummarizeEventsResponse_Bucket> | undefined, b: SummarizeEventsResponse_Bucket | PlainMessage<SummarizeEventsResponse_Bucket> | undefined): boolean {
    return proto3.util.equals(SummarizeEventsResponse_Bucket, a, b);
  }
}

/**
 * @generated from message svc.query.v1.WatchQueryRequest
 */
export class WatchQueryRequest extends Message<WatchQueryRequest> {
  /**
   * @generated from field: int64 environment_id = 1;
   */
  environmentId = protoInt64.zero;

  /**
   * @generated from field: types.v1.LogQuery query = 2;
   */
  query?: LogQuery;

  /**
   * @generated from field: svc.query.v1.WatchQueryRequest.UnstablePlaintext plaintext_query = 201;
   */
  plaintextQuery?: WatchQueryRequest_UnstablePlaintext;

  constructor(data?: PartialMessage<WatchQueryRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.WatchQueryRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "environment_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 2, name: "query", kind: "message", T: LogQuery },
    { no: 201, name: "plaintext_query", kind: "message", T: WatchQueryRequest_UnstablePlaintext },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WatchQueryRequest {
    return new WatchQueryRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WatchQueryRequest {
    return new WatchQueryRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WatchQueryRequest {
    return new WatchQueryRequest().fromJsonString(jsonString, options);
  }

  static equals(a: WatchQueryRequest | PlainMessage<WatchQueryRequest> | undefined, b: WatchQueryRequest | PlainMessage<WatchQueryRequest> | undefined): boolean {
    return proto3.util.equals(WatchQueryRequest, a, b);
  }
}

/**
 * @generated from message svc.query.v1.WatchQueryRequest.UnstablePlaintext
 */
export class WatchQueryRequest_UnstablePlaintext extends Message<WatchQueryRequest_UnstablePlaintext> {
  /**
   * @generated from field: google.protobuf.Timestamp from = 1;
   */
  from?: Timestamp;

  /**
   * @generated from field: google.protobuf.Timestamp to = 2;
   */
  to?: Timestamp;

  /**
   * @generated from field: string query = 3;
   */
  query = "";

  constructor(data?: PartialMessage<WatchQueryRequest_UnstablePlaintext>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.WatchQueryRequest.UnstablePlaintext";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "from", kind: "message", T: Timestamp },
    { no: 2, name: "to", kind: "message", T: Timestamp },
    { no: 3, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WatchQueryRequest_UnstablePlaintext {
    return new WatchQueryRequest_UnstablePlaintext().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WatchQueryRequest_UnstablePlaintext {
    return new WatchQueryRequest_UnstablePlaintext().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WatchQueryRequest_UnstablePlaintext {
    return new WatchQueryRequest_UnstablePlaintext().fromJsonString(jsonString, options);
  }

  static equals(a: WatchQueryRequest_UnstablePlaintext | PlainMessage<WatchQueryRequest_UnstablePlaintext> | undefined, b: WatchQueryRequest_UnstablePlaintext | PlainMessage<WatchQueryRequest_UnstablePlaintext> | undefined): boolean {
    return proto3.util.equals(WatchQueryRequest_UnstablePlaintext, a, b);
  }
}

/**
 * @generated from message svc.query.v1.WatchQueryResponse
 */
export class WatchQueryResponse extends Message<WatchQueryResponse> {
  /**
   * @generated from field: repeated types.v1.LogEventGroup events = 1;
   */
  events: LogEventGroup[] = [];

  constructor(data?: PartialMessage<WatchQueryResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.WatchQueryResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "events", kind: "message", T: LogEventGroup, repeated: true },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WatchQueryResponse {
    return new WatchQueryResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WatchQueryResponse {
    return new WatchQueryResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WatchQueryResponse {
    return new WatchQueryResponse().fromJsonString(jsonString, options);
  }

  static equals(a: WatchQueryResponse | PlainMessage<WatchQueryResponse> | undefined, b: WatchQueryResponse | PlainMessage<WatchQueryResponse> | undefined): boolean {
    return proto3.util.equals(WatchQueryResponse, a, b);
  }
}

/**
 * @generated from message svc.query.v1.ParseRequest
 */
export class ParseRequest extends Message<ParseRequest> {
  /**
   * @generated from field: string query = 1;
   */
  query = "";

  constructor(data?: PartialMessage<ParseRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.ParseRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ParseRequest {
    return new ParseRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ParseRequest {
    return new ParseRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ParseRequest {
    return new ParseRequest().fromJsonString(jsonString, options);
  }

  static equals(a: ParseRequest | PlainMessage<ParseRequest> | undefined, b: ParseRequest | PlainMessage<ParseRequest> | undefined): boolean {
    return proto3.util.equals(ParseRequest, a, b);
  }
}

/**
 * @generated from message svc.query.v1.ParseResponse
 */
export class ParseResponse extends Message<ParseResponse> {
  /**
   * @generated from field: types.v1.LogQuery query = 1;
   */
  query?: LogQuery;

  /**
   * @generated from field: types.v1.DataStreamType data_type = 2;
   */
  dataType?: DataStreamType;

  constructor(data?: PartialMessage<ParseResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.ParseResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "query", kind: "message", T: LogQuery },
    { no: 2, name: "data_type", kind: "message", T: DataStreamType },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ParseResponse {
    return new ParseResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ParseResponse {
    return new ParseResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ParseResponse {
    return new ParseResponse().fromJsonString(jsonString, options);
  }

  static equals(a: ParseResponse | PlainMessage<ParseResponse> | undefined, b: ParseResponse | PlainMessage<ParseResponse> | undefined): boolean {
    return proto3.util.equals(ParseResponse, a, b);
  }
}

/**
 * @generated from message svc.query.v1.QueryRequest
 */
export class QueryRequest extends Message<QueryRequest> {
  /**
   * @generated from field: int64 environment_id = 101;
   */
  environmentId = protoInt64.zero;

  /**
   * @generated from field: types.v1.Cursor cursor = 102;
   */
  cursor?: Cursor;

  /**
   * @generated from field: int32 limit = 103;
   */
  limit = 0;

  /**
   * @generated from field: types.v1.LogQuery query = 2;
   */
  query?: LogQuery;

  constructor(data?: PartialMessage<QueryRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.QueryRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 101, name: "environment_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 102, name: "cursor", kind: "message", T: Cursor },
    { no: 103, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 2, name: "query", kind: "message", T: LogQuery },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryRequest {
    return new QueryRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryRequest {
    return new QueryRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryRequest {
    return new QueryRequest().fromJsonString(jsonString, options);
  }

  static equals(a: QueryRequest | PlainMessage<QueryRequest> | undefined, b: QueryRequest | PlainMessage<QueryRequest> | undefined): boolean {
    return proto3.util.equals(QueryRequest, a, b);
  }
}

/**
 * @generated from message svc.query.v1.QueryResponse
 */
export class QueryResponse extends Message<QueryResponse> {
  /**
   * @generated from field: types.v1.Cursor next = 100;
   */
  next?: Cursor;

  /**
   * @generated from field: types.v1.Data data = 200;
   */
  data?: Data;

  constructor(data?: PartialMessage<QueryResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.QueryResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 100, name: "next", kind: "message", T: Cursor },
    { no: 200, name: "data", kind: "message", T: Data },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryResponse {
    return new QueryResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryResponse {
    return new QueryResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryResponse {
    return new QueryResponse().fromJsonString(jsonString, options);
  }

  static equals(a: QueryResponse | PlainMessage<QueryResponse> | undefined, b: QueryResponse | PlainMessage<QueryResponse> | undefined): boolean {
    return proto3.util.equals(QueryResponse, a, b);
  }
}

/**
 * @generated from message svc.query.v1.ListSymbolsRequest
 */
export class ListSymbolsRequest extends Message<ListSymbolsRequest> {
  /**
   * @generated from field: int64 environment_id = 101;
   */
  environmentId = protoInt64.zero;

  /**
   * @generated from field: types.v1.Cursor cursor = 102;
   */
  cursor?: Cursor;

  /**
   * @generated from field: int32 limit = 103;
   */
  limit = 0;

  constructor(data?: PartialMessage<ListSymbolsRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.ListSymbolsRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 101, name: "environment_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 102, name: "cursor", kind: "message", T: Cursor },
    { no: 103, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListSymbolsRequest {
    return new ListSymbolsRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListSymbolsRequest {
    return new ListSymbolsRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListSymbolsRequest {
    return new ListSymbolsRequest().fromJsonString(jsonString, options);
  }

  static equals(a: ListSymbolsRequest | PlainMessage<ListSymbolsRequest> | undefined, b: ListSymbolsRequest | PlainMessage<ListSymbolsRequest> | undefined): boolean {
    return proto3.util.equals(ListSymbolsRequest, a, b);
  }
}

/**
 * @generated from message svc.query.v1.ListSymbolsResponse
 */
export class ListSymbolsResponse extends Message<ListSymbolsResponse> {
  /**
   * @generated from field: types.v1.Cursor next = 100;
   */
  next?: Cursor;

  /**
   * @generated from field: repeated svc.query.v1.ListSymbolsResponse.ListItem items = 200;
   */
  items: ListSymbolsResponse_ListItem[] = [];

  constructor(data?: PartialMessage<ListSymbolsResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.ListSymbolsResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 100, name: "next", kind: "message", T: Cursor },
    { no: 200, name: "items", kind: "message", T: ListSymbolsResponse_ListItem, repeated: true },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListSymbolsResponse {
    return new ListSymbolsResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListSymbolsResponse {
    return new ListSymbolsResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListSymbolsResponse {
    return new ListSymbolsResponse().fromJsonString(jsonString, options);
  }

  static equals(a: ListSymbolsResponse | PlainMessage<ListSymbolsResponse> | undefined, b: ListSymbolsResponse | PlainMessage<ListSymbolsResponse> | undefined): boolean {
    return proto3.util.equals(ListSymbolsResponse, a, b);
  }
}

/**
 * @generated from message svc.query.v1.ListSymbolsResponse.ListItem
 */
export class ListSymbolsResponse_ListItem extends Message<ListSymbolsResponse_ListItem> {
  /**
   * @generated from field: types.v1.Symbol symbol = 2;
   */
  symbol?: Symbol;

  constructor(data?: PartialMessage<ListSymbolsResponse_ListItem>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.query.v1.ListSymbolsResponse.ListItem";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 2, name: "symbol", kind: "message", T: Symbol },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListSymbolsResponse_ListItem {
    return new ListSymbolsResponse_ListItem().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListSymbolsResponse_ListItem {
    return new ListSymbolsResponse_ListItem().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListSymbolsResponse_ListItem {
    return new ListSymbolsResponse_ListItem().fromJsonString(jsonString, options);
  }

  static equals(a: ListSymbolsResponse_ListItem | PlainMessage<ListSymbolsResponse_ListItem> | undefined, b: ListSymbolsResponse_ListItem | PlainMessage<ListSymbolsResponse_ListItem> | undefined): boolean {
    return proto3.util.equals(ListSymbolsResponse_ListItem, a, b);
  }
}

