#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreatePlayerSessionsOutput {
pub player_sessions: ::std::option::Option<::std::vec::Vec<crate::types::PlayerSession>>,
_request_id: Option<String>,
}
impl CreatePlayerSessionsOutput {
pub fn player_sessions(&self) -> &[crate::types::PlayerSession] {
self.player_sessions.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for CreatePlayerSessionsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreatePlayerSessionsOutput {
pub fn builder() -> crate::operation::create_player_sessions::builders::CreatePlayerSessionsOutputBuilder {
crate::operation::create_player_sessions::builders::CreatePlayerSessionsOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreatePlayerSessionsOutputBuilder {
pub(crate) player_sessions: ::std::option::Option<::std::vec::Vec<crate::types::PlayerSession>>,
_request_id: Option<String>,
}
impl CreatePlayerSessionsOutputBuilder {
pub fn player_sessions(mut self, input: crate::types::PlayerSession) -> Self {
let mut v = self.player_sessions.unwrap_or_default();
v.push(input);
self.player_sessions = ::std::option::Option::Some(v);
self
}
pub fn set_player_sessions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlayerSession>>) -> Self {
self.player_sessions = input;
self
}
pub fn get_player_sessions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlayerSession>> {
&self.player_sessions
}
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_player_sessions::CreatePlayerSessionsOutput {
crate::operation::create_player_sessions::CreatePlayerSessionsOutput {
player_sessions: self.player_sessions,
_request_id: self._request_id,
}
}
}