1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 * Selling Partner API for Merchant Fulfillment
 *
 * The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services.
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

/// SellerInputDefinition : Specifies characteristics that apply to a seller input.



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct SellerInputDefinition {
    /// When true, the additional input field is required.
    #[serde(default, rename = "IsRequired")]
    pub is_required: bool,
    /// The data type of the additional input field.
    #[serde(default, rename = "DataType")]
    pub data_type: String,
    /// List of constraints.
    #[serde(default, rename = "Constraints")]
    pub constraints: Vec<crate::models::Constraint>,
    /// The display text for the additional input field.
    #[serde(default, rename = "InputDisplayText")]
    pub input_display_text: String,
    #[serde(default, rename = "InputTarget", skip_serializing_if = "Option::is_none")]
    pub input_target: Option<crate::models::InputTargetType>,
    #[serde(default, rename = "StoredValue")]
    pub stored_value: Box<crate::models::AdditionalSellerInput>,
    /// The set of fixed values in an additional seller input.
    #[serde(default, rename = "RestrictedSetValues", skip_serializing_if = "Option::is_none")]
    pub restricted_set_values: Option<Vec<String>>,
}

impl SellerInputDefinition {
    /// Specifies characteristics that apply to a seller input.
    pub fn new(is_required: bool, data_type: String, constraints: Vec<crate::models::Constraint>, input_display_text: String, stored_value: crate::models::AdditionalSellerInput) -> SellerInputDefinition {
        SellerInputDefinition {
            is_required,
            data_type,
            constraints,
            input_display_text,
            input_target: None,
            stored_value: Box::new(stored_value),
            restricted_set_values: None,
        }
    }
}