Skip to main content

reso_dd/generated/
struct_rules.rs

1// THIS IS A GENERATED FILE
2// If anything in this file needs to be updated, it needs to be fixed in reso_dd_generator
3#[allow(unused_imports)]
4use serde::{Deserialize, Serialize};
5
6/// [Rules Resource](https://ddwiki.reso.org/display/DDW17/Rules+Resource)
7#[derive(Debug, Default, Clone, Serialize, Deserialize)]
8pub struct Rules {
9    /// The class or table to which the Rule refers. i.e. Residential, Residential Lease, Income, Mobile, etc.
10    ///
11    /// [ClassName](https://ddwiki.reso.org/display/DDW17/ClassName+%28Rules%29+Field)
12    #[serde(rename = "ClassName", skip_serializing_if = "Option::is_none")]
13    pub class_name: Option<crate::ClassName>,
14
15    /// The unique identifier of the field to which the Rule applies. This is a foreign key relating to the field found in the resource per the ResourceName.
16    ///
17    /// [FieldKey](https://ddwiki.reso.org/display/DDW17/FieldKey+%28Rules%29+Field)
18    #[serde(rename = "FieldKey", skip_serializing_if = "Option::is_none")]
19    pub field_key: Option<String>,
20
21    /// The unique identifier of the field to which the Rule applies. This is a foreign key relating to the field found in the resource per the ResourceName. This is the numeric only key and used as an alternative to the FieldKey field.
22    ///
23    /// [FieldKeyNumeric](https://ddwiki.reso.org/display/DDW17/FieldKeyNumeric+%28Rules%29+Field)
24    #[serde(rename = "FieldKeyNumeric", skip_serializing_if = "Option::is_none")]
25    pub field_key_numeric: Option<f64>,
26
27    /// The name of the field to which the Rule applies.
28    ///
29    /// [FieldName](https://ddwiki.reso.org/display/DDW17/FieldName+%28Rules%29+Field)
30    #[serde(rename = "FieldName", skip_serializing_if = "Option::is_none")]
31    pub field_name: Option<String>,
32
33    /// The transactional timestamp automatically recorded by the MLS system representing the date/time the rule was last modified.
34    ///
35    /// [ModificationTimestamp](https://ddwiki.reso.org/display/DDW17/ModificationTimestamp+%28Rules%29+Field)
36    #[serde(
37        rename = "ModificationTimestamp",
38        skip_serializing_if = "Option::is_none"
39    )]
40    pub modification_timestamp: Option<chrono::DateTime<chrono::FixedOffset>>,
41
42    /// The transactional timestamp automatically recorded by the MLS system representing the date/time the rule was initially entered.
43    ///
44    /// [OriginalEntryTimestamp](https://ddwiki.reso.org/display/DDW17/OriginalEntryTimestamp+%28Rules%29+Field)
45    #[serde(
46        rename = "OriginalEntryTimestamp",
47        skip_serializing_if = "Option::is_none"
48    )]
49    pub original_entry_timestamp: Option<chrono::DateTime<chrono::FixedOffset>>,
50
51    /// The RESO OUID's OrganizationUniqueId of the Originating record provider. The Originating system is the system with authoritative control over the record. For example; the name of the MLS where the Rule originated. In cases where the Originating system was not where the record originated (the authoritative system), see the Originating System fields.
52    ///
53    /// [OriginatingSystemID](https://ddwiki.reso.org/display/DDW17/OriginatingSystemID+%28Rules%29+Field)
54    #[serde(
55        rename = "OriginatingSystemID",
56        skip_serializing_if = "Option::is_none"
57    )]
58    pub originating_system_id: Option<String>,
59
60    /// The name of the Originating record provider. Most commonly the name of the MLS. The place where the Rules is originally input. The legal name of the company.
61    ///
62    /// [OriginatingSystemName](https://ddwiki.reso.org/display/DDW17/OriginatingSystemName+%28Rules%29+Field)
63    #[serde(
64        rename = "OriginatingSystemName",
65        skip_serializing_if = "Option::is_none"
66    )]
67    pub originating_system_name: Option<String>,
68
69    /// The system key, a unique record identifier, from the Originating system. The Originating system is the system with authoritative control over the record. For example, the Multiple Listing Service where the Rule originated. There may be cases where the Source System (how you received the record) is not the Originating System. See Source System Key for more information.
70    ///
71    /// [OriginatingSystemRuleKey](https://ddwiki.reso.org/display/DDW17/OriginatingSystemRuleKey+Field)
72    #[serde(
73        rename = "OriginatingSystemRuleKey",
74        skip_serializing_if = "Option::is_none"
75    )]
76    pub originating_system_rule_key: Option<String>,
77
78    /// The resource to which the Rule refers. E.g. Property, Member, Office, Open House, etc.
79    ///
80    /// [ResourceName](https://ddwiki.reso.org/display/DDW17/ResourceName+%28Rules%29+Field)
81    #[serde(rename = "ResourceName", skip_serializing_if = "Option::is_none")]
82    pub resource_name: Option<crate::ResourceName>,
83
84    /// The action to be taken when processing the rule.
85    ///
86    /// [RuleAction](https://ddwiki.reso.org/display/DDW17/RuleAction+Field)
87    #[serde(rename = "RuleAction", skip_serializing_if = "Option::is_none")]
88    pub rule_action: Option<String>,
89
90    /// A detailed textual description of the rule.
91    ///
92    /// [RuleDescription](https://ddwiki.reso.org/display/DDW17/RuleDescription+Field)
93    #[serde(rename = "RuleDescription", skip_serializing_if = "Option::is_none")]
94    pub rule_description: Option<String>,
95
96    /// Is the rule currently enabled?
97    ///
98    /// [RuleEnabledYN](https://ddwiki.reso.org/display/DDW17/RuleEnabledYN+Field)
99    #[serde(rename = "RuleEnabledYN", skip_serializing_if = "Option::is_none")]
100    pub rule_enabled_yn: Option<bool>,
101
102    /// Textual information conveyed when the given rule is in error or fails. (e.g. The listing price must be greater than 0.)
103    ///
104    /// [RuleErrorText](https://ddwiki.reso.org/display/DDW17/RuleErrorText+Field)
105    #[serde(rename = "RuleErrorText", skip_serializing_if = "Option::is_none")]
106    pub rule_error_text: Option<String>,
107
108    /// The expression or details of the rule.
109    ///
110    /// [RuleExpression](https://ddwiki.reso.org/display/DDW17/RuleExpression+Field)
111    #[serde(rename = "RuleExpression", skip_serializing_if = "Option::is_none")]
112    pub rule_expression: Option<String>,
113
114    /// $filter, JavaScript, RETS1.8, REBR, etc.… ?
115    ///
116    /// [RuleFormat](https://ddwiki.reso.org/display/DDW17/RuleFormat+Field)
117    #[serde(rename = "RuleFormat", skip_serializing_if = "Option::is_none")]
118    pub rule_format: Option<crate::RuleFormat>,
119
120    /// The text that might be displayed on a form that helps the user fix the rule (e.g. enter phone number in the 10 digit format ###-###-####.)
121    ///
122    /// [RuleHelpText](https://ddwiki.reso.org/display/DDW17/RuleHelpText+Field)
123    #[serde(rename = "RuleHelpText", skip_serializing_if = "Option::is_none")]
124    pub rule_help_text: Option<String>,
125
126    /// <ac:structured-macro ac:name="tooltip" ac:schema-version="1" ac:macro-id="d9385e45-37c2-4bf8-9f64-6a4568d6b0b4"><ac:parameter ac:name="tip">A single designation identifying what category of fields to which the given field belongs.</ac:parameter><ac:parameter ac:name="text">Group</ac:parameter></ac:structured-macro><ac:link ac:anchor="Group"><ri:page ri:content-title="Data Dictionary Terms and Meta Definitions" /><ac:plain-text-link-body><![CDATA[?]]></ac:plain-text-link-body></ac:link>: <ac:link><ri:page ri:content-title="Rules Resource" /><ac:link-body>Rules Resource</ac:link-body></ac:link>
127    ///
128    /// [RuleKey](https://ddwiki.reso.org/display/DDW17/RuleKey+Field)
129    #[serde(rename = "RuleKey", skip_serializing_if = "Option::is_none")]
130    pub rule_key: Option<String>,
131
132    /// <ac:structured-macro ac:name="tooltip" ac:schema-version="1" ac:macro-id="dddc1b50-f511-45b5-8c68-773cf136e7b5"><ac:parameter ac:name="tip">A single designation identifying what category of fields to which the given field belongs.</ac:parameter><ac:parameter ac:name="text">Group</ac:parameter></ac:structured-macro><ac:link ac:anchor="Group"><ri:page ri:content-title="Data Dictionary Terms and Meta Definitions" /><ac:plain-text-link-body><![CDATA[?]]></ac:plain-text-link-body></ac:link>: <ac:link><ri:page ri:content-title="Rules Resource" /><ac:link-body>Rules Resource</ac:link-body></ac:link>
133    ///
134    /// [RuleKeyNumeric](https://ddwiki.reso.org/display/DDW17/RuleKeyNumeric+Field)
135    #[serde(rename = "RuleKeyNumeric", skip_serializing_if = "Option::is_none")]
136    pub rule_key_numeric: Option<f64>,
137
138    /// A descriptive name for the rule.
139    ///
140    /// [RuleName](https://ddwiki.reso.org/display/DDW17/RuleName+Field)
141    #[serde(rename = "RuleName", skip_serializing_if = "Option::is_none")]
142    pub rule_name: Option<String>,
143
144    /// When in use, execution of rules are to follow the order specified by this field. Any rule that references another field will need to be ordered.
145    ///
146    /// [RuleOrder](https://ddwiki.reso.org/display/DDW17/RuleOrder+Field)
147    #[serde(rename = "RuleOrder", skip_serializing_if = "Option::is_none")]
148    pub rule_order: Option<f64>,
149
150    /// Validation, Required, Warning, etc.
151    ///
152    /// [RuleType](https://ddwiki.reso.org/display/DDW17/RuleType+Field)
153    #[serde(rename = "RuleType", skip_serializing_if = "Option::is_none")]
154    pub rule_type: Option<String>,
155
156    /// A semantically-versioned rule version. https://semver.org/
157    ///
158    /// [RuleVersion](https://ddwiki.reso.org/display/DDW17/RuleVersion+Field)
159    #[serde(rename = "RuleVersion", skip_serializing_if = "Option::is_none")]
160    pub rule_version: Option<String>,
161
162    /// Textual information conveyed when a given rule has met a condition that warrants a warning message. e.g. you've entered a sale price that is has a difference from the listing price greater than 25%.
163    ///
164    /// [RuleWarningText](https://ddwiki.reso.org/display/DDW17/RuleWarningText+Field)
165    #[serde(rename = "RuleWarningText", skip_serializing_if = "Option::is_none")]
166    pub rule_warning_text: Option<String>,
167
168    /// The system key, a unique record identifier, from the Source System. The Source System is the system from which the record was directly received. In cases where the Source System was not where the record originated (the authoritative system), see the Originating System fields.
169    ///
170    /// [SourceSystemHistoryKey](https://ddwiki.reso.org/display/DDW17/SourceSystemHistoryKey+%28Rules%29+Field)
171    #[serde(
172        rename = "SourceSystemHistoryKey",
173        skip_serializing_if = "Option::is_none"
174    )]
175    pub source_system_history_key: Option<String>,
176
177    /// The RESO OUID's OrganizationUniqueId of the Source record provider. The source system is the system from which the record was directly received. In cases where the source system was not where the record originated (the authoritative system), see the Originating System fields.
178    ///
179    /// [SourceSystemID](https://ddwiki.reso.org/display/DDW17/SourceSystemID+%28Rules%29+Field)
180    #[serde(rename = "SourceSystemID", skip_serializing_if = "Option::is_none")]
181    pub source_system_id: Option<String>,
182
183    /// The name of the Rule record provider. The system from which the record was directly received. The legal name of the company.
184    ///
185    /// [SourceSystemName](https://ddwiki.reso.org/display/DDW17/SourceSystemName+%28Rules%29+Field)
186    #[serde(rename = "SourceSystemName", skip_serializing_if = "Option::is_none")]
187    pub source_system_name: Option<String>,
188}