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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains configuration information about a CloudFront function.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct FunctionConfig {
    /// <p>A comment to describe the function.</p>
    pub comment: ::std::option::Option<::std::string::String>,
    /// <p>The function's runtime environment verion.</p>
    pub runtime: ::std::option::Option<crate::types::FunctionRuntime>,
}
impl FunctionConfig {
    /// <p>A comment to describe the function.</p>
    pub fn comment(&self) -> ::std::option::Option<&str> {
        self.comment.as_deref()
    }
    /// <p>The function's runtime environment verion.</p>
    pub fn runtime(&self) -> ::std::option::Option<&crate::types::FunctionRuntime> {
        self.runtime.as_ref()
    }
}
impl FunctionConfig {
    /// Creates a new builder-style object to manufacture [`FunctionConfig`](crate::types::FunctionConfig).
    pub fn builder() -> crate::types::builders::FunctionConfigBuilder {
        crate::types::builders::FunctionConfigBuilder::default()
    }
}

/// A builder for [`FunctionConfig`](crate::types::FunctionConfig).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct FunctionConfigBuilder {
    pub(crate) comment: ::std::option::Option<::std::string::String>,
    pub(crate) runtime: ::std::option::Option<crate::types::FunctionRuntime>,
}
impl FunctionConfigBuilder {
    /// <p>A comment to describe the function.</p>
    pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.comment = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A comment to describe the function.</p>
    pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.comment = input;
        self
    }
    /// <p>A comment to describe the function.</p>
    pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
        &self.comment
    }
    /// <p>The function's runtime environment verion.</p>
    pub fn runtime(mut self, input: crate::types::FunctionRuntime) -> Self {
        self.runtime = ::std::option::Option::Some(input);
        self
    }
    /// <p>The function's runtime environment verion.</p>
    pub fn set_runtime(mut self, input: ::std::option::Option<crate::types::FunctionRuntime>) -> Self {
        self.runtime = input;
        self
    }
    /// <p>The function's runtime environment verion.</p>
    pub fn get_runtime(&self) -> &::std::option::Option<crate::types::FunctionRuntime> {
        &self.runtime
    }
    /// Consumes the builder and constructs a [`FunctionConfig`](crate::types::FunctionConfig).
    pub fn build(self) -> crate::types::FunctionConfig {
        crate::types::FunctionConfig {
            comment: self.comment,
            runtime: self.runtime,
        }
    }
}