Label Class

Represents a label that can have multiple localized versions.

Constructor

Label(localized_labels: List[LocalizedLabel], user_localized_label: LocalizedLabel | None = None, additional_properties: Dict[str, Any] | None = None)

Parameters

Name Description
localized_labels
Required

List of LocalizedLabel instances.

user_localized_label

Optional user-specific localized label.

Default value: None
additional_properties

Optional dict of additional properties to include in the Web API payload. These are merged last and can override default values.

Default value: None

Methods

to_dict

Convert to Web API JSON format.

Example:


   >>> 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

Convert to Web API JSON format.

Example:


   >>> 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]

Attributes

additional_properties

additional_properties: Dict[str, Any] | None = None

localized_labels

localized_labels: List[LocalizedLabel]

user_localized_label

user_localized_label: LocalizedLabel | None = None