aws_sdk_ssmcontacts/operation/update_contact/
_update_contact_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateContactInput {
6    /// <p>The Amazon Resource Name (ARN) of the contact or escalation plan you're updating.</p>
7    pub contact_id: ::std::option::Option<::std::string::String>,
8    /// <p>The full name of the contact or escalation plan.</p>
9    pub display_name: ::std::option::Option<::std::string::String>,
10    /// <p>A list of stages. A contact has an engagement plan with stages for specified contact channels. An escalation plan uses these stages to contact specified contacts.</p>
11    pub plan: ::std::option::Option<crate::types::Plan>,
12}
13impl UpdateContactInput {
14    /// <p>The Amazon Resource Name (ARN) of the contact or escalation plan you're updating.</p>
15    pub fn contact_id(&self) -> ::std::option::Option<&str> {
16        self.contact_id.as_deref()
17    }
18    /// <p>The full name of the contact or escalation plan.</p>
19    pub fn display_name(&self) -> ::std::option::Option<&str> {
20        self.display_name.as_deref()
21    }
22    /// <p>A list of stages. A contact has an engagement plan with stages for specified contact channels. An escalation plan uses these stages to contact specified contacts.</p>
23    pub fn plan(&self) -> ::std::option::Option<&crate::types::Plan> {
24        self.plan.as_ref()
25    }
26}
27impl UpdateContactInput {
28    /// Creates a new builder-style object to manufacture [`UpdateContactInput`](crate::operation::update_contact::UpdateContactInput).
29    pub fn builder() -> crate::operation::update_contact::builders::UpdateContactInputBuilder {
30        crate::operation::update_contact::builders::UpdateContactInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateContactInput`](crate::operation::update_contact::UpdateContactInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateContactInputBuilder {
38    pub(crate) contact_id: ::std::option::Option<::std::string::String>,
39    pub(crate) display_name: ::std::option::Option<::std::string::String>,
40    pub(crate) plan: ::std::option::Option<crate::types::Plan>,
41}
42impl UpdateContactInputBuilder {
43    /// <p>The Amazon Resource Name (ARN) of the contact or escalation plan you're updating.</p>
44    /// This field is required.
45    pub fn contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.contact_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The Amazon Resource Name (ARN) of the contact or escalation plan you're updating.</p>
50    pub fn set_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.contact_id = input;
52        self
53    }
54    /// <p>The Amazon Resource Name (ARN) of the contact or escalation plan you're updating.</p>
55    pub fn get_contact_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.contact_id
57    }
58    /// <p>The full name of the contact or escalation plan.</p>
59    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.display_name = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The full name of the contact or escalation plan.</p>
64    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.display_name = input;
66        self
67    }
68    /// <p>The full name of the contact or escalation plan.</p>
69    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
70        &self.display_name
71    }
72    /// <p>A list of stages. A contact has an engagement plan with stages for specified contact channels. An escalation plan uses these stages to contact specified contacts.</p>
73    pub fn plan(mut self, input: crate::types::Plan) -> Self {
74        self.plan = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>A list of stages. A contact has an engagement plan with stages for specified contact channels. An escalation plan uses these stages to contact specified contacts.</p>
78    pub fn set_plan(mut self, input: ::std::option::Option<crate::types::Plan>) -> Self {
79        self.plan = input;
80        self
81    }
82    /// <p>A list of stages. A contact has an engagement plan with stages for specified contact channels. An escalation plan uses these stages to contact specified contacts.</p>
83    pub fn get_plan(&self) -> &::std::option::Option<crate::types::Plan> {
84        &self.plan
85    }
86    /// Consumes the builder and constructs a [`UpdateContactInput`](crate::operation::update_contact::UpdateContactInput).
87    pub fn build(
88        self,
89    ) -> ::std::result::Result<crate::operation::update_contact::UpdateContactInput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::update_contact::UpdateContactInput {
91            contact_id: self.contact_id,
92            display_name: self.display_name,
93            plan: self.plan,
94        })
95    }
96}