aws_sdk_connect/types/
_contact_flow_summary.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains summary information about a flow.</p>
4/// <p>You can also create and update flows using the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/flow-language.html">Amazon Connect Flow language</a>.</p>
5#[non_exhaustive]
6#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
7pub struct ContactFlowSummary {
8    /// <p>The identifier of the flow.</p>
9    pub id: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Resource Name (ARN) of the flow.</p>
11    pub arn: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the flow.</p>
13    pub name: ::std::option::Option<::std::string::String>,
14    /// <p>The type of flow.</p>
15    pub contact_flow_type: ::std::option::Option<crate::types::ContactFlowType>,
16    /// <p>The type of flow.</p>
17    pub contact_flow_state: ::std::option::Option<crate::types::ContactFlowState>,
18    /// <p>The status of the flow.</p>
19    pub contact_flow_status: ::std::option::Option<crate::types::ContactFlowStatus>,
20}
21impl ContactFlowSummary {
22    /// <p>The identifier of the flow.</p>
23    pub fn id(&self) -> ::std::option::Option<&str> {
24        self.id.as_deref()
25    }
26    /// <p>The Amazon Resource Name (ARN) of the flow.</p>
27    pub fn arn(&self) -> ::std::option::Option<&str> {
28        self.arn.as_deref()
29    }
30    /// <p>The name of the flow.</p>
31    pub fn name(&self) -> ::std::option::Option<&str> {
32        self.name.as_deref()
33    }
34    /// <p>The type of flow.</p>
35    pub fn contact_flow_type(&self) -> ::std::option::Option<&crate::types::ContactFlowType> {
36        self.contact_flow_type.as_ref()
37    }
38    /// <p>The type of flow.</p>
39    pub fn contact_flow_state(&self) -> ::std::option::Option<&crate::types::ContactFlowState> {
40        self.contact_flow_state.as_ref()
41    }
42    /// <p>The status of the flow.</p>
43    pub fn contact_flow_status(&self) -> ::std::option::Option<&crate::types::ContactFlowStatus> {
44        self.contact_flow_status.as_ref()
45    }
46}
47impl ContactFlowSummary {
48    /// Creates a new builder-style object to manufacture [`ContactFlowSummary`](crate::types::ContactFlowSummary).
49    pub fn builder() -> crate::types::builders::ContactFlowSummaryBuilder {
50        crate::types::builders::ContactFlowSummaryBuilder::default()
51    }
52}
53
54/// A builder for [`ContactFlowSummary`](crate::types::ContactFlowSummary).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct ContactFlowSummaryBuilder {
58    pub(crate) id: ::std::option::Option<::std::string::String>,
59    pub(crate) arn: ::std::option::Option<::std::string::String>,
60    pub(crate) name: ::std::option::Option<::std::string::String>,
61    pub(crate) contact_flow_type: ::std::option::Option<crate::types::ContactFlowType>,
62    pub(crate) contact_flow_state: ::std::option::Option<crate::types::ContactFlowState>,
63    pub(crate) contact_flow_status: ::std::option::Option<crate::types::ContactFlowStatus>,
64}
65impl ContactFlowSummaryBuilder {
66    /// <p>The identifier of the flow.</p>
67    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.id = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The identifier of the flow.</p>
72    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.id = input;
74        self
75    }
76    /// <p>The identifier of the flow.</p>
77    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
78        &self.id
79    }
80    /// <p>The Amazon Resource Name (ARN) of the flow.</p>
81    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.arn = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The Amazon Resource Name (ARN) of the flow.</p>
86    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.arn = input;
88        self
89    }
90    /// <p>The Amazon Resource Name (ARN) of the flow.</p>
91    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
92        &self.arn
93    }
94    /// <p>The name of the flow.</p>
95    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.name = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The name of the flow.</p>
100    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.name = input;
102        self
103    }
104    /// <p>The name of the flow.</p>
105    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
106        &self.name
107    }
108    /// <p>The type of flow.</p>
109    pub fn contact_flow_type(mut self, input: crate::types::ContactFlowType) -> Self {
110        self.contact_flow_type = ::std::option::Option::Some(input);
111        self
112    }
113    /// <p>The type of flow.</p>
114    pub fn set_contact_flow_type(mut self, input: ::std::option::Option<crate::types::ContactFlowType>) -> Self {
115        self.contact_flow_type = input;
116        self
117    }
118    /// <p>The type of flow.</p>
119    pub fn get_contact_flow_type(&self) -> &::std::option::Option<crate::types::ContactFlowType> {
120        &self.contact_flow_type
121    }
122    /// <p>The type of flow.</p>
123    pub fn contact_flow_state(mut self, input: crate::types::ContactFlowState) -> Self {
124        self.contact_flow_state = ::std::option::Option::Some(input);
125        self
126    }
127    /// <p>The type of flow.</p>
128    pub fn set_contact_flow_state(mut self, input: ::std::option::Option<crate::types::ContactFlowState>) -> Self {
129        self.contact_flow_state = input;
130        self
131    }
132    /// <p>The type of flow.</p>
133    pub fn get_contact_flow_state(&self) -> &::std::option::Option<crate::types::ContactFlowState> {
134        &self.contact_flow_state
135    }
136    /// <p>The status of the flow.</p>
137    pub fn contact_flow_status(mut self, input: crate::types::ContactFlowStatus) -> Self {
138        self.contact_flow_status = ::std::option::Option::Some(input);
139        self
140    }
141    /// <p>The status of the flow.</p>
142    pub fn set_contact_flow_status(mut self, input: ::std::option::Option<crate::types::ContactFlowStatus>) -> Self {
143        self.contact_flow_status = input;
144        self
145    }
146    /// <p>The status of the flow.</p>
147    pub fn get_contact_flow_status(&self) -> &::std::option::Option<crate::types::ContactFlowStatus> {
148        &self.contact_flow_status
149    }
150    /// Consumes the builder and constructs a [`ContactFlowSummary`](crate::types::ContactFlowSummary).
151    pub fn build(self) -> crate::types::ContactFlowSummary {
152        crate::types::ContactFlowSummary {
153            id: self.id,
154            arn: self.arn,
155            name: self.name,
156            contact_flow_type: self.contact_flow_type,
157            contact_flow_state: self.contact_flow_state,
158            contact_flow_status: self.contact_flow_status,
159        }
160    }
161}