// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file user-groups.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 { RequestProjectHeader } from "./shared_pb.js";

/**
 * @generated from enum api.EntityRefType
 */
export enum EntityRefType {
  /**
   * @generated from enum value: REF_TYPE_UNKNOWN = 0;
   */
  REF_TYPE_UNKNOWN = 0,

  /**
   * @generated from enum value: REF_TYPE_PARTNER = 1;
   */
  REF_TYPE_PARTNER = 1,
}
// Retrieve enum metadata with: proto3.getEnumType(EntityRefType)
proto3.util.setEnumType(EntityRefType, "api.EntityRefType", [
  { no: 0, name: "REF_TYPE_UNKNOWN" },
  { no: 1, name: "REF_TYPE_PARTNER" },
]);

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

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

  /**
   * @generated from field: api.EntityRefType EntityRefType = 3;
   */
  EntityRefType = EntityRefType.REF_TYPE_UNKNOWN;

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

  /**
   * if true, AllowedRoles is ignored
   *
   * @generated from field: bool AllowAllRoles = 5;
   */
  AllowAllRoles = false;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.UserGroup";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "ProjectID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "EntityRefID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "EntityRefType", kind: "enum", T: proto3.getEnumType(EntityRefType) },
    { no: 4, name: "AllowedRoles", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 5, name: "AllowAllRoles", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
  ]);

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

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

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

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

/**
 * @generated from message api.PutUserGroupsRequest
 */
export class PutUserGroupsRequest extends Message<PutUserGroupsRequest> {
  /**
   * @generated from field: api.RequestProjectHeader Header = 1;
   */
  Header?: RequestProjectHeader;

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

  /**
   * @generated from field: api.EntityRefType EntityRefType = 3;
   */
  EntityRefType = EntityRefType.REF_TYPE_UNKNOWN;

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

  /**
   * if true, AllowedRoles is ignored
   *
   * @generated from field: bool AllowAllRoles = 5;
   */
  AllowAllRoles = false;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.PutUserGroupsRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
    { no: 2, name: "EntityRefID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "EntityRefType", kind: "enum", T: proto3.getEnumType(EntityRefType) },
    { no: 4, name: "AllowedRoles", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 5, name: "AllowAllRoles", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
  ]);

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

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

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

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

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

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

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

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

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

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

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

/**
 * @generated from message api.GetUserGroupsRequest
 */
export class GetUserGroupsRequest extends Message<GetUserGroupsRequest> {
  /**
   * @generated from field: api.RequestProjectHeader Header = 1;
   */
  Header?: RequestProjectHeader;

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

  /**
   * @generated from field: api.EntityRefType EntityRefType = 3;
   */
  EntityRefType = EntityRefType.REF_TYPE_UNKNOWN;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.GetUserGroupsRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
    { no: 2, name: "EntityRefID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "EntityRefType", kind: "enum", T: proto3.getEnumType(EntityRefType) },
  ]);

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

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

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

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

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

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

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

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

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

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

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

/**
 * @generated from message api.DeleteUserGroupsRequest
 */
export class DeleteUserGroupsRequest extends Message<DeleteUserGroupsRequest> {
  /**
   * @generated from field: api.RequestProjectHeader Header = 1;
   */
  Header?: RequestProjectHeader;

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

  /**
   * @generated from field: api.EntityRefType EntityRefType = 3;
   */
  EntityRefType = EntityRefType.REF_TYPE_UNKNOWN;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.DeleteUserGroupsRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
    { no: 2, name: "EntityRefID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "EntityRefType", kind: "enum", T: proto3.getEnumType(EntityRefType) },
  ]);

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

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

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

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

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

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

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

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

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

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

/**
 * @generated from message api.ListUserGroupsRequest
 */
export class ListUserGroupsRequest extends Message<ListUserGroupsRequest> {
  /**
   * @generated from field: api.RequestProjectHeader Header = 1;
   */
  Header?: RequestProjectHeader;

  /**
   * @generated from field: api.EntityRefType EntityRefType = 2;
   */
  EntityRefType = EntityRefType.REF_TYPE_UNKNOWN;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ListUserGroupsRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
    { no: 2, name: "EntityRefType", kind: "enum", T: proto3.getEnumType(EntityRefType) },
  ]);

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

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

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

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

/**
 * @generated from message api.ListUserGroupsResult
 */
export class ListUserGroupsResult extends Message<ListUserGroupsResult> {
  /**
   * @generated from field: repeated api.UserGroup UserGroups = 1;
   */
  UserGroups: UserGroup[] = [];

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

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

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

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

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

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

