contact_info_specifics.proto 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. // Copyright 2022 The Chromium Authors.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. // If you change or add any fields in this file, update proto_visitors.h and
  5. // potentially proto_enum_conversions.{h, cc}.
  6. syntax = "proto2";
  7. option java_multiple_files = true;
  8. option java_package = "org.chromium.components.sync.protocol";
  9. option optimize_for = LITE_RUNTIME;
  10. package sync_pb;
  11. message ContactInfoSpecifics {
  12. // Represents the validation status of a stored value.
  13. enum VerificationStatus {
  14. // No verification status assigned.
  15. VERIFICATION_STATUS_UNSPECIFIED = 0;
  16. // The value token was parsed from a parent token.
  17. // For example, the first name was derived by splitting a full name into
  18. // its components.
  19. PARSED = 1;
  20. // Value was built from its subcomponents.
  21. // For example, the full name was built from the first, middle and last
  22. // name.
  23. FORMATTED = 2;
  24. // The value was observed in a form transmission.
  25. // For example, the user filled a form that contained at NAME_FULL field.
  26. // The value of NAME_FULL will be stored as OBSERVED.
  27. OBSERVED = 3;
  28. // The user used the settings UI to verify and store this token.
  29. // This is currently only applicable to the full name, since users cannot
  30. // edit individual components of their name.
  31. USER_VERIFIED = 4;
  32. // The token was parsed remotely.
  33. SERVER_PARSED = 5;
  34. }
  35. // Metadata that is attached to every token type.
  36. message TokenMetadata {
  37. optional VerificationStatus status = 1;
  38. }
  39. // A token with a string interpretation of the value.
  40. message StringToken {
  41. optional string value = 1;
  42. optional TokenMetadata metadata = 2;
  43. }
  44. // A token with an integer interpretation of the value.
  45. message IntegerToken {
  46. optional int64 value = 1;
  47. optional TokenMetadata metadata = 2;
  48. }
  49. // A globally unique, immutable UUID represented in lowercase.
  50. optional string guid = 1;
  51. // Represents where the profile originated from, which can be either from the
  52. // settings or a website.
  53. // This field exists only for compatibility purposes with Autofill.
  54. optional string source = 2;
  55. // The number of time this profile has been used.
  56. optional int64 use_count = 3;
  57. // The last time this profile was used.
  58. optional int64 use_date_windows_epoch_micros = 4;
  59. // A user chosen profile label that is used to identify the profile.
  60. // The value of the label can be freely chosen by the user.
  61. optional string profile_label = 5;
  62. // Contact info name fields.
  63. optional StringToken name_honorific = 6;
  64. optional StringToken name_first = 7;
  65. optional StringToken name_middle = 8;
  66. optional StringToken name_last = 9;
  67. // Sometimes the last name is composed of two names as it is common for
  68. // Hispanic/Latinx names. In the unstructured representation of the last name,
  69. // there may be even a conjunction between the first and the second last
  70. // name. For example, the more-complete version of Pablo Picasso's surname is
  71. // "Ruiz y Picasso" containing a first last name, a conjunction (the y) and a
  72. // second last name.
  73. optional StringToken name_last_first = 10;
  74. optional StringToken name_last_conjunction = 11;
  75. optional StringToken name_last_second = 12;
  76. optional StringToken name_full = 13;
  77. // This value contains the combination of the full name and the honorific
  78. // prefix.
  79. optional StringToken name_full_with_honorific = 14;
  80. // Contact info additional fields.
  81. optional StringToken email_address = 15;
  82. optional StringToken company_name = 16;
  83. // Address fields: These are user-provided values with no particular
  84. // guarantees about their format.
  85. optional StringToken address_city = 17;
  86. optional StringToken address_state = 18;
  87. optional StringToken address_zip = 19;
  88. optional StringToken address_country = 20;
  89. // Additional address fields for i18n.
  90. // Includes all of the lines of a street address, including newlines, e.g.
  91. // 123 Main Street,
  92. // Apt. #42
  93. optional StringToken address_street_address = 21;
  94. // A sorting code is similar to a postal code. However, whereas a postal code
  95. // normally refers to a single geographical location, a sorting code often
  96. // does not. Instead, a sorting code is assigned to an organization, which
  97. // might be geographically distributed. The most prominent example of a
  98. // sorting code system is CEDEX in France.
  99. optional StringToken address_sorting_code = 22;
  100. // A dependent locality is a subunit of a locality, where a "locality" is
  101. // roughly equivalent to a city. Examples of dependent localities include
  102. // inner-city districts and suburbs.
  103. optional StringToken address_dependent_locality = 23;
  104. // A BCP 47 language code.
  105. optional StringToken address_language_code = 24;
  106. // The street name of the address, without a house number.
  107. optional StringToken address_thoroughfare_name = 25;
  108. // The house number, which may be alphanumeric.
  109. optional StringToken address_thoroughfare_number = 26;
  110. // Describes a crossing street as it is used in some countries to describe a
  111. // location.
  112. optional StringToken address_dependent_thoroughfare_name = 27;
  113. // Contains both the thoroughfare and the dependent thoroughfare name.
  114. optional StringToken address_thoroughfare_and_dependent_thoroughfare_name =
  115. 28;
  116. // A premise name corresponds to the name of a place or a building below the
  117. // granularity of a street.
  118. optional StringToken address_premise_name = 29;
  119. // Contains the floor, staircase or apartment number within a building.
  120. optional StringToken address_subpremise_name = 30;
  121. // The apartment number within a building.
  122. optional StringToken address_apt_num = 31;
  123. // The floor number within a building.
  124. optional StringToken address_floor = 32;
  125. // Phone.
  126. optional StringToken phone_home_whole_number = 33;
  127. // Birthdate fields.
  128. optional IntegerToken birthdate_day = 34;
  129. optional IntegerToken birthdate_month = 35; // Between 1 and 12.
  130. optional IntegerToken birthdate_year = 36; // 4 digits.
  131. }