syntax = "proto3";
package enterprise.license;

message LicenseLimits {
    uint32 users = 1;
    uint32 devices = 2;
    uint32 locations = 3;
    optional uint32 network_devices = 4;
}

enum LicenseTier {
  LICENSE_TIER_UNSPECIFIED = 0;
  LICENSE_TIER_BUSINESS = 1;
  LICENSE_TIER_ENTERPRISE = 2;
}

enum SupportType {
  SUPPORT_TYPE_UNSPECIFIED = 0;
  SUPPORT_TYPE_FREE = 1;
  SUPPORT_TYPE_BASIC = 2;
  SUPPORT_TYPE_DIRECT = 3;
  SUPPORT_TYPE_BASIC_ENTERPRISE = 4;
  SUPPORT_TYPE_DIRECT_ENTERPRISE = 5;
}

message LicenseMetadata {
    string customer_id = 1;
    bool subscription = 2;
    optional int64 valid_until = 3;
    LicenseLimits limits = 4;
    optional int64 version_date_limit = 5;
    LicenseTier tier = 6;
    SupportType support_type = 7;
}

message LicenseKey {
    bytes metadata = 1;
    bytes signature = 2;
}
