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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The content artifact object.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ContentArtifactsConfiguration {
    /// <p>Indicates whether the content artifact is enabled or disabled.</p>
    pub state: crate::types::ArtifactsState,
    /// <p>The MUX type of the artifact configuration.</p>
    pub mux_type: ::std::option::Option<crate::types::ContentMuxType>,
}
impl ContentArtifactsConfiguration {
    /// <p>Indicates whether the content artifact is enabled or disabled.</p>
    pub fn state(&self) -> &crate::types::ArtifactsState {
        &self.state
    }
    /// <p>The MUX type of the artifact configuration.</p>
    pub fn mux_type(&self) -> ::std::option::Option<&crate::types::ContentMuxType> {
        self.mux_type.as_ref()
    }
}
impl ContentArtifactsConfiguration {
    /// Creates a new builder-style object to manufacture [`ContentArtifactsConfiguration`](crate::types::ContentArtifactsConfiguration).
    pub fn builder() -> crate::types::builders::ContentArtifactsConfigurationBuilder {
        crate::types::builders::ContentArtifactsConfigurationBuilder::default()
    }
}

/// A builder for [`ContentArtifactsConfiguration`](crate::types::ContentArtifactsConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ContentArtifactsConfigurationBuilder {
    pub(crate) state: ::std::option::Option<crate::types::ArtifactsState>,
    pub(crate) mux_type: ::std::option::Option<crate::types::ContentMuxType>,
}
impl ContentArtifactsConfigurationBuilder {
    /// <p>Indicates whether the content artifact is enabled or disabled.</p>
    /// This field is required.
    pub fn state(mut self, input: crate::types::ArtifactsState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the content artifact is enabled or disabled.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ArtifactsState>) -> Self {
        self.state = input;
        self
    }
    /// <p>Indicates whether the content artifact is enabled or disabled.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::ArtifactsState> {
        &self.state
    }
    /// <p>The MUX type of the artifact configuration.</p>
    pub fn mux_type(mut self, input: crate::types::ContentMuxType) -> Self {
        self.mux_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The MUX type of the artifact configuration.</p>
    pub fn set_mux_type(mut self, input: ::std::option::Option<crate::types::ContentMuxType>) -> Self {
        self.mux_type = input;
        self
    }
    /// <p>The MUX type of the artifact configuration.</p>
    pub fn get_mux_type(&self) -> &::std::option::Option<crate::types::ContentMuxType> {
        &self.mux_type
    }
    /// Consumes the builder and constructs a [`ContentArtifactsConfiguration`](crate::types::ContentArtifactsConfiguration).
    /// This method will fail if any of the following fields are not set:
    /// - [`state`](crate::types::builders::ContentArtifactsConfigurationBuilder::state)
    pub fn build(self) -> ::std::result::Result<crate::types::ContentArtifactsConfiguration, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::ContentArtifactsConfiguration {
            state: self.state.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "state",
                    "state was not specified but it is required when building ContentArtifactsConfiguration",
                )
            })?,
            mux_type: self.mux_type,
        })
    }
}