(template: &SandboxTemplate, key: &str)
| 2099 | } |
| 2100 | |
| 2101 | fn platform_config_bool(template: &SandboxTemplate, key: &str) -> Option<bool> { |
| 2102 | let config = template.platform_config.as_ref()?; |
| 2103 | let value = config.fields.get(key)?; |
| 2104 | match value.kind.as_ref() { |
| 2105 | Some(prost_types::value::Kind::BoolValue(b)) => Some(*b), |
| 2106 | _ => None, |
| 2107 | } |
| 2108 | } |
| 2109 | |
| 2110 | /// Extract a nested Struct value from the template's `platform_config`, |
| 2111 | /// converting it to `serde_json::Value`. |
no test coverage detected