aws_sdk_omics/operation/get_run/
_get_run_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 GetRunInput {
6    /// <p>The run's ID.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>The run's export format.</p>
9    pub export: ::std::option::Option<::std::vec::Vec<crate::types::RunExport>>,
10}
11impl GetRunInput {
12    /// <p>The run's ID.</p>
13    pub fn id(&self) -> ::std::option::Option<&str> {
14        self.id.as_deref()
15    }
16    /// <p>The run's export format.</p>
17    ///
18    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.export.is_none()`.
19    pub fn export(&self) -> &[crate::types::RunExport] {
20        self.export.as_deref().unwrap_or_default()
21    }
22}
23impl GetRunInput {
24    /// Creates a new builder-style object to manufacture [`GetRunInput`](crate::operation::get_run::GetRunInput).
25    pub fn builder() -> crate::operation::get_run::builders::GetRunInputBuilder {
26        crate::operation::get_run::builders::GetRunInputBuilder::default()
27    }
28}
29
30/// A builder for [`GetRunInput`](crate::operation::get_run::GetRunInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct GetRunInputBuilder {
34    pub(crate) id: ::std::option::Option<::std::string::String>,
35    pub(crate) export: ::std::option::Option<::std::vec::Vec<crate::types::RunExport>>,
36}
37impl GetRunInputBuilder {
38    /// <p>The run's ID.</p>
39    /// This field is required.
40    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41        self.id = ::std::option::Option::Some(input.into());
42        self
43    }
44    /// <p>The run's ID.</p>
45    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46        self.id = input;
47        self
48    }
49    /// <p>The run's ID.</p>
50    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
51        &self.id
52    }
53    /// Appends an item to `export`.
54    ///
55    /// To override the contents of this collection use [`set_export`](Self::set_export).
56    ///
57    /// <p>The run's export format.</p>
58    pub fn export(mut self, input: crate::types::RunExport) -> Self {
59        let mut v = self.export.unwrap_or_default();
60        v.push(input);
61        self.export = ::std::option::Option::Some(v);
62        self
63    }
64    /// <p>The run's export format.</p>
65    pub fn set_export(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RunExport>>) -> Self {
66        self.export = input;
67        self
68    }
69    /// <p>The run's export format.</p>
70    pub fn get_export(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RunExport>> {
71        &self.export
72    }
73    /// Consumes the builder and constructs a [`GetRunInput`](crate::operation::get_run::GetRunInput).
74    pub fn build(self) -> ::std::result::Result<crate::operation::get_run::GetRunInput, ::aws_smithy_types::error::operation::BuildError> {
75        ::std::result::Result::Ok(crate::operation::get_run::GetRunInput {
76            id: self.id,
77            export: self.export,
78        })
79    }
80}