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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateCallAnalyticsCategoryInput {
    /// <p>The name of the Call Analytics category you want to update. Category names are case sensitive.</p>
    pub category_name: ::std::option::Option<::std::string::String>,
    /// <p>The rules used for the updated Call Analytics category. The rules you provide in this field replace the ones that are currently being used in the specified category.</p>
    pub rules: ::std::option::Option<::std::vec::Vec<crate::types::Rule>>,
    /// <p>Choose whether you want to update a real-time or a post-call category. The input type you specify must match the input type specified when the category was created. For example, if you created a category with the <code>POST_CALL</code> input type, you must use <code>POST_CALL</code> as the input type when updating this category.</p>
    pub input_type: ::std::option::Option<crate::types::InputType>,
}
impl UpdateCallAnalyticsCategoryInput {
    /// <p>The name of the Call Analytics category you want to update. Category names are case sensitive.</p>
    pub fn category_name(&self) -> ::std::option::Option<&str> {
        self.category_name.as_deref()
    }
    /// <p>The rules used for the updated Call Analytics category. The rules you provide in this field replace the ones that are currently being used in the specified category.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.rules.is_none()`.
    pub fn rules(&self) -> &[crate::types::Rule] {
        self.rules.as_deref().unwrap_or_default()
    }
    /// <p>Choose whether you want to update a real-time or a post-call category. The input type you specify must match the input type specified when the category was created. For example, if you created a category with the <code>POST_CALL</code> input type, you must use <code>POST_CALL</code> as the input type when updating this category.</p>
    pub fn input_type(&self) -> ::std::option::Option<&crate::types::InputType> {
        self.input_type.as_ref()
    }
}
impl UpdateCallAnalyticsCategoryInput {
    /// Creates a new builder-style object to manufacture [`UpdateCallAnalyticsCategoryInput`](crate::operation::update_call_analytics_category::UpdateCallAnalyticsCategoryInput).
    pub fn builder() -> crate::operation::update_call_analytics_category::builders::UpdateCallAnalyticsCategoryInputBuilder {
        crate::operation::update_call_analytics_category::builders::UpdateCallAnalyticsCategoryInputBuilder::default()
    }
}

/// A builder for [`UpdateCallAnalyticsCategoryInput`](crate::operation::update_call_analytics_category::UpdateCallAnalyticsCategoryInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateCallAnalyticsCategoryInputBuilder {
    pub(crate) category_name: ::std::option::Option<::std::string::String>,
    pub(crate) rules: ::std::option::Option<::std::vec::Vec<crate::types::Rule>>,
    pub(crate) input_type: ::std::option::Option<crate::types::InputType>,
}
impl UpdateCallAnalyticsCategoryInputBuilder {
    /// <p>The name of the Call Analytics category you want to update. Category names are case sensitive.</p>
    /// This field is required.
    pub fn category_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.category_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Call Analytics category you want to update. Category names are case sensitive.</p>
    pub fn set_category_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.category_name = input;
        self
    }
    /// <p>The name of the Call Analytics category you want to update. Category names are case sensitive.</p>
    pub fn get_category_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.category_name
    }
    /// Appends an item to `rules`.
    ///
    /// To override the contents of this collection use [`set_rules`](Self::set_rules).
    ///
    /// <p>The rules used for the updated Call Analytics category. The rules you provide in this field replace the ones that are currently being used in the specified category.</p>
    pub fn rules(mut self, input: crate::types::Rule) -> Self {
        let mut v = self.rules.unwrap_or_default();
        v.push(input);
        self.rules = ::std::option::Option::Some(v);
        self
    }
    /// <p>The rules used for the updated Call Analytics category. The rules you provide in this field replace the ones that are currently being used in the specified category.</p>
    pub fn set_rules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Rule>>) -> Self {
        self.rules = input;
        self
    }
    /// <p>The rules used for the updated Call Analytics category. The rules you provide in this field replace the ones that are currently being used in the specified category.</p>
    pub fn get_rules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Rule>> {
        &self.rules
    }
    /// <p>Choose whether you want to update a real-time or a post-call category. The input type you specify must match the input type specified when the category was created. For example, if you created a category with the <code>POST_CALL</code> input type, you must use <code>POST_CALL</code> as the input type when updating this category.</p>
    pub fn input_type(mut self, input: crate::types::InputType) -> Self {
        self.input_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Choose whether you want to update a real-time or a post-call category. The input type you specify must match the input type specified when the category was created. For example, if you created a category with the <code>POST_CALL</code> input type, you must use <code>POST_CALL</code> as the input type when updating this category.</p>
    pub fn set_input_type(mut self, input: ::std::option::Option<crate::types::InputType>) -> Self {
        self.input_type = input;
        self
    }
    /// <p>Choose whether you want to update a real-time or a post-call category. The input type you specify must match the input type specified when the category was created. For example, if you created a category with the <code>POST_CALL</code> input type, you must use <code>POST_CALL</code> as the input type when updating this category.</p>
    pub fn get_input_type(&self) -> &::std::option::Option<crate::types::InputType> {
        &self.input_type
    }
    /// Consumes the builder and constructs a [`UpdateCallAnalyticsCategoryInput`](crate::operation::update_call_analytics_category::UpdateCallAnalyticsCategoryInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_call_analytics_category::UpdateCallAnalyticsCategoryInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_call_analytics_category::UpdateCallAnalyticsCategoryInput {
            category_name: self.category_name,
            rules: self.rules,
            input_type: self.input_type,
        })
    }
}