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

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
import { MetadataDisplayType, MetadataType } from "./metadata_pb.js";
import { RequestProjectHeader } from "./shared_pb.js";

/**
 * @generated from message api.PrjMetadata
 */
export class PrjMetadata extends Message<PrjMetadata> {
  /**
   * The segmentation keys are used to complete the segmentation criteria of the project stock. They also apply to order lines and stock movements
   *
   * @generated from field: bool IsSegmentationKey = 2;
   */
  IsSegmentationKey = false;

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

  /**
   * Entity where the metadata will be created. It can be \"executionflow\", \"handlingunit\", \"item\", \"order\", \"stock\"
   *
   * @generated from field: string Entity = 4;
   */
  Entity = "";

  /**
   * Where the metadata is located, either \"Payload.Metadata\" or \"Payload.Goods.SegmentationKeys\"
   *
   * @generated from field: string Parent = 5;
   */
  Parent = "";

  /**
   * @generated from field: string Name = 6;
   */
  Name = "";

  /**
   * Type attached to the metadata, can be anything such as Item, Actor, Order...
   *
   * @generated from field: string Type = 7;
   */
  Type = "";

  /**
   * @generated from field: bool IsMandatory = 8;
   */
  IsMandatory = false;

  /**
   * @generated from field: string Example = 9;
   */
  Example = "";

  /**
   * @generated from field: string RegularExpression = 10;
   */
  RegularExpression = "";

  /**
   * @generated from field: api.MetadataType Typology = 11;
   */
  Typology = MetadataType.TYPE_UNKNOWN;

  /**
   * Customizable enumeration
   *
   * @generated from field: repeated string Enumeration = 12;
   */
  Enumeration: string[] = [];

  /**
   * @generated from field: api.MetadataDisplayType ShowOnCreation = 13;
   */
  ShowOnCreation = MetadataDisplayType.DISPLAY_UNKNOWN;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.PrjMetadata";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 2, name: "IsSegmentationKey", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
    { no: 3, name: "Domain", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "Entity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "Parent", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 6, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 7, name: "Type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 8, name: "IsMandatory", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
    { no: 9, name: "Example", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 10, name: "RegularExpression", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 11, name: "Typology", kind: "enum", T: proto3.getEnumType(MetadataType) },
    { no: 12, name: "Enumeration", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 13, name: "ShowOnCreation", kind: "enum", T: proto3.getEnumType(MetadataDisplayType) },
  ]);

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

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

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

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

/**
 * @generated from message api.PrjMetadataTransitive
 */
export class PrjMetadataTransitive extends Message<PrjMetadataTransitive> {
  /**
   * Where the metadata is located, either \"Payload.Metadata\" or \"Payload.Goods.SegmentationKeys\"
   *
   * @generated from field: string Parent = 1;
   */
  Parent = "";

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

  /**
   * The segmentation keys are used to complete the segmentation criteria of the project stock. They also apply to order lines and stock movements
   *
   * @generated from field: bool IsSegmentationKey = 3;
   */
  IsSegmentationKey = false;

  /**
   * Type attached to the metadata, can be anything such as Item, Actor, Order...
   *
   * @generated from field: string Type = 4;
   */
  Type = "";

  /**
   * @generated from field: bool IsMandatory = 5;
   */
  IsMandatory = false;

  /**
   * @generated from field: string Example = 6;
   */
  Example = "";

  /**
   * @generated from field: string RegularExpression = 7;
   */
  RegularExpression = "";

  /**
   * Customizable enumeration
   *
   * @generated from field: repeated string Enumeration = 8;
   */
  Enumeration: string[] = [];

  /**
   * @generated from field: api.MetadataDisplayType ShowOnCreation = 9;
   */
  ShowOnCreation = MetadataDisplayType.DISPLAY_UNKNOWN;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.PrjMetadataTransitive";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Parent", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "IsSegmentationKey", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
    { no: 4, name: "Type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "IsMandatory", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
    { no: 6, name: "Example", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 7, name: "RegularExpression", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 8, name: "Enumeration", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 9, name: "ShowOnCreation", kind: "enum", T: proto3.getEnumType(MetadataDisplayType) },
  ]);

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

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

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

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

/**
 * @generated from message api.PrjMetadataFilters
 */
export class PrjMetadataFilters extends Message<PrjMetadataFilters> {
  /**
   * @generated from field: string Domain = 2;
   */
  Domain = "";

  /**
   * Entity where the metadata will be created. It can be \"executionflow\", \"handlingunit\", \"item\", \"order\", \"stock\"
   *
   * @generated from field: string Entity = 3;
   */
  Entity = "";

  /**
   * The segmentation keys are used to complete the segmentation criteria of the project stock. They also apply to order lines and stock movements
   *
   * @generated from field: bool IsSegmentationKey = 4;
   */
  IsSegmentationKey = false;

  /**
   * Where the metadata is located, either \"Payload.Metadata\" or \"Payload.Goods.SegmentationKeys\"
   *
   * @generated from field: string Parent = 5;
   */
  Parent = "";

  /**
   * @generated from field: string Name = 6;
   */
  Name = "";

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.PrjMetadataFilters";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 2, name: "Domain", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "Entity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "IsSegmentationKey", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
    { no: 5, name: "Parent", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 6, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

/**
 * @generated from message api.PrjMetadatasByDomain
 */
export class PrjMetadatasByDomain extends Message<PrjMetadatasByDomain> {
  /**
   * @generated from field: map<string, int64> Entities = 1;
   */
  Entities: { [key: string]: bigint } = {};

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.PrjMetadatasByDomain";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Entities", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 3 /* ScalarType.INT64 */} },
    { no: 2, name: "Total", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
  ]);

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

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

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

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

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

  /**
   * Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)
   *
   * @generated from field: api.PrjMetadata Metadata = 1;
   */
  Metadata?: PrjMetadata;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /**
   * Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)
   *
   * @generated from field: api.PrjMetadata Metadata = 1;
   */
  Metadata?: PrjMetadata;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /**
   * @generated from field: api.PrjMetadataFilters Filters = 1;
   */
  Filters?: PrjMetadataFilters;

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

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

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

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

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

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

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

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

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

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

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

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

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

  /**
   * @generated from field: api.PrjMetadataFilters Filters = 1;
   */
  Filters?: PrjMetadataFilters;

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

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

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

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

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

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

/**
 * @generated from message api.GetMetadatasResult
 */
export class GetMetadatasResult extends Message<GetMetadatasResult> {
  /**
   * @generated from field: repeated api.PrjMetadata Metadatas = 1;
   */
  Metadatas: PrjMetadata[] = [];

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

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

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

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

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

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

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

  /**
   * The segmentation keys are used to complete the segmentation criteria of the project stock. They also apply to order lines and stock movements
   *
   * @generated from field: bool IsSegmentationKey = 2;
   */
  IsSegmentationKey = false;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.GetMetadataCountRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 3, name: "Header", kind: "message", T: RequestProjectHeader },
    { no: 2, name: "IsSegmentationKey", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
  ]);

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

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

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

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

/**
 * @generated from message api.GetMetadataCountResult
 */
export class GetMetadataCountResult extends Message<GetMetadataCountResult> {
  /**
   * @generated from field: map<string, api.PrjMetadatasByDomain> Domains = 1;
   */
  Domains: { [key: string]: PrjMetadatasByDomain } = {};

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.GetMetadataCountResult";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Domains", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: PrjMetadatasByDomain} },
    { no: 2, name: "Total", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
  ]);

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

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

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

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

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

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

  /**
   * Entity where the metadata will be created. It can be \"executionflow\", \"handlingunit\", \"item\", \"order\", \"stock\"
   *
   * @generated from field: string Entity = 3;
   */
  Entity = "";

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.GetTransitiveMetadatasRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 4, name: "Header", kind: "message", T: RequestProjectHeader },
    { no: 2, name: "Domain", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "Entity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

/**
 * @generated from message api.GetTransitiveMetadatasResult
 */
export class GetTransitiveMetadatasResult extends Message<GetTransitiveMetadatasResult> {
  /**
   * @generated from field: repeated api.PrjMetadataTransitive MetadataTransitive = 1;
   */
  MetadataTransitive: PrjMetadataTransitive[] = [];

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

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

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

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

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

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

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

  /**
   * @generated from field: bool AlterClickhouse = 2;
   */
  AlterClickhouse = false;

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

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

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

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

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

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

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

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

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

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

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

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

