aws_sdk_connectcases/operation/update_layout/
_update_layout_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateLayoutInput {
6    /// <p>The unique identifier of the Cases domain.</p>
7    pub domain_id: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier of the layout.</p>
9    pub layout_id: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the layout. It must be unique per domain.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>Information about which fields will be present in the layout, the order of the fields.</p>
13    pub content: ::std::option::Option<crate::types::LayoutContent>,
14}
15impl UpdateLayoutInput {
16    /// <p>The unique identifier of the Cases domain.</p>
17    pub fn domain_id(&self) -> ::std::option::Option<&str> {
18        self.domain_id.as_deref()
19    }
20    /// <p>The unique identifier of the layout.</p>
21    pub fn layout_id(&self) -> ::std::option::Option<&str> {
22        self.layout_id.as_deref()
23    }
24    /// <p>The name of the layout. It must be unique per domain.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>Information about which fields will be present in the layout, the order of the fields.</p>
29    pub fn content(&self) -> ::std::option::Option<&crate::types::LayoutContent> {
30        self.content.as_ref()
31    }
32}
33impl UpdateLayoutInput {
34    /// Creates a new builder-style object to manufacture [`UpdateLayoutInput`](crate::operation::update_layout::UpdateLayoutInput).
35    pub fn builder() -> crate::operation::update_layout::builders::UpdateLayoutInputBuilder {
36        crate::operation::update_layout::builders::UpdateLayoutInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateLayoutInput`](crate::operation::update_layout::UpdateLayoutInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateLayoutInputBuilder {
44    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
45    pub(crate) layout_id: ::std::option::Option<::std::string::String>,
46    pub(crate) name: ::std::option::Option<::std::string::String>,
47    pub(crate) content: ::std::option::Option<crate::types::LayoutContent>,
48}
49impl UpdateLayoutInputBuilder {
50    /// <p>The unique identifier of the Cases domain.</p>
51    /// This field is required.
52    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.domain_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The unique identifier of the Cases domain.</p>
57    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.domain_id = input;
59        self
60    }
61    /// <p>The unique identifier of the Cases domain.</p>
62    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.domain_id
64    }
65    /// <p>The unique identifier of the layout.</p>
66    /// This field is required.
67    pub fn layout_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.layout_id = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The unique identifier of the layout.</p>
72    pub fn set_layout_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.layout_id = input;
74        self
75    }
76    /// <p>The unique identifier of the layout.</p>
77    pub fn get_layout_id(&self) -> &::std::option::Option<::std::string::String> {
78        &self.layout_id
79    }
80    /// <p>The name of the layout. It must be unique per domain.</p>
81    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.name = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The name of the layout. It must be unique per domain.</p>
86    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.name = input;
88        self
89    }
90    /// <p>The name of the layout. It must be unique per domain.</p>
91    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
92        &self.name
93    }
94    /// <p>Information about which fields will be present in the layout, the order of the fields.</p>
95    pub fn content(mut self, input: crate::types::LayoutContent) -> Self {
96        self.content = ::std::option::Option::Some(input);
97        self
98    }
99    /// <p>Information about which fields will be present in the layout, the order of the fields.</p>
100    pub fn set_content(mut self, input: ::std::option::Option<crate::types::LayoutContent>) -> Self {
101        self.content = input;
102        self
103    }
104    /// <p>Information about which fields will be present in the layout, the order of the fields.</p>
105    pub fn get_content(&self) -> &::std::option::Option<crate::types::LayoutContent> {
106        &self.content
107    }
108    /// Consumes the builder and constructs a [`UpdateLayoutInput`](crate::operation::update_layout::UpdateLayoutInput).
109    pub fn build(
110        self,
111    ) -> ::std::result::Result<crate::operation::update_layout::UpdateLayoutInput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::update_layout::UpdateLayoutInput {
113            domain_id: self.domain_id,
114            layout_id: self.layout_id,
115            name: self.name,
116            content: self.content,
117        })
118    }
119}