REST Resource: attributes
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
方法 |
|
返回可用属性的列表,这些属性适用于具有指定主要类别和国家/地区的营业地点。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003e\u003cstrong\u003eAttributeMetadata\u003c/strong\u003e provides display information for attributes, such as localized names and grouping headings, including details like value type, whether it's repeatable, and supported values.\u003c/p\u003e\n"],["\u003cp\u003e\u003cstrong\u003eAttributeValueMetadata\u003c/strong\u003e offers metadata for supported attribute values, including the value itself and its localized display name, meant to be used in conjunction with the attribute display name.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eattributes\u003c/code\u003e resource allows you to list available attributes based on a location's primary category and country using the \u003ccode\u003elist\u003c/code\u003e method.\u003c/p\u003e\n"]]],[],null,["# REST Resource: attributes\n\n- [Resource: AttributeMetadata](#AttributeMetadata)\n - [JSON representation](#AttributeMetadata.SCHEMA_REPRESENTATION)\n- [AttributeValueMetadata](#AttributeValueMetadata)\n - [JSON representation](#AttributeValueMetadata.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: AttributeMetadata\n---------------------------\n\nMetadata for an attribute. Contains display information for the attribute, including a localized name and a heading for grouping related attributes together.\n\n| JSON representation ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"attributeId\": string, \"valueType\": enum (/my-business/reference/rest/v4/AttributeValueType), \"displayName\": string, \"groupDisplayName\": string, \"isRepeatable\": boolean, \"valueMetadata\": [ { object (/my-business/reference/rest/v4/attributes#AttributeValueMetadata) } ], \"isDeprecated\": boolean } ``` |\n\n| Fields ||\n|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `attributeId` | `string` The ID of the attribute. |\n| `valueType` | `enum (`[AttributeValueType](/my-business/reference/rest/v4/AttributeValueType)`)` The value type for the attribute. Values set and retrieved should be expected to be of this type. |\n| `displayName` | `string` The localized display name for the attribute, if available; otherwise, the English display name. |\n| `groupDisplayName` | `string` The localized display name of the group that contains this attribute, if available; otherwise, the English group name. Related attributes are collected into a group and should be displayed together under the heading given here. |\n| `isRepeatable` | `boolean` If true, the attribute supports multiple values. If false, only a single value should be provided. |\n| `valueMetadata[]` | `object (`[AttributeValueMetadata](/my-business/reference/rest/v4/attributes#AttributeValueMetadata)`)` For some types of attributes (for example, enums), a list of supported values and corresponding display names for those values is provided. |\n| `isDeprecated` | `boolean` If true, the attribute is deprecated and should no longer be used. If deprecated, updating this attribute will not result in an error, but updates will not be saved. At some point after being deprecated, the attribute will be removed entirely and it will become an error. |\n\nAttributeValueMetadata\n----------------------\n\nMetadata for supported attribute values.\n\n| JSON representation ||\n|---------------------------------------------------|---|\n| ``` { \"value\": value, \"displayName\": string } ``` |\n\n| Fields ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `value` | `value (`[Value](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value)` format)` The attribute value. |\n| `displayName` | `string` The display name for this value, localized where available; otherwise, in English. The value display name is intended to be used in context with the attribute display name. For example, for a \"WiFi\" enum attribute, this could contain \"Paid\" to represent paid Wi-Fi. |\n\n| Methods ------- ||\n|------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|\n| ### [list](/my-business/reference/rest/v4/attributes/list) | Returns the list of available attributes that would be available for a location with the given primary category and country. |"]]