#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateStageOutput {
pub stage: ::std::option::Option<crate::types::Stage>,
pub participant_tokens: ::std::option::Option<::std::vec::Vec<crate::types::ParticipantToken>>,
_request_id: Option<String>,
}
impl CreateStageOutput {
pub fn stage(&self) -> ::std::option::Option<&crate::types::Stage> {
self.stage.as_ref()
}
pub fn participant_tokens(&self) -> &[crate::types::ParticipantToken] {
self.participant_tokens.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for CreateStageOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateStageOutput {
pub fn builder() -> crate::operation::create_stage::builders::CreateStageOutputBuilder {
crate::operation::create_stage::builders::CreateStageOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateStageOutputBuilder {
pub(crate) stage: ::std::option::Option<crate::types::Stage>,
pub(crate) participant_tokens: ::std::option::Option<::std::vec::Vec<crate::types::ParticipantToken>>,
_request_id: Option<String>,
}
impl CreateStageOutputBuilder {
pub fn stage(mut self, input: crate::types::Stage) -> Self {
self.stage = ::std::option::Option::Some(input);
self
}
pub fn set_stage(mut self, input: ::std::option::Option<crate::types::Stage>) -> Self {
self.stage = input;
self
}
pub fn get_stage(&self) -> &::std::option::Option<crate::types::Stage> {
&self.stage
}
pub fn participant_tokens(mut self, input: crate::types::ParticipantToken) -> Self {
let mut v = self.participant_tokens.unwrap_or_default();
v.push(input);
self.participant_tokens = ::std::option::Option::Some(v);
self
}
pub fn set_participant_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParticipantToken>>) -> Self {
self.participant_tokens = input;
self
}
pub fn get_participant_tokens(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParticipantToken>> {
&self.participant_tokens
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::create_stage::CreateStageOutput {
crate::operation::create_stage::CreateStageOutput {
stage: self.stage,
participant_tokens: self.participant_tokens,
_request_id: self._request_id,
}
}
}