syntax = "proto3";

// If you make any changes make sure you run: make regenerate-proto

package gitlab.agent.entity.agentw;

option go_package = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/pkg/entity/agentw";

import "buf/validate/validate.proto";

message Meta {
  // Version of the binary.
  string version = 1 [json_name = "version", (buf.validate.field).string = {max_bytes: 50}];
  // Git Reference of the binary. SHA, tag, or empty.
  string git_ref = 2 [json_name = "git_ref", (buf.validate.field).string = {max_bytes: 255}];
  // Extra telemetry data to report to GitLab.
  map<string, string> extra_telemetry_data = 3 [
    json_name = "extra_telemetry_data",
    (buf.validate.field).map.max_pairs = 8,
    (buf.validate.field).map.keys = {
      string: {
        min_len: 3
        max_len: 64
      }
    },
    (buf.validate.field).map.values = {
      string: {
        max_len: 255
      }
    }
  ];
  // Running agent's architecture target: one of 386, amd64, arm, s390x, and so on.
  string architecture = 4 [json_name = "architecture", (buf.validate.field).string = {min_bytes: 1, max_bytes: 255}];
}
