ory_client_client/models/
ui_node_input_attributes.rs

1/*
2 * Ory APIs
3 *
4 * Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. 
5 *
6 * The version of the OpenAPI document: v0.0.1-alpha.1
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// UiNodeInputAttributes : InputAttributes represents the attributes of an input node
12
13
14
15#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16pub struct UiNodeInputAttributes {
17    /// Sets the input's disabled field to true or false.
18    #[serde(rename = "disabled")]
19    pub disabled: bool,
20    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
21    pub label: Option<Box<crate::models::UiText>>,
22    /// The input's element name.
23    #[serde(rename = "name")]
24    pub name: String,
25    /// The input's pattern.
26    #[serde(rename = "pattern", skip_serializing_if = "Option::is_none")]
27    pub pattern: Option<String>,
28    /// Mark this input field as required.
29    #[serde(rename = "required", skip_serializing_if = "Option::is_none")]
30    pub required: Option<bool>,
31    #[serde(rename = "type")]
32    pub _type: String,
33    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
34    pub value: Option<Box<crate::models::UiNodeInputAttributesValue>>,
35}
36
37impl UiNodeInputAttributes {
38    /// InputAttributes represents the attributes of an input node
39    pub fn new(disabled: bool, name: String, _type: String) -> UiNodeInputAttributes {
40        UiNodeInputAttributes {
41            disabled,
42            label: None,
43            name,
44            pattern: None,
45            required: None,
46            _type,
47            value: None,
48        }
49    }
50}
51
52