syntax = "proto3";

package wix.os.v1;
option java_package = "com.wixpress.os.v1";

import "wix/api/validations.proto";
import "wix/api/entity.proto";
import "wix/api/annotations.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";
import "wix/os/v1/tag_exposure.proto";

message Tag {
  //flynt-disable missing-app-def-id
  option (wix.api.entity) = {
    fqdn: "wix.os.tags.v1.tag"
    segment: USERS
    appendix_files: {
          type: AUTO_VELO
          path: "appendices/velo"
        }     
    domain_events: {
      deleted_include_entity: true
    }
    query_options: {
      wql: {
        pattern: {
          operator: ALL_APPLICABLE_OPERATORS
          field: "id"
          field: "created_date"
          field: "updated_date"
          field: "name"
          sort: BOTH
        }
      }
    }
  };

  // Tag ID.
  google.protobuf.StringValue id = 1 [(wix.api.readOnly) = true, (wix.api.maxLength) = 5];

  // Revision number, which increments by 1 each time the tag is updated.
  google.protobuf.Int64Value revision = 2 [(wix.api.readOnly) = true];

  // Date and time the tag was created.
  google.protobuf.Timestamp created_date = 3 [(wix.api.readOnly) = true];

  // Date and time the tag was last updated.
  google.protobuf.Timestamp updated_date = 4 [(wix.api.readOnly) = true];

  // Tag name.
  google.protobuf.StringValue name = 5 [(wix.api.maxLength) = 255];

  // FQDN of the entity that belongs to this tag.
  google.protobuf.StringValue fqdn = 6 [(wix.api.immutable) = true, (wix.api.maxLength) = 255];

  // Tag exposure.
  TagExposure exposure = 7 [(wix.api.field_exposure) = INTERNAL];

  // Indicates whether this tag is deleted.
  google.protobuf.BoolValue deleted = 8 [(.wix.api.readOnly) = true, (wix.api.field_exposure) = INTERNAL];
}
