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

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf";
import { EnvironmentRole, EnvironmentToken } from "../../../types/v1/environment_token_pb";
import { Cursor } from "../../../types/v1/cursor_pb";

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

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

  /**
   * @generated from field: repeated types.v1.EnvironmentRole roles = 3;
   */
  roles: EnvironmentRole[] = [];

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.token.v1.GenerateEnvironmentTokenRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "environment_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 2, name: "expires_at", kind: "message", T: Timestamp },
    { no: 3, name: "roles", kind: "enum", T: proto3.getEnumType(EnvironmentRole), repeated: true },
  ]);

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

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

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

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

/**
 * @generated from message svc.token.v1.GenerateEnvironmentTokenResponse
 */
export class GenerateEnvironmentTokenResponse extends Message<GenerateEnvironmentTokenResponse> {
  /**
   * @generated from field: types.v1.EnvironmentToken token = 1;
   */
  token?: EnvironmentToken;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.token.v1.GenerateEnvironmentTokenResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "token", kind: "message", T: EnvironmentToken },
  ]);

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

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

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

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

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

  /**
   * @generated from field: int64 token_id = 2;
   */
  tokenId = protoInt64.zero;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.token.v1.RevokeEnvironmentTokenRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "environment_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 2, name: "token_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
  ]);

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

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

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

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

/**
 * @generated from message svc.token.v1.RevokeEnvironmentTokenResponse
 */
export class RevokeEnvironmentTokenResponse extends Message<RevokeEnvironmentTokenResponse> {
  constructor(data?: PartialMessage<RevokeEnvironmentTokenResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.token.v1.RevokeEnvironmentTokenResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
  ]);

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

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

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

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

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

  /**
   * @generated from field: int64 token_id = 2;
   */
  tokenId = protoInt64.zero;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.token.v1.GetEnvironmentTokenRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "environment_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 2, name: "token_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
  ]);

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

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

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

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

/**
 * @generated from message svc.token.v1.GetEnvironmentTokenResponse
 */
export class GetEnvironmentTokenResponse extends Message<GetEnvironmentTokenResponse> {
  /**
   * @generated from field: types.v1.EnvironmentToken token = 1;
   */
  token?: EnvironmentToken;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.token.v1.GetEnvironmentTokenResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "token", kind: "message", T: EnvironmentToken },
  ]);

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

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

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

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

/**
 * @generated from message svc.token.v1.ListEnvironmentTokenRequest
 */
export class ListEnvironmentTokenRequest extends Message<ListEnvironmentTokenRequest> {
  /**
   * @generated from field: types.v1.Cursor cursor = 1;
   */
  cursor?: Cursor;

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

  /**
   * @generated from field: int64 environment_id = 3;
   */
  environmentId = protoInt64.zero;

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

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

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

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

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

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

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

  /**
   * @generated from field: repeated svc.token.v1.ListEnvironmentTokenResponse.ListItem items = 2;
   */
  items: ListEnvironmentTokenResponse_ListItem[] = [];

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.token.v1.ListEnvironmentTokenResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "next", kind: "message", T: Cursor },
    { no: 2, name: "items", kind: "message", T: ListEnvironmentTokenResponse_ListItem, repeated: true },
  ]);

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

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

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

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

/**
 * @generated from message svc.token.v1.ListEnvironmentTokenResponse.ListItem
 */
export class ListEnvironmentTokenResponse_ListItem extends Message<ListEnvironmentTokenResponse_ListItem> {
  /**
   * @generated from field: types.v1.EnvironmentToken token = 1;
   */
  token?: EnvironmentToken;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.token.v1.ListEnvironmentTokenResponse.ListItem";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "token", kind: "message", T: EnvironmentToken },
  ]);

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

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

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

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

