syntax = "proto3";

package com.wixpress.appservice.api.upstream.wix.forms.templates.v2;
option java_package = "com.wixpress.appservice.api.upstream.wix.forms.templates.v2";

import "google/protobuf/wrappers.proto";
import "wix/api/validations.proto";
import "wix/api/annotations.proto";
import "wix/rich_content/v1/rich_content.proto";
import "components_catalog_data/form_template/com/wixpress/appservice/api/upstream/wix/forms/templates/v2/display_field.proto";
import "components_catalog_data/form_template/com/wixpress/appservice/api/upstream/wix/forms/templates/v2/input_field.proto";

message Field {
    option (.wix.api.decomposite_of) = "wix.forms.v4.fields.Field";
  // Field id.
  string id = 1 [(.wix.api.format) = GUID, (.wix.api.immutable) = true];
  // Whether the field is hidden.
  // Default: false
  bool hidden = 2;
  // Custom identification of field, can be used to specify exceptional behaviour of client for specific field
  google.protobuf.StringValue identifier = 3 [(.wix.api.maxLength) = 50];
  // Type of the field
  FieldType field_type = 4 [(.wix.api.readOnly) = true];

  oneof field_type_options {
    option (.wix.api.aligned_with_enum).field = "field_type";
    // Field accept input of data
    InputField input_options = 5;
    // Field for displaying information such as header or text paragraph
    DisplayField display_options = 6;
  }

  enum FieldType {
    UNKNOWN_FIELD_TYPE = 0;
    INPUT = 1;
    DISPLAY = 2;
  }
}
