syntax = "proto3";

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

import "wix/api/validations.proto";
import "wix/api/annotations.proto";

message MultilineAddressValidation {
    option (.wix.api.decomposite_of) = "wix.forms.v4.MultilineAddressValidation";
  // Allowed countries. No countries treated as all.
  repeated string allowed_countries = 1 [(.wix.api.format) = COUNTRY, (.wix.api.minSize) = 0, (.wix.api.maxSize) = 200];
  // Fields overrides.
  FieldsOverrides fields = 2;

  message FieldsOverrides {
        option (.wix.api.decomposite_of) = "wix.forms.v4.MultilineAddressValidation.FieldsOverrides";
    reserved 1;
    // Subdivision.
    FieldOverrides subdivision = 2;
    // City.
    FieldOverrides city = 3;
    // Postal code.
    FieldOverrides postal_code = 4;
    // Street name.
    FieldOverrides street_name = 5;
    // Street number.
    FieldOverrides street_number = 6;
    // Address line.
    FieldOverrides address_line = 7;
    // Address line 2.
    FieldOverrides address_line_2 = 8;
    // Country.
    FieldOverrides country = 9;
  }

  message FieldOverrides {
        option (.wix.api.decomposite_of) = "wix.forms.v4.MultilineAddressValidation.FieldOverrides";
    // Whether the field is required.
    bool required = 1;
  }
}
