| 204 | } |
| 205 | |
| 206 | fn validate_execution_plan( |
| 207 | execution_plan: &RequestExecutionPlan, |
| 208 | ) -> ModelValidatorResult<RequestError> { |
| 209 | match execution_plan { |
| 210 | RequestExecutionPlan::Scheduled { execution_time } => { |
| 211 | if *execution_time <= next_time() { |
| 212 | return Err(RequestError::ValidationError { |
| 213 | info: "The execution time must be in the future".to_owned(), |
| 214 | }); |
| 215 | } |
| 216 | } |
| 217 | RequestExecutionPlan::Immediate => (), |
| 218 | } |
| 219 | |
| 220 | Ok(()) |
| 221 | } |
| 222 | |
| 223 | fn validate_deduplication_key( |
| 224 | deduplication_key: &Option<String>, |