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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A <code>Layout</code> defines the placement of elements within a sheet.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/types-of-layout.html">Types of layout</a> in the <i>Amazon Quick Suite User Guide</i>.</p>
/// <p>This is a union type structure. For this structure to be valid, only one of the attributes can be defined.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Layout {
/// <p>The configuration that determines what the type of layout for a sheet.</p>
pub configuration: ::std::option::Option<crate::types::LayoutConfiguration>,
}
impl Layout {
/// <p>The configuration that determines what the type of layout for a sheet.</p>
pub fn configuration(&self) -> ::std::option::Option<&crate::types::LayoutConfiguration> {
self.configuration.as_ref()
}
}
impl Layout {
/// Creates a new builder-style object to manufacture [`Layout`](crate::types::Layout).
pub fn builder() -> crate::types::builders::LayoutBuilder {
crate::types::builders::LayoutBuilder::default()
}
}
/// A builder for [`Layout`](crate::types::Layout).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct LayoutBuilder {
pub(crate) configuration: ::std::option::Option<crate::types::LayoutConfiguration>,
}
impl LayoutBuilder {
/// <p>The configuration that determines what the type of layout for a sheet.</p>
/// This field is required.
pub fn configuration(mut self, input: crate::types::LayoutConfiguration) -> Self {
self.configuration = ::std::option::Option::Some(input);
self
}
/// <p>The configuration that determines what the type of layout for a sheet.</p>
pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::LayoutConfiguration>) -> Self {
self.configuration = input;
self
}
/// <p>The configuration that determines what the type of layout for a sheet.</p>
pub fn get_configuration(&self) -> &::std::option::Option<crate::types::LayoutConfiguration> {
&self.configuration
}
/// Consumes the builder and constructs a [`Layout`](crate::types::Layout).
pub fn build(self) -> crate::types::Layout {
crate::types::Layout {
configuration: self.configuration,
}
}
}