nomad_api_types/types/
constraint.rs

1/*
2 * This is an auto-generated file.
3 * Any manual changes may be overwritten without notice!
4 */
5
6use derive_builder::Builder;
7use serde::{Deserialize, Serialize};
8
9/// Constraint is used to serialize a job placement constraint.
10///
11/// This struct was generated based on the Go types of the official Nomad API client.
12#[derive(Clone, Debug, PartialEq, Deserialize, Serialize, Builder, Default)]
13pub struct Constraint {
14    #[serde(rename = "LTarget")]
15    #[builder(default)]
16    pub l_target: String,
17
18    #[serde(rename = "RTarget")]
19    #[builder(default)]
20    pub r_target: String,
21
22    #[serde(rename = "Operand")]
23    #[builder(default)]
24    pub operand: String,
25}
26impl Constraint {
27    pub fn builder() -> ConstraintBuilder {
28        ConstraintBuilder::default()
29    }
30}