Skip to main content

powerplatform_dataverse_client/dataverse/
entityattribute.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Serialize, Deserialize, Clone)]
4pub struct AttributeTypeName {
5    /// OData payload shape: { "Value": "MoneyType" }
6    #[serde(rename = "Value")]
7    pub value: Option<String>,
8}
9
10/// Dataverse attribute metadata.
11#[derive(Debug, Serialize, Deserialize, Clone)]
12pub struct EntityAttribute {
13    /// Logical name of the attribute.
14    #[serde(rename = "LogicalName")]
15    pub logical_name: String,
16    /// Schema name of the attribute.
17    #[serde(rename = "SchemaName")]
18    pub schema_name: String,
19    /// Attribute type name.
20    #[serde(rename = "AttributeType")]
21    pub attribute_type: Option<String>,
22    /// Specific attribute type name.
23    #[serde(rename = "AttributeTypeName")]
24    pub attribute_type_name: Option<AttributeTypeName>,
25    /// True if the attribute is custom.
26    #[serde(rename = "IsCustomAttribute")]
27    pub is_custom_attribute: Option<bool>,
28    /// True if the attribute is valid for OData.
29    #[serde(rename = "IsValidODataAttribute")]
30    pub is_valid_odata_attribute: Option<bool>,
31    /// True if the attribute is valid for read operations.
32    #[serde(rename = "IsValidForRead")]
33    pub is_valid_for_read: Option<bool>,
34    /// True if the attribute is valid for update operations.
35    #[serde(rename = "IsValidForUpdate")]
36    pub is_valid_for_update: Option<bool>,
37}