1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A game session's properties plus the protection policy currently in force.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GameSessionDetail {
/// <p>Object that describes a game session.</p>
pub game_session: ::std::option::Option<crate::types::GameSession>,
/// <p>Current status of protection for the game session.</p>
/// <ul>
/// <li>
/// <p><b>NoProtection</b> -- The game session can be terminated during a scale-down event.</p></li>
/// <li>
/// <p><b>FullProtection</b> -- If the game session is in an <code>ACTIVE</code> status, it cannot be terminated during a scale-down event.</p></li>
/// </ul>
pub protection_policy: ::std::option::Option<crate::types::ProtectionPolicy>,
}
impl GameSessionDetail {
/// <p>Object that describes a game session.</p>
pub fn game_session(&self) -> ::std::option::Option<&crate::types::GameSession> {
self.game_session.as_ref()
}
/// <p>Current status of protection for the game session.</p>
/// <ul>
/// <li>
/// <p><b>NoProtection</b> -- The game session can be terminated during a scale-down event.</p></li>
/// <li>
/// <p><b>FullProtection</b> -- If the game session is in an <code>ACTIVE</code> status, it cannot be terminated during a scale-down event.</p></li>
/// </ul>
pub fn protection_policy(&self) -> ::std::option::Option<&crate::types::ProtectionPolicy> {
self.protection_policy.as_ref()
}
}
impl GameSessionDetail {
/// Creates a new builder-style object to manufacture [`GameSessionDetail`](crate::types::GameSessionDetail).
pub fn builder() -> crate::types::builders::GameSessionDetailBuilder {
crate::types::builders::GameSessionDetailBuilder::default()
}
}
/// A builder for [`GameSessionDetail`](crate::types::GameSessionDetail).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GameSessionDetailBuilder {
pub(crate) game_session: ::std::option::Option<crate::types::GameSession>,
pub(crate) protection_policy: ::std::option::Option<crate::types::ProtectionPolicy>,
}
impl GameSessionDetailBuilder {
/// <p>Object that describes a game session.</p>
pub fn game_session(mut self, input: crate::types::GameSession) -> Self {
self.game_session = ::std::option::Option::Some(input);
self
}
/// <p>Object that describes a game session.</p>
pub fn set_game_session(mut self, input: ::std::option::Option<crate::types::GameSession>) -> Self {
self.game_session = input;
self
}
/// <p>Object that describes a game session.</p>
pub fn get_game_session(&self) -> &::std::option::Option<crate::types::GameSession> {
&self.game_session
}
/// <p>Current status of protection for the game session.</p>
/// <ul>
/// <li>
/// <p><b>NoProtection</b> -- The game session can be terminated during a scale-down event.</p></li>
/// <li>
/// <p><b>FullProtection</b> -- If the game session is in an <code>ACTIVE</code> status, it cannot be terminated during a scale-down event.</p></li>
/// </ul>
pub fn protection_policy(mut self, input: crate::types::ProtectionPolicy) -> Self {
self.protection_policy = ::std::option::Option::Some(input);
self
}
/// <p>Current status of protection for the game session.</p>
/// <ul>
/// <li>
/// <p><b>NoProtection</b> -- The game session can be terminated during a scale-down event.</p></li>
/// <li>
/// <p><b>FullProtection</b> -- If the game session is in an <code>ACTIVE</code> status, it cannot be terminated during a scale-down event.</p></li>
/// </ul>
pub fn set_protection_policy(mut self, input: ::std::option::Option<crate::types::ProtectionPolicy>) -> Self {
self.protection_policy = input;
self
}
/// <p>Current status of protection for the game session.</p>
/// <ul>
/// <li>
/// <p><b>NoProtection</b> -- The game session can be terminated during a scale-down event.</p></li>
/// <li>
/// <p><b>FullProtection</b> -- If the game session is in an <code>ACTIVE</code> status, it cannot be terminated during a scale-down event.</p></li>
/// </ul>
pub fn get_protection_policy(&self) -> &::std::option::Option<crate::types::ProtectionPolicy> {
&self.protection_policy
}
/// Consumes the builder and constructs a [`GameSessionDetail`](crate::types::GameSessionDetail).
pub fn build(self) -> crate::types::GameSessionDetail {
crate::types::GameSessionDetail {
game_session: self.game_session,
protection_policy: self.protection_policy,
}
}
}