Gender in PeopleApi has some odd semantics about writing and reading that are not obvious from the proto definition. First, the type string, when read, always maps to the constrained domain of "male", "female", and "other", aside from a pathological case that PeopleApi would like to fix. There are two typical patterns: 1. type is either "male" or "female" and custom_type and address_me_as are exactly as specified by an update to PeopleApi, although they are most often absent for "male" and "female" writes. 2. type is "other" and custom_type is set to a freeform string from the request. address_me_as is equal to whatever was provided at write time. When writing, the free-form string for custom_type can come from either custom_type if the field is present on the request, or if custom_type is absent, the string value of type will be copied into it. Any value in type will be coerced to "other" and the free-form value will be copied into custom_type, even if type is exactly "other". Prefer to explicitly set custom_type and set type to "other" instead of setting type to a free-form value. There are weird edge cases when the value is "unknown". Consider the behavior for type == "unknown" unspecified. Clients reading the gender should use the value from formatted_type if type is "male" or "female". If type is "other", formatted_type will be "Other" (or some translation) and clients should read custom_type for more specificity.
SEO Analysis
AI Generated
Backend infrastructure with indirect SEO impact. This model (Apps People Oz External Mergedpeopleapi Gender) contains 5 attributes that define its data structure. Key functionality includes: Preferred pronoun choice. It's unclear whether this value is constrained to a finite domain by UIs. address_me_as may be populated regardless of wheth...
Actionable Insights for SEOs
Understanding this model helps SEOs grasp Google's internal data architecture
Attributes
5
Sort:|Filter:
addressMeAsstring
Default: nilFull type: String.t
Preferred pronoun choice. It's unclear whether this value is constrained to a finite domain by UIs. address_me_as may be populated regardless of whether type is "male", "female", or "other", although most writers only set it if type is "other".
customTypestring
Default: nilFull type: String.t
A free-form string indicating what the user entered as their gender. custom_type may exist even if the type is "male" or "female", although most writers do not set it unless type is "other".
formattedTypestring
Default: nilFull type: String.t
The type translated and formatted in the request locale. See go/people-api-howto/localization for details on how to usage.