Label 類別
代表一個標籤,可以有多個在地化版本。
建構函式
Label(localized_labels: List[LocalizedLabel], user_localized_label: LocalizedLabel | None = None, additional_properties: Dict[str, Any] | None = None)
參數
| 名稱 | Description |
|---|---|
|
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