#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreatePlayerSessionsOutput {
#[doc(hidden)]
pub player_sessions: std::option::Option<std::vec::Vec<crate::types::PlayerSession>>,
_request_id: Option<String>,
}
impl CreatePlayerSessionsOutput {
pub fn player_sessions(&self) -> std::option::Option<&[crate::types::PlayerSession]> {
self.player_sessions.as_deref()
}
}
impl aws_http::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()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
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 = 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(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,
}
}
}