aws_sdk_connectcases/operation/create_layout/
_create_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 CreateLayoutInput {
6    /// <p>The unique identifier of the Cases domain.</p>
7    pub domain_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the layout. It must be unique for the Cases domain.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>Information about which fields will be present in the layout, and information about the order of the fields.</p>
11    pub content: ::std::option::Option<crate::types::LayoutContent>,
12}
13impl CreateLayoutInput {
14    /// <p>The unique identifier of the Cases domain.</p>
15    pub fn domain_id(&self) -> ::std::option::Option<&str> {
16        self.domain_id.as_deref()
17    }
18    /// <p>The name of the layout. It must be unique for the Cases domain.</p>
19    pub fn name(&self) -> ::std::option::Option<&str> {
20        self.name.as_deref()
21    }
22    /// <p>Information about which fields will be present in the layout, and information about the order of the fields.</p>
23    pub fn content(&self) -> ::std::option::Option<&crate::types::LayoutContent> {
24        self.content.as_ref()
25    }
26}
27impl CreateLayoutInput {
28    /// Creates a new builder-style object to manufacture [`CreateLayoutInput`](crate::operation::create_layout::CreateLayoutInput).
29    pub fn builder() -> crate::operation::create_layout::builders::CreateLayoutInputBuilder {
30        crate::operation::create_layout::builders::CreateLayoutInputBuilder::default()
31    }
32}
33
34/// A builder for [`CreateLayoutInput`](crate::operation::create_layout::CreateLayoutInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct CreateLayoutInputBuilder {
38    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
39    pub(crate) name: ::std::option::Option<::std::string::String>,
40    pub(crate) content: ::std::option::Option<crate::types::LayoutContent>,
41}
42impl CreateLayoutInputBuilder {
43    /// <p>The unique identifier of the Cases domain.</p>
44    /// This field is required.
45    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.domain_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The unique identifier of the Cases domain.</p>
50    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.domain_id = input;
52        self
53    }
54    /// <p>The unique identifier of the Cases domain.</p>
55    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.domain_id
57    }
58    /// <p>The name of the layout. It must be unique for the Cases domain.</p>
59    /// This field is required.
60    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.name = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The name of the layout. It must be unique for the Cases domain.</p>
65    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.name = input;
67        self
68    }
69    /// <p>The name of the layout. It must be unique for the Cases domain.</p>
70    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
71        &self.name
72    }
73    /// <p>Information about which fields will be present in the layout, and information about the order of the fields.</p>
74    /// This field is required.
75    pub fn content(mut self, input: crate::types::LayoutContent) -> Self {
76        self.content = ::std::option::Option::Some(input);
77        self
78    }
79    /// <p>Information about which fields will be present in the layout, and information about the order of the fields.</p>
80    pub fn set_content(mut self, input: ::std::option::Option<crate::types::LayoutContent>) -> Self {
81        self.content = input;
82        self
83    }
84    /// <p>Information about which fields will be present in the layout, and information about the order of the fields.</p>
85    pub fn get_content(&self) -> &::std::option::Option<crate::types::LayoutContent> {
86        &self.content
87    }
88    /// Consumes the builder and constructs a [`CreateLayoutInput`](crate::operation::create_layout::CreateLayoutInput).
89    pub fn build(
90        self,
91    ) -> ::std::result::Result<crate::operation::create_layout::CreateLayoutInput, ::aws_smithy_types::error::operation::BuildError> {
92        ::std::result::Result::Ok(crate::operation::create_layout::CreateLayoutInput {
93            domain_id: self.domain_id,
94            name: self.name,
95            content: self.content,
96        })
97    }
98}