Skip to main content

aws_sdk_omics/operation/create_workflow/
_create_workflow_output.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 CreateWorkflowOutput {
6    /// <p>The workflow's ARN.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>The workflow's ID.</p>
9    pub id: ::std::option::Option<::std::string::String>,
10    /// <p>The workflow's status.</p>
11    pub status: ::std::option::Option<crate::types::WorkflowStatus>,
12    /// <p>The workflow's tags.</p>
13    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
14    /// <p>The universally unique identifier (UUID) value for this workflow.</p>
15    pub uuid: ::std::option::Option<::std::string::String>,
16    _request_id: Option<String>,
17}
18impl CreateWorkflowOutput {
19    /// <p>The workflow's ARN.</p>
20    pub fn arn(&self) -> ::std::option::Option<&str> {
21        self.arn.as_deref()
22    }
23    /// <p>The workflow's ID.</p>
24    pub fn id(&self) -> ::std::option::Option<&str> {
25        self.id.as_deref()
26    }
27    /// <p>The workflow's status.</p>
28    pub fn status(&self) -> ::std::option::Option<&crate::types::WorkflowStatus> {
29        self.status.as_ref()
30    }
31    /// <p>The workflow's tags.</p>
32    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
33        self.tags.as_ref()
34    }
35    /// <p>The universally unique identifier (UUID) value for this workflow.</p>
36    pub fn uuid(&self) -> ::std::option::Option<&str> {
37        self.uuid.as_deref()
38    }
39}
40impl ::aws_types::request_id::RequestId for CreateWorkflowOutput {
41    fn request_id(&self) -> Option<&str> {
42        self._request_id.as_deref()
43    }
44}
45impl CreateWorkflowOutput {
46    /// Creates a new builder-style object to manufacture [`CreateWorkflowOutput`](crate::operation::create_workflow::CreateWorkflowOutput).
47    pub fn builder() -> crate::operation::create_workflow::builders::CreateWorkflowOutputBuilder {
48        crate::operation::create_workflow::builders::CreateWorkflowOutputBuilder::default()
49    }
50}
51
52/// A builder for [`CreateWorkflowOutput`](crate::operation::create_workflow::CreateWorkflowOutput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct CreateWorkflowOutputBuilder {
56    pub(crate) arn: ::std::option::Option<::std::string::String>,
57    pub(crate) id: ::std::option::Option<::std::string::String>,
58    pub(crate) status: ::std::option::Option<crate::types::WorkflowStatus>,
59    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
60    pub(crate) uuid: ::std::option::Option<::std::string::String>,
61    _request_id: Option<String>,
62}
63impl CreateWorkflowOutputBuilder {
64    /// <p>The workflow's ARN.</p>
65    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.arn = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The workflow's ARN.</p>
70    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.arn = input;
72        self
73    }
74    /// <p>The workflow's ARN.</p>
75    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
76        &self.arn
77    }
78    /// <p>The workflow's ID.</p>
79    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.id = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The workflow's ID.</p>
84    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.id = input;
86        self
87    }
88    /// <p>The workflow's ID.</p>
89    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
90        &self.id
91    }
92    /// <p>The workflow's status.</p>
93    pub fn status(mut self, input: crate::types::WorkflowStatus) -> Self {
94        self.status = ::std::option::Option::Some(input);
95        self
96    }
97    /// <p>The workflow's status.</p>
98    pub fn set_status(mut self, input: ::std::option::Option<crate::types::WorkflowStatus>) -> Self {
99        self.status = input;
100        self
101    }
102    /// <p>The workflow's status.</p>
103    pub fn get_status(&self) -> &::std::option::Option<crate::types::WorkflowStatus> {
104        &self.status
105    }
106    /// Adds a key-value pair to `tags`.
107    ///
108    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
109    ///
110    /// <p>The workflow's tags.</p>
111    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
112        let mut hash_map = self.tags.unwrap_or_default();
113        hash_map.insert(k.into(), v.into());
114        self.tags = ::std::option::Option::Some(hash_map);
115        self
116    }
117    /// <p>The workflow's tags.</p>
118    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
119        self.tags = input;
120        self
121    }
122    /// <p>The workflow's tags.</p>
123    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
124        &self.tags
125    }
126    /// <p>The universally unique identifier (UUID) value for this workflow.</p>
127    pub fn uuid(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.uuid = ::std::option::Option::Some(input.into());
129        self
130    }
131    /// <p>The universally unique identifier (UUID) value for this workflow.</p>
132    pub fn set_uuid(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.uuid = input;
134        self
135    }
136    /// <p>The universally unique identifier (UUID) value for this workflow.</p>
137    pub fn get_uuid(&self) -> &::std::option::Option<::std::string::String> {
138        &self.uuid
139    }
140    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
141        self._request_id = Some(request_id.into());
142        self
143    }
144
145    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
146        self._request_id = request_id;
147        self
148    }
149    /// Consumes the builder and constructs a [`CreateWorkflowOutput`](crate::operation::create_workflow::CreateWorkflowOutput).
150    pub fn build(self) -> crate::operation::create_workflow::CreateWorkflowOutput {
151        crate::operation::create_workflow::CreateWorkflowOutput {
152            arn: self.arn,
153            id: self.id,
154            status: self.status,
155            tags: self.tags,
156            uuid: self.uuid,
157            _request_id: self._request_id,
158        }
159    }
160}