aws_sdk_connect/operation/stop_contact/
_stop_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 StopContactInput {
6    /// <p>The ID of the contact.</p>
7    pub contact_id: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
9    pub instance_id: ::std::option::Option<::std::string::String>,
10    /// <p>The reason a contact can be disconnected. Only Amazon Connect outbound campaigns can provide this field. For a list and description of all the possible disconnect reasons by channel (including outbound campaign voice contacts) see DisconnectReason under <a href="https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html#ctr-ContactTraceRecord">ContactTraceRecord</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
11    pub disconnect_reason: ::std::option::Option<crate::types::DisconnectReason>,
12}
13impl StopContactInput {
14    /// <p>The ID of the contact.</p>
15    pub fn contact_id(&self) -> ::std::option::Option<&str> {
16        self.contact_id.as_deref()
17    }
18    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
19    pub fn instance_id(&self) -> ::std::option::Option<&str> {
20        self.instance_id.as_deref()
21    }
22    /// <p>The reason a contact can be disconnected. Only Amazon Connect outbound campaigns can provide this field. For a list and description of all the possible disconnect reasons by channel (including outbound campaign voice contacts) see DisconnectReason under <a href="https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html#ctr-ContactTraceRecord">ContactTraceRecord</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
23    pub fn disconnect_reason(&self) -> ::std::option::Option<&crate::types::DisconnectReason> {
24        self.disconnect_reason.as_ref()
25    }
26}
27impl StopContactInput {
28    /// Creates a new builder-style object to manufacture [`StopContactInput`](crate::operation::stop_contact::StopContactInput).
29    pub fn builder() -> crate::operation::stop_contact::builders::StopContactInputBuilder {
30        crate::operation::stop_contact::builders::StopContactInputBuilder::default()
31    }
32}
33
34/// A builder for [`StopContactInput`](crate::operation::stop_contact::StopContactInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct StopContactInputBuilder {
38    pub(crate) contact_id: ::std::option::Option<::std::string::String>,
39    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
40    pub(crate) disconnect_reason: ::std::option::Option<crate::types::DisconnectReason>,
41}
42impl StopContactInputBuilder {
43    /// <p>The ID of the contact.</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 ID of the contact.</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 ID of the contact.</p>
55    pub fn get_contact_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.contact_id
57    }
58    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
59    /// This field is required.
60    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.instance_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
65    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.instance_id = input;
67        self
68    }
69    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
70    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.instance_id
72    }
73    /// <p>The reason a contact can be disconnected. Only Amazon Connect outbound campaigns can provide this field. For a list and description of all the possible disconnect reasons by channel (including outbound campaign voice contacts) see DisconnectReason under <a href="https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html#ctr-ContactTraceRecord">ContactTraceRecord</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
74    pub fn disconnect_reason(mut self, input: crate::types::DisconnectReason) -> Self {
75        self.disconnect_reason = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>The reason a contact can be disconnected. Only Amazon Connect outbound campaigns can provide this field. For a list and description of all the possible disconnect reasons by channel (including outbound campaign voice contacts) see DisconnectReason under <a href="https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html#ctr-ContactTraceRecord">ContactTraceRecord</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
79    pub fn set_disconnect_reason(mut self, input: ::std::option::Option<crate::types::DisconnectReason>) -> Self {
80        self.disconnect_reason = input;
81        self
82    }
83    /// <p>The reason a contact can be disconnected. Only Amazon Connect outbound campaigns can provide this field. For a list and description of all the possible disconnect reasons by channel (including outbound campaign voice contacts) see DisconnectReason under <a href="https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html#ctr-ContactTraceRecord">ContactTraceRecord</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
84    pub fn get_disconnect_reason(&self) -> &::std::option::Option<crate::types::DisconnectReason> {
85        &self.disconnect_reason
86    }
87    /// Consumes the builder and constructs a [`StopContactInput`](crate::operation::stop_contact::StopContactInput).
88    pub fn build(self) -> ::std::result::Result<crate::operation::stop_contact::StopContactInput, ::aws_smithy_types::error::operation::BuildError> {
89        ::std::result::Result::Ok(crate::operation::stop_contact::StopContactInput {
90            contact_id: self.contact_id,
91            instance_id: self.instance_id,
92            disconnect_reason: self.disconnect_reason,
93        })
94    }
95}