aws_sdk_elementalinference/operation/get_fixture/
_get_fixture_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetFixtureOutput {
6 pub fixture_id: ::std::string::String,
8 pub name: ::std::string::String,
10 pub fixture_group: ::std::option::Option<::std::string::String>,
12 pub scheduled_start: ::std::option::Option<::aws_smithy_types::DateTime>,
14 pub status: ::std::string::String,
16 pub competitors: ::std::vec::Vec<crate::types::Competitor>,
18 _request_id: Option<String>,
19}
20impl GetFixtureOutput {
21 pub fn fixture_id(&self) -> &str {
23 use std::ops::Deref;
24 self.fixture_id.deref()
25 }
26 pub fn name(&self) -> &str {
28 use std::ops::Deref;
29 self.name.deref()
30 }
31 pub fn fixture_group(&self) -> ::std::option::Option<&str> {
33 self.fixture_group.as_deref()
34 }
35 pub fn scheduled_start(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
37 self.scheduled_start.as_ref()
38 }
39 pub fn status(&self) -> &str {
41 use std::ops::Deref;
42 self.status.deref()
43 }
44 pub fn competitors(&self) -> &[crate::types::Competitor] {
46 use std::ops::Deref;
47 self.competitors.deref()
48 }
49}
50impl ::aws_types::request_id::RequestId for GetFixtureOutput {
51 fn request_id(&self) -> Option<&str> {
52 self._request_id.as_deref()
53 }
54}
55impl GetFixtureOutput {
56 pub fn builder() -> crate::operation::get_fixture::builders::GetFixtureOutputBuilder {
58 crate::operation::get_fixture::builders::GetFixtureOutputBuilder::default()
59 }
60}
61
62#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
64#[non_exhaustive]
65pub struct GetFixtureOutputBuilder {
66 pub(crate) fixture_id: ::std::option::Option<::std::string::String>,
67 pub(crate) name: ::std::option::Option<::std::string::String>,
68 pub(crate) fixture_group: ::std::option::Option<::std::string::String>,
69 pub(crate) scheduled_start: ::std::option::Option<::aws_smithy_types::DateTime>,
70 pub(crate) status: ::std::option::Option<::std::string::String>,
71 pub(crate) competitors: ::std::option::Option<::std::vec::Vec<crate::types::Competitor>>,
72 _request_id: Option<String>,
73}
74impl GetFixtureOutputBuilder {
75 pub fn fixture_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78 self.fixture_id = ::std::option::Option::Some(input.into());
79 self
80 }
81 pub fn set_fixture_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83 self.fixture_id = input;
84 self
85 }
86 pub fn get_fixture_id(&self) -> &::std::option::Option<::std::string::String> {
88 &self.fixture_id
89 }
90 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93 self.name = ::std::option::Option::Some(input.into());
94 self
95 }
96 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98 self.name = input;
99 self
100 }
101 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
103 &self.name
104 }
105 pub fn fixture_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107 self.fixture_group = ::std::option::Option::Some(input.into());
108 self
109 }
110 pub fn set_fixture_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112 self.fixture_group = input;
113 self
114 }
115 pub fn get_fixture_group(&self) -> &::std::option::Option<::std::string::String> {
117 &self.fixture_group
118 }
119 pub fn scheduled_start(mut self, input: ::aws_smithy_types::DateTime) -> Self {
121 self.scheduled_start = ::std::option::Option::Some(input);
122 self
123 }
124 pub fn set_scheduled_start(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
126 self.scheduled_start = input;
127 self
128 }
129 pub fn get_scheduled_start(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
131 &self.scheduled_start
132 }
133 pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136 self.status = ::std::option::Option::Some(input.into());
137 self
138 }
139 pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.status = input;
142 self
143 }
144 pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
146 &self.status
147 }
148 pub fn competitors(mut self, input: crate::types::Competitor) -> Self {
154 let mut v = self.competitors.unwrap_or_default();
155 v.push(input);
156 self.competitors = ::std::option::Option::Some(v);
157 self
158 }
159 pub fn set_competitors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Competitor>>) -> Self {
161 self.competitors = input;
162 self
163 }
164 pub fn get_competitors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Competitor>> {
166 &self.competitors
167 }
168 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
169 self._request_id = Some(request_id.into());
170 self
171 }
172
173 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
174 self._request_id = request_id;
175 self
176 }
177 pub fn build(self) -> ::std::result::Result<crate::operation::get_fixture::GetFixtureOutput, ::aws_smithy_types::error::operation::BuildError> {
184 ::std::result::Result::Ok(crate::operation::get_fixture::GetFixtureOutput {
185 fixture_id: self.fixture_id.ok_or_else(|| {
186 ::aws_smithy_types::error::operation::BuildError::missing_field(
187 "fixture_id",
188 "fixture_id was not specified but it is required when building GetFixtureOutput",
189 )
190 })?,
191 name: self.name.ok_or_else(|| {
192 ::aws_smithy_types::error::operation::BuildError::missing_field(
193 "name",
194 "name was not specified but it is required when building GetFixtureOutput",
195 )
196 })?,
197 fixture_group: self.fixture_group,
198 scheduled_start: self.scheduled_start,
199 status: self.status.ok_or_else(|| {
200 ::aws_smithy_types::error::operation::BuildError::missing_field(
201 "status",
202 "status was not specified but it is required when building GetFixtureOutput",
203 )
204 })?,
205 competitors: self.competitors.ok_or_else(|| {
206 ::aws_smithy_types::error::operation::BuildError::missing_field(
207 "competitors",
208 "competitors was not specified but it is required when building GetFixtureOutput",
209 )
210 })?,
211 _request_id: self._request_id,
212 })
213 }
214}