Label 类
表示可具有多个本地化版本的标签。
构造函数
Label(localized_labels: List[LocalizedLabel], user_localized_label: LocalizedLabel | None = None, additional_properties: Dict[str, Any] | None = None)
参数
| 名称 | 说明 |
|---|---|
|
localized_labels
必需
|
LocalizedLabel 实例的列表。 |
|
user_localized_label
|
可选的特定于用户的本地化标签。 默认值: None
|
|
additional_properties
|
要包含在 Web API 有效负载中的其他属性的可选听写。 这些是最后合并的,可以替代默认值。 默认值: None
|
方法
| to_dict |
转换为 Web API JSON 格式。 示例:
|
to_dict
转换为 Web API JSON 格式。
示例:
>>> label = Label(localized_labels=[LocalizedLabel("Account", 1033)])
>>> label.to_dict()
{
'@odata.type': 'Microsoft.Dynamics.CRM.Label',
'LocalizedLabels': [
{'@odata.type': '...', 'Label': 'Account', 'LanguageCode': 1033}
],
'UserLocalizedLabel': {'@odata.type': '...', 'Label': 'Account', ...}
}
to_dict() -> Dict[str, Any]
属性
additional_properties
additional_properties: Dict[str, Any] | None = None
localized_labels
localized_labels: List[LocalizedLabel]
user_localized_label
user_localized_label: LocalizedLabel | None = None