aws_sdk_omics/operation/get_reference/
_get_reference_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 GetReferenceInput {
6    /// <p>The reference's ID.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>The reference's store ID.</p>
9    pub reference_store_id: ::std::option::Option<::std::string::String>,
10    /// <p>The range to retrieve.</p>
11    pub range: ::std::option::Option<::std::string::String>,
12    /// <p>The part number to retrieve.</p>
13    pub part_number: ::std::option::Option<i32>,
14    /// <p>The file to retrieve.</p>
15    pub file: ::std::option::Option<crate::types::ReferenceFile>,
16}
17impl GetReferenceInput {
18    /// <p>The reference's ID.</p>
19    pub fn id(&self) -> ::std::option::Option<&str> {
20        self.id.as_deref()
21    }
22    /// <p>The reference's store ID.</p>
23    pub fn reference_store_id(&self) -> ::std::option::Option<&str> {
24        self.reference_store_id.as_deref()
25    }
26    /// <p>The range to retrieve.</p>
27    pub fn range(&self) -> ::std::option::Option<&str> {
28        self.range.as_deref()
29    }
30    /// <p>The part number to retrieve.</p>
31    pub fn part_number(&self) -> ::std::option::Option<i32> {
32        self.part_number
33    }
34    /// <p>The file to retrieve.</p>
35    pub fn file(&self) -> ::std::option::Option<&crate::types::ReferenceFile> {
36        self.file.as_ref()
37    }
38}
39impl GetReferenceInput {
40    /// Creates a new builder-style object to manufacture [`GetReferenceInput`](crate::operation::get_reference::GetReferenceInput).
41    pub fn builder() -> crate::operation::get_reference::builders::GetReferenceInputBuilder {
42        crate::operation::get_reference::builders::GetReferenceInputBuilder::default()
43    }
44}
45
46/// A builder for [`GetReferenceInput`](crate::operation::get_reference::GetReferenceInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct GetReferenceInputBuilder {
50    pub(crate) id: ::std::option::Option<::std::string::String>,
51    pub(crate) reference_store_id: ::std::option::Option<::std::string::String>,
52    pub(crate) range: ::std::option::Option<::std::string::String>,
53    pub(crate) part_number: ::std::option::Option<i32>,
54    pub(crate) file: ::std::option::Option<crate::types::ReferenceFile>,
55}
56impl GetReferenceInputBuilder {
57    /// <p>The reference's ID.</p>
58    /// This field is required.
59    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The reference's ID.</p>
64    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.id = input;
66        self
67    }
68    /// <p>The reference's ID.</p>
69    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.id
71    }
72    /// <p>The reference's store ID.</p>
73    /// This field is required.
74    pub fn reference_store_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.reference_store_id = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The reference's store ID.</p>
79    pub fn set_reference_store_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.reference_store_id = input;
81        self
82    }
83    /// <p>The reference's store ID.</p>
84    pub fn get_reference_store_id(&self) -> &::std::option::Option<::std::string::String> {
85        &self.reference_store_id
86    }
87    /// <p>The range to retrieve.</p>
88    pub fn range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.range = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>The range to retrieve.</p>
93    pub fn set_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.range = input;
95        self
96    }
97    /// <p>The range to retrieve.</p>
98    pub fn get_range(&self) -> &::std::option::Option<::std::string::String> {
99        &self.range
100    }
101    /// <p>The part number to retrieve.</p>
102    /// This field is required.
103    pub fn part_number(mut self, input: i32) -> Self {
104        self.part_number = ::std::option::Option::Some(input);
105        self
106    }
107    /// <p>The part number to retrieve.</p>
108    pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
109        self.part_number = input;
110        self
111    }
112    /// <p>The part number to retrieve.</p>
113    pub fn get_part_number(&self) -> &::std::option::Option<i32> {
114        &self.part_number
115    }
116    /// <p>The file to retrieve.</p>
117    pub fn file(mut self, input: crate::types::ReferenceFile) -> Self {
118        self.file = ::std::option::Option::Some(input);
119        self
120    }
121    /// <p>The file to retrieve.</p>
122    pub fn set_file(mut self, input: ::std::option::Option<crate::types::ReferenceFile>) -> Self {
123        self.file = input;
124        self
125    }
126    /// <p>The file to retrieve.</p>
127    pub fn get_file(&self) -> &::std::option::Option<crate::types::ReferenceFile> {
128        &self.file
129    }
130    /// Consumes the builder and constructs a [`GetReferenceInput`](crate::operation::get_reference::GetReferenceInput).
131    pub fn build(
132        self,
133    ) -> ::std::result::Result<crate::operation::get_reference::GetReferenceInput, ::aws_smithy_types::error::operation::BuildError> {
134        ::std::result::Result::Ok(crate::operation::get_reference::GetReferenceInput {
135            id: self.id,
136            reference_store_id: self.reference_store_id,
137            range: self.range,
138            part_number: self.part_number,
139            file: self.file,
140        })
141    }
142}