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

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { NamedNscCredentials, NscPermission } from "./nsc-base_pb.js";
import { NatsCredentials } from "./shared_pb.js";

/**
 * @generated from message api.CreateUserRequest
 */
export class CreateUserRequest extends Message<CreateUserRequest> {
  /**
   * @generated from field: string accountName = 1;
   */
  accountName = "";

  /**
   * @generated from field: string name = 2;
   */
  name = "";

  /**
   * @generated from field: api.NscPermission permission = 3;
   */
  permission?: NscPermission;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.CreateUserRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "accountName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "permission", kind: "message", T: NscPermission },
  ]);

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

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

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

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

/**
 * @generated from message api.CreateUserResult
 */
export class CreateUserResult extends Message<CreateUserResult> {
  /**
   * NatsCredentials holds the configuration for interacting with Platform's NATS
   *
   * @generated from field: api.NatsCredentials Credentials = 1;
   */
  Credentials?: NatsCredentials;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.CreateUserResult";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Credentials", kind: "message", T: NatsCredentials },
  ]);

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

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

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

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

/**
 * @generated from message api.GetUserRequest
 */
export class GetUserRequest extends Message<GetUserRequest> {
  /**
   * @generated from field: string accountName = 1;
   */
  accountName = "";

  /**
   * @generated from field: string name = 2;
   */
  name = "";

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

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

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

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

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

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

/**
 * @generated from message api.GetUserResult
 */
export class GetUserResult extends Message<GetUserResult> {
  /**
   * @generated from field: api.NatsCredentials Credentials = 1;
   */
  Credentials?: NatsCredentials;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.GetUserResult";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Credentials", kind: "message", T: NatsCredentials },
  ]);

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

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

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

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

/**
 * @generated from message api.ListUsersRequest
 */
export class ListUsersRequest extends Message<ListUsersRequest> {
  /**
   * @generated from field: string accountName = 1;
   */
  accountName = "";

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

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

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

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

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

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

/**
 * @generated from message api.ListUsersResult
 */
export class ListUsersResult extends Message<ListUsersResult> {
  /**
   * @generated from field: repeated api.NamedNscCredentials entities = 1;
   */
  entities: NamedNscCredentials[] = [];

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ListUsersResult";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "entities", kind: "message", T: NamedNscCredentials, repeated: true },
  ]);

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

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

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

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

/**
 * Entity edition messages 
 *
 * @generated from message api.EditUserRequest
 */
export class EditUserRequest extends Message<EditUserRequest> {
  /**
   * @generated from field: string accountName = 1;
   */
  accountName = "";

  /**
   * @generated from field: string name = 2;
   */
  name = "";

  /**
   * @generated from field: api.NscPermission permission = 3;
   */
  permission?: NscPermission;

  /**
   * @generated from field: repeated string rmPerms = 4;
   */
  rmPerms: string[] = [];

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.EditUserRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "accountName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "permission", kind: "message", T: NscPermission },
    { no: 4, name: "rmPerms", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
  ]);

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

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

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

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

/**
 * @generated from message api.EditUserResult
 */
export class EditUserResult extends Message<EditUserResult> {
  /**
   * @generated from field: api.NatsCredentials Credentials = 1;
   */
  Credentials?: NatsCredentials;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.EditUserResult";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Credentials", kind: "message", T: NatsCredentials },
  ]);

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

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

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

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

/**
 * @generated from message api.DeleteUserRequest
 */
export class DeleteUserRequest extends Message<DeleteUserRequest> {
  /**
   * @generated from field: string accountName = 1;
   */
  accountName = "";

  /**
   * @generated from field: string userName = 2;
   */
  userName = "";

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.DeleteUserRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "accountName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "userName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.DeleteUserResult";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
  ]);

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

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

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

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

