|
14 | 14 |
|
15 | 15 |
|
16 | 16 | class DQCondition(AtlanObject): |
17 | | - """ |
18 | | - Data quality rule condition. |
19 | | -
|
20 | | - :param type: the condition type enum value |
21 | | - :param value: value of type str, int, or list depending on condition type |
22 | | - :param min_value: minimum value for range-based conditions |
23 | | - :param max_value: maximum value for range-based conditions |
24 | | - """ |
| 17 | + """Data quality rule condition.""" |
25 | 18 |
|
26 | 19 | type: alpha_dqRuleTemplateConfigRuleConditions = Field(description="") |
27 | 20 | value: Optional[Union[str, int, List[str], Dict[str, Any]]] = Field( |
@@ -78,13 +71,12 @@ def __init__( |
78 | 71 | validate_type("value", str, self.value) |
79 | 72 |
|
80 | 73 | def to_dict(self) -> Dict[str, Any]: |
81 | | - """Convert the condition to a dictionary representation.""" |
82 | 74 | result: Dict[str, Any] = {"type": self.type.value} |
83 | 75 |
|
84 | 76 | if self.type == alpha_dqRuleTemplateConfigRuleConditions.STRING_LENGTH_BETWEEN: |
85 | 77 | result["value"] = {"minValue": self.min_value, "maxValue": self.max_value} |
86 | 78 | else: |
87 | | - result["value"] = self.value |
| 79 | + result["value"] = {"value": self.value} |
88 | 80 |
|
89 | 81 | return result |
90 | 82 |
|
@@ -119,7 +111,6 @@ def add_condition( |
119 | 111 | return self |
120 | 112 |
|
121 | 113 | def build(self) -> str: |
122 | | - """Build the conditions as a JSON string.""" |
123 | 114 | if not self._conditions: |
124 | 115 | raise ErrorCode.INVALID_PARAMETER_VALUE.exception_with_parameters( |
125 | 116 | "empty conditions list", "conditions", "at least one condition" |
|
0 commit comments