Attributes
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\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. |"]]