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

/// <p>Target SIP media application and other details, such as priority and AWS Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be provided.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SipRuleTargetApplication {
    /// <p>The SIP media application ID.</p>
    pub sip_media_application_id: ::std::option::Option<::std::string::String>,
    /// <p>Priority of the SIP media application in the target list.</p>
    pub priority: ::std::option::Option<i32>,
    /// <p>The AWS Region of the target application.</p>
    pub aws_region: ::std::option::Option<::std::string::String>,
}
impl SipRuleTargetApplication {
    /// <p>The SIP media application ID.</p>
    pub fn sip_media_application_id(&self) -> ::std::option::Option<&str> {
        self.sip_media_application_id.as_deref()
    }
    /// <p>Priority of the SIP media application in the target list.</p>
    pub fn priority(&self) -> ::std::option::Option<i32> {
        self.priority
    }
    /// <p>The AWS Region of the target application.</p>
    pub fn aws_region(&self) -> ::std::option::Option<&str> {
        self.aws_region.as_deref()
    }
}
impl SipRuleTargetApplication {
    /// Creates a new builder-style object to manufacture [`SipRuleTargetApplication`](crate::types::SipRuleTargetApplication).
    pub fn builder() -> crate::types::builders::SipRuleTargetApplicationBuilder {
        crate::types::builders::SipRuleTargetApplicationBuilder::default()
    }
}

/// A builder for [`SipRuleTargetApplication`](crate::types::SipRuleTargetApplication).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SipRuleTargetApplicationBuilder {
    pub(crate) sip_media_application_id: ::std::option::Option<::std::string::String>,
    pub(crate) priority: ::std::option::Option<i32>,
    pub(crate) aws_region: ::std::option::Option<::std::string::String>,
}
impl SipRuleTargetApplicationBuilder {
    /// <p>The SIP media application ID.</p>
    pub fn sip_media_application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sip_media_application_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The SIP media application ID.</p>
    pub fn set_sip_media_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sip_media_application_id = input;
        self
    }
    /// <p>The SIP media application ID.</p>
    pub fn get_sip_media_application_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.sip_media_application_id
    }
    /// <p>Priority of the SIP media application in the target list.</p>
    pub fn priority(mut self, input: i32) -> Self {
        self.priority = ::std::option::Option::Some(input);
        self
    }
    /// <p>Priority of the SIP media application in the target list.</p>
    pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
        self.priority = input;
        self
    }
    /// <p>Priority of the SIP media application in the target list.</p>
    pub fn get_priority(&self) -> &::std::option::Option<i32> {
        &self.priority
    }
    /// <p>The AWS Region of the target application.</p>
    pub fn aws_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.aws_region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The AWS Region of the target application.</p>
    pub fn set_aws_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_region = input;
        self
    }
    /// <p>The AWS Region of the target application.</p>
    pub fn get_aws_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_region
    }
    /// Consumes the builder and constructs a [`SipRuleTargetApplication`](crate::types::SipRuleTargetApplication).
    pub fn build(self) -> crate::types::SipRuleTargetApplication {
        crate::types::SipRuleTargetApplication {
            sip_media_application_id: self.sip_media_application_id,
            priority: self.priority,
            aws_region: self.aws_region,
        }
    }
}