Attributes
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eLocations have attributes that provide additional information, varying by location properties like category.\u003c/p\u003e\n"],["\u003cp\u003eAttributes have a name, value type, and values which can be of type URL or REPEATED_ENUM.\u003c/p\u003e\n"],["\u003cp\u003eREPEATED_ENUM attributes have values that are either set or unset, while URL attributes have a URI value.\u003c/p\u003e\n"],["\u003cp\u003eAvailable location attributes are determined by Google and can change without API updates.\u003c/p\u003e\n"],["\u003cp\u003eAttributes only support one value, but multiple values can be provided in a repeated field.\u003c/p\u003e\n"]]],["This content outlines how to manage location attributes. Locations have a `name` and an array of `attributes`. Each `attribute` has a `name`, `valueType`, and several value fields (`values`, `repeatedEnumValue`, `uriValues`). `RepeatedEnumAttributeValue` holds `setValues` and `unsetValues` to represent true/false states. `UriAttributeValue` stores a `uri` for URL-type attributes. Attributes can include varied information and their types determine how the data is represented and interpreted.\n"],null,["# Attributes\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [Attribute](#Attribute)\n - [JSON representation](#Attribute.SCHEMA_REPRESENTATION)\n- [RepeatedEnumAttributeValue](#RepeatedEnumAttributeValue)\n - [JSON representation](#RepeatedEnumAttributeValue.SCHEMA_REPRESENTATION)\n- [UriAttributeValue](#UriAttributeValue)\n - [JSON representation](#UriAttributeValue.SCHEMA_REPRESENTATION)\n\nA container for all the attributes for a given location.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"attributes\": [ { object (/my-business/reference/businessinformation/rest/v1/Attributes#Attribute) } ] } ``` |\n\n| Fields ||\n|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. Google identifier for this location in the form of `locations/{locationId}/attributes`. |\n| `attributes[]` | `object (`[Attribute](/my-business/reference/businessinformation/rest/v1/Attributes#Attribute)`)` A collection of attributes that need to be updated. |\n\nAttribute\n---------\n\nA location attribute. Attributes provide additional information about a location. The attributes that can be set on a location may vary based on the properties of that location (for example, category). Available attributes are determined by Google and may be added and removed without API changes.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"valueType\": enum (/my-business/reference/businessinformation/rest/v1/AttributeValueType), \"values\": [ value ], \"repeatedEnumValue\": { object (/my-business/reference/businessinformation/rest/v1/Attributes#RepeatedEnumAttributeValue) }, \"uriValues\": [ { object (/my-business/reference/businessinformation/rest/v1/Attributes#UriAttributeValue) } ] } ``` |\n\n| Fields ||\n|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The resource name for this attribute. |\n| `valueType` | `enum (`[AttributeValueType](/my-business/reference/businessinformation/rest/v1/AttributeValueType)`)` Output only. The type of value that this attribute contains. This should be used to determine how to interpret the value. |\n| `values[]` | `value (`[Value](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value)` format)` The values for this attribute. The type of the values supplied must match that expected for that attribute. This is a repeated field where multiple attribute values may be provided. Attribute types only support one value. |\n| `repeatedEnumValue` | `object (`[RepeatedEnumAttributeValue](/my-business/reference/businessinformation/rest/v1/Attributes#RepeatedEnumAttributeValue)`)` When the attribute value type is REPEATED_ENUM, this contains the attribute value, and the other values fields must be empty. |\n| `uriValues[]` | `object (`[UriAttributeValue](/my-business/reference/businessinformation/rest/v1/Attributes#UriAttributeValue)`)` When the attribute value type is URL, this field contains the value(s) for this attribute, and the other values fields must be empty. |\n\nRepeatedEnumAttributeValue\n--------------------------\n\nValues for an attribute with a `valueType` of REPEATED_ENUM. This consists of two lists of value IDs: those that are set (true) and those that are unset (false). Values absent are considered unknown. At least one value must be specified.\n\n| JSON representation |\n|----------------------------------------------------------------|\n| ``` { \"setValues\": [ string ], \"unsetValues\": [ string ] } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------|\n| `setValues[]` | `string` Enum values that are set. |\n| `unsetValues[]` | `string` Enum values that are unset. |\n\nUriAttributeValue\n-----------------\n\nValues for an attribute with a `valueType` of URL.\n\n| JSON representation |\n|---------------------------|\n| ``` { \"uri\": string } ``` |\n\n| Fields ||\n|-------|---------------------------------------------------------------|\n| `uri` | `string` Required. The proposed URI value for this attribute. |"]]