#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RegionInfo {
pub region_id: std::option::Option<std::string::String>,
pub provider_display_name: std::option::Option<std::string::String>,
pub region_display_name: std::option::Option<std::string::String>,
pub datacenter_coord: std::option::Option<crate::model::Coord>,
pub datacenter_distance_from_client: std::option::Option<crate::model::Distance>,
}
impl RegionInfo {
pub fn region_id(&self) -> std::option::Option<&str> {
self.region_id.as_deref()
}
pub fn provider_display_name(&self) -> std::option::Option<&str> {
self.provider_display_name.as_deref()
}
pub fn region_display_name(&self) -> std::option::Option<&str> {
self.region_display_name.as_deref()
}
pub fn datacenter_coord(&self) -> std::option::Option<&crate::model::Coord> {
self.datacenter_coord.as_ref()
}
pub fn datacenter_distance_from_client(&self) -> std::option::Option<&crate::model::Distance> {
self.datacenter_distance_from_client.as_ref()
}
}
impl std::fmt::Debug for RegionInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RegionInfo");
formatter.field("region_id", &self.region_id);
formatter.field("provider_display_name", &self.provider_display_name);
formatter.field("region_display_name", &self.region_display_name);
formatter.field("datacenter_coord", &self.datacenter_coord);
formatter.field(
"datacenter_distance_from_client",
&self.datacenter_distance_from_client,
);
formatter.finish()
}
}
pub mod region_info {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) region_id: std::option::Option<std::string::String>,
pub(crate) provider_display_name: std::option::Option<std::string::String>,
pub(crate) region_display_name: std::option::Option<std::string::String>,
pub(crate) datacenter_coord: std::option::Option<crate::model::Coord>,
pub(crate) datacenter_distance_from_client: std::option::Option<crate::model::Distance>,
}
impl Builder {
pub fn region_id(mut self, input: impl Into<std::string::String>) -> Self {
self.region_id = Some(input.into());
self
}
pub fn set_region_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.region_id = input;
self
}
pub fn provider_display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.provider_display_name = Some(input.into());
self
}
pub fn set_provider_display_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.provider_display_name = input;
self
}
pub fn region_display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.region_display_name = Some(input.into());
self
}
pub fn set_region_display_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.region_display_name = input;
self
}
pub fn datacenter_coord(mut self, input: crate::model::Coord) -> Self {
self.datacenter_coord = Some(input);
self
}
pub fn set_datacenter_coord(
mut self,
input: std::option::Option<crate::model::Coord>,
) -> Self {
self.datacenter_coord = input;
self
}
pub fn datacenter_distance_from_client(mut self, input: crate::model::Distance) -> Self {
self.datacenter_distance_from_client = Some(input);
self
}
pub fn set_datacenter_distance_from_client(
mut self,
input: std::option::Option<crate::model::Distance>,
) -> Self {
self.datacenter_distance_from_client = input;
self
}
pub fn build(self) -> crate::model::RegionInfo {
crate::model::RegionInfo {
region_id: self.region_id,
provider_display_name: self.provider_display_name,
region_display_name: self.region_display_name,
datacenter_coord: self.datacenter_coord,
datacenter_distance_from_client: self.datacenter_distance_from_client,
}
}
}
}
impl RegionInfo {
pub fn builder() -> crate::model::region_info::Builder {
crate::model::region_info::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Distance {
#[allow(missing_docs)] pub kilometers: std::option::Option<f64>,
#[allow(missing_docs)] pub miles: std::option::Option<f64>,
}
impl Distance {
#[allow(missing_docs)] pub fn kilometers(&self) -> std::option::Option<f64> {
self.kilometers
}
#[allow(missing_docs)] pub fn miles(&self) -> std::option::Option<f64> {
self.miles
}
}
impl std::fmt::Debug for Distance {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Distance");
formatter.field("kilometers", &self.kilometers);
formatter.field("miles", &self.miles);
formatter.finish()
}
}
pub mod distance {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) kilometers: std::option::Option<f64>,
pub(crate) miles: std::option::Option<f64>,
}
impl Builder {
#[allow(missing_docs)] pub fn kilometers(mut self, input: f64) -> Self {
self.kilometers = Some(input);
self
}
#[allow(missing_docs)] pub fn set_kilometers(mut self, input: std::option::Option<f64>) -> Self {
self.kilometers = input;
self
}
#[allow(missing_docs)] pub fn miles(mut self, input: f64) -> Self {
self.miles = Some(input);
self
}
#[allow(missing_docs)] pub fn set_miles(mut self, input: std::option::Option<f64>) -> Self {
self.miles = input;
self
}
pub fn build(self) -> crate::model::Distance {
crate::model::Distance {
kilometers: self.kilometers,
miles: self.miles,
}
}
}
}
impl Distance {
pub fn builder() -> crate::model::distance::Builder {
crate::model::distance::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Coord {
#[allow(missing_docs)] pub latitude: std::option::Option<f64>,
#[allow(missing_docs)] pub longitude: std::option::Option<f64>,
}
impl Coord {
#[allow(missing_docs)] pub fn latitude(&self) -> std::option::Option<f64> {
self.latitude
}
#[allow(missing_docs)] pub fn longitude(&self) -> std::option::Option<f64> {
self.longitude
}
}
impl std::fmt::Debug for Coord {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Coord");
formatter.field("latitude", &self.latitude);
formatter.field("longitude", &self.longitude);
formatter.finish()
}
}
pub mod coord {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) latitude: std::option::Option<f64>,
pub(crate) longitude: std::option::Option<f64>,
}
impl Builder {
#[allow(missing_docs)] pub fn latitude(mut self, input: f64) -> Self {
self.latitude = Some(input);
self
}
#[allow(missing_docs)] pub fn set_latitude(mut self, input: std::option::Option<f64>) -> Self {
self.latitude = input;
self
}
#[allow(missing_docs)] pub fn longitude(mut self, input: f64) -> Self {
self.longitude = Some(input);
self
}
#[allow(missing_docs)] pub fn set_longitude(mut self, input: std::option::Option<f64>) -> Self {
self.longitude = input;
self
}
pub fn build(self) -> crate::model::Coord {
crate::model::Coord {
latitude: self.latitude,
longitude: self.longitude,
}
}
}
}
impl Coord {
pub fn builder() -> crate::model::coord::Builder {
crate::model::coord::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LobbyInfo {
#[allow(missing_docs)] pub region_id: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub game_mode_id: std::option::Option<std::string::String>,
pub lobby_id: std::option::Option<std::string::String>,
pub max_players_normal: std::option::Option<i32>,
pub max_players_direct: std::option::Option<i32>,
pub max_players_party: std::option::Option<i32>,
pub total_player_count: std::option::Option<i32>,
}
impl LobbyInfo {
#[allow(missing_docs)] pub fn region_id(&self) -> std::option::Option<&str> {
self.region_id.as_deref()
}
#[allow(missing_docs)] pub fn game_mode_id(&self) -> std::option::Option<&str> {
self.game_mode_id.as_deref()
}
pub fn lobby_id(&self) -> std::option::Option<&str> {
self.lobby_id.as_deref()
}
pub fn max_players_normal(&self) -> std::option::Option<i32> {
self.max_players_normal
}
pub fn max_players_direct(&self) -> std::option::Option<i32> {
self.max_players_direct
}
pub fn max_players_party(&self) -> std::option::Option<i32> {
self.max_players_party
}
pub fn total_player_count(&self) -> std::option::Option<i32> {
self.total_player_count
}
}
impl std::fmt::Debug for LobbyInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LobbyInfo");
formatter.field("region_id", &self.region_id);
formatter.field("game_mode_id", &self.game_mode_id);
formatter.field("lobby_id", &self.lobby_id);
formatter.field("max_players_normal", &self.max_players_normal);
formatter.field("max_players_direct", &self.max_players_direct);
formatter.field("max_players_party", &self.max_players_party);
formatter.field("total_player_count", &self.total_player_count);
formatter.finish()
}
}
pub mod lobby_info {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) region_id: std::option::Option<std::string::String>,
pub(crate) game_mode_id: std::option::Option<std::string::String>,
pub(crate) lobby_id: std::option::Option<std::string::String>,
pub(crate) max_players_normal: std::option::Option<i32>,
pub(crate) max_players_direct: std::option::Option<i32>,
pub(crate) max_players_party: std::option::Option<i32>,
pub(crate) total_player_count: std::option::Option<i32>,
}
impl Builder {
#[allow(missing_docs)] pub fn region_id(mut self, input: impl Into<std::string::String>) -> Self {
self.region_id = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_region_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.region_id = input;
self
}
#[allow(missing_docs)] pub fn game_mode_id(mut self, input: impl Into<std::string::String>) -> Self {
self.game_mode_id = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_game_mode_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.game_mode_id = input;
self
}
pub fn lobby_id(mut self, input: impl Into<std::string::String>) -> Self {
self.lobby_id = Some(input.into());
self
}
pub fn set_lobby_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.lobby_id = input;
self
}
pub fn max_players_normal(mut self, input: i32) -> Self {
self.max_players_normal = Some(input);
self
}
pub fn set_max_players_normal(mut self, input: std::option::Option<i32>) -> Self {
self.max_players_normal = input;
self
}
pub fn max_players_direct(mut self, input: i32) -> Self {
self.max_players_direct = Some(input);
self
}
pub fn set_max_players_direct(mut self, input: std::option::Option<i32>) -> Self {
self.max_players_direct = input;
self
}
pub fn max_players_party(mut self, input: i32) -> Self {
self.max_players_party = Some(input);
self
}
pub fn set_max_players_party(mut self, input: std::option::Option<i32>) -> Self {
self.max_players_party = input;
self
}
pub fn total_player_count(mut self, input: i32) -> Self {
self.total_player_count = Some(input);
self
}
pub fn set_total_player_count(mut self, input: std::option::Option<i32>) -> Self {
self.total_player_count = input;
self
}
pub fn build(self) -> crate::model::LobbyInfo {
crate::model::LobbyInfo {
region_id: self.region_id,
game_mode_id: self.game_mode_id,
lobby_id: self.lobby_id,
max_players_normal: self.max_players_normal,
max_players_direct: self.max_players_direct,
max_players_party: self.max_players_party,
total_player_count: self.total_player_count,
}
}
}
}
impl LobbyInfo {
pub fn builder() -> crate::model::lobby_info::Builder {
crate::model::lobby_info::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GameModeInfo {
pub game_mode_id: std::option::Option<std::string::String>,
}
impl GameModeInfo {
pub fn game_mode_id(&self) -> std::option::Option<&str> {
self.game_mode_id.as_deref()
}
}
impl std::fmt::Debug for GameModeInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GameModeInfo");
formatter.field("game_mode_id", &self.game_mode_id);
formatter.finish()
}
}
pub mod game_mode_info {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) game_mode_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn game_mode_id(mut self, input: impl Into<std::string::String>) -> Self {
self.game_mode_id = Some(input.into());
self
}
pub fn set_game_mode_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.game_mode_id = input;
self
}
pub fn build(self) -> crate::model::GameModeInfo {
crate::model::GameModeInfo {
game_mode_id: self.game_mode_id,
}
}
}
}
impl GameModeInfo {
pub fn builder() -> crate::model::game_mode_info::Builder {
crate::model::game_mode_info::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MatchmakerLobbyJoinInfo {
pub lobby_id: std::option::Option<std::string::String>,
pub region: std::option::Option<crate::model::MatchmakerLobbyJoinInfoRegion>,
pub ports: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::MatchmakerLobbyJoinInfoPort>,
>,
pub player: std::option::Option<crate::model::MatchmakerLobbyJoinInfoPlayer>,
}
impl MatchmakerLobbyJoinInfo {
pub fn lobby_id(&self) -> std::option::Option<&str> {
self.lobby_id.as_deref()
}
pub fn region(&self) -> std::option::Option<&crate::model::MatchmakerLobbyJoinInfoRegion> {
self.region.as_ref()
}
pub fn ports(
&self,
) -> std::option::Option<
&std::collections::HashMap<std::string::String, crate::model::MatchmakerLobbyJoinInfoPort>,
> {
self.ports.as_ref()
}
pub fn player(&self) -> std::option::Option<&crate::model::MatchmakerLobbyJoinInfoPlayer> {
self.player.as_ref()
}
}
impl std::fmt::Debug for MatchmakerLobbyJoinInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MatchmakerLobbyJoinInfo");
formatter.field("lobby_id", &self.lobby_id);
formatter.field("region", &self.region);
formatter.field("ports", &self.ports);
formatter.field("player", &self.player);
formatter.finish()
}
}
pub mod matchmaker_lobby_join_info {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) lobby_id: std::option::Option<std::string::String>,
pub(crate) region: std::option::Option<crate::model::MatchmakerLobbyJoinInfoRegion>,
pub(crate) ports: std::option::Option<
std::collections::HashMap<
std::string::String,
crate::model::MatchmakerLobbyJoinInfoPort,
>,
>,
pub(crate) player: std::option::Option<crate::model::MatchmakerLobbyJoinInfoPlayer>,
}
impl Builder {
pub fn lobby_id(mut self, input: impl Into<std::string::String>) -> Self {
self.lobby_id = Some(input.into());
self
}
pub fn set_lobby_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.lobby_id = input;
self
}
pub fn region(mut self, input: crate::model::MatchmakerLobbyJoinInfoRegion) -> Self {
self.region = Some(input);
self
}
pub fn set_region(
mut self,
input: std::option::Option<crate::model::MatchmakerLobbyJoinInfoRegion>,
) -> Self {
self.region = input;
self
}
pub fn ports(
mut self,
k: impl Into<std::string::String>,
v: crate::model::MatchmakerLobbyJoinInfoPort,
) -> Self {
let mut hash_map = self.ports.unwrap_or_default();
hash_map.insert(k.into(), v);
self.ports = Some(hash_map);
self
}
pub fn set_ports(
mut self,
input: std::option::Option<
std::collections::HashMap<
std::string::String,
crate::model::MatchmakerLobbyJoinInfoPort,
>,
>,
) -> Self {
self.ports = input;
self
}
pub fn player(mut self, input: crate::model::MatchmakerLobbyJoinInfoPlayer) -> Self {
self.player = Some(input);
self
}
pub fn set_player(
mut self,
input: std::option::Option<crate::model::MatchmakerLobbyJoinInfoPlayer>,
) -> Self {
self.player = input;
self
}
pub fn build(self) -> crate::model::MatchmakerLobbyJoinInfo {
crate::model::MatchmakerLobbyJoinInfo {
lobby_id: self.lobby_id,
region: self.region,
ports: self.ports,
player: self.player,
}
}
}
}
impl MatchmakerLobbyJoinInfo {
pub fn builder() -> crate::model::matchmaker_lobby_join_info::Builder {
crate::model::matchmaker_lobby_join_info::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MatchmakerLobbyJoinInfoPlayer {
pub token: std::option::Option<std::string::String>,
}
impl MatchmakerLobbyJoinInfoPlayer {
pub fn token(&self) -> std::option::Option<&str> {
self.token.as_deref()
}
}
impl std::fmt::Debug for MatchmakerLobbyJoinInfoPlayer {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MatchmakerLobbyJoinInfoPlayer");
formatter.field("token", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
pub mod matchmaker_lobby_join_info_player {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn token(mut self, input: impl Into<std::string::String>) -> Self {
self.token = Some(input.into());
self
}
pub fn set_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.token = input;
self
}
pub fn build(self) -> crate::model::MatchmakerLobbyJoinInfoPlayer {
crate::model::MatchmakerLobbyJoinInfoPlayer { token: self.token }
}
}
}
impl MatchmakerLobbyJoinInfoPlayer {
pub fn builder() -> crate::model::matchmaker_lobby_join_info_player::Builder {
crate::model::matchmaker_lobby_join_info_player::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MatchmakerLobbyJoinInfoPort {
pub host: std::option::Option<std::string::String>,
pub hostname: std::option::Option<std::string::String>,
pub port: std::option::Option<i32>,
pub is_tls: std::option::Option<bool>,
}
impl MatchmakerLobbyJoinInfoPort {
pub fn host(&self) -> std::option::Option<&str> {
self.host.as_deref()
}
pub fn hostname(&self) -> std::option::Option<&str> {
self.hostname.as_deref()
}
pub fn port(&self) -> std::option::Option<i32> {
self.port
}
pub fn is_tls(&self) -> std::option::Option<bool> {
self.is_tls
}
}
impl std::fmt::Debug for MatchmakerLobbyJoinInfoPort {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MatchmakerLobbyJoinInfoPort");
formatter.field("host", &self.host);
formatter.field("hostname", &self.hostname);
formatter.field("port", &self.port);
formatter.field("is_tls", &self.is_tls);
formatter.finish()
}
}
pub mod matchmaker_lobby_join_info_port {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) host: std::option::Option<std::string::String>,
pub(crate) hostname: std::option::Option<std::string::String>,
pub(crate) port: std::option::Option<i32>,
pub(crate) is_tls: std::option::Option<bool>,
}
impl Builder {
pub fn host(mut self, input: impl Into<std::string::String>) -> Self {
self.host = Some(input.into());
self
}
pub fn set_host(mut self, input: std::option::Option<std::string::String>) -> Self {
self.host = input;
self
}
pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
self.hostname = Some(input.into());
self
}
pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
self.hostname = input;
self
}
pub fn port(mut self, input: i32) -> Self {
self.port = Some(input);
self
}
pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
self.port = input;
self
}
pub fn is_tls(mut self, input: bool) -> Self {
self.is_tls = Some(input);
self
}
pub fn set_is_tls(mut self, input: std::option::Option<bool>) -> Self {
self.is_tls = input;
self
}
pub fn build(self) -> crate::model::MatchmakerLobbyJoinInfoPort {
crate::model::MatchmakerLobbyJoinInfoPort {
host: self.host,
hostname: self.hostname,
port: self.port,
is_tls: self.is_tls,
}
}
}
}
impl MatchmakerLobbyJoinInfoPort {
pub fn builder() -> crate::model::matchmaker_lobby_join_info_port::Builder {
crate::model::matchmaker_lobby_join_info_port::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MatchmakerLobbyJoinInfoRegion {
pub region_id: std::option::Option<std::string::String>,
pub display_name: std::option::Option<std::string::String>,
}
impl MatchmakerLobbyJoinInfoRegion {
pub fn region_id(&self) -> std::option::Option<&str> {
self.region_id.as_deref()
}
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
}
impl std::fmt::Debug for MatchmakerLobbyJoinInfoRegion {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MatchmakerLobbyJoinInfoRegion");
formatter.field("region_id", &self.region_id);
formatter.field("display_name", &self.display_name);
formatter.finish()
}
}
pub mod matchmaker_lobby_join_info_region {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) region_id: std::option::Option<std::string::String>,
pub(crate) display_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn region_id(mut self, input: impl Into<std::string::String>) -> Self {
self.region_id = Some(input.into());
self
}
pub fn set_region_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.region_id = input;
self
}
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.display_name = Some(input.into());
self
}
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.display_name = input;
self
}
pub fn build(self) -> crate::model::MatchmakerLobbyJoinInfoRegion {
crate::model::MatchmakerLobbyJoinInfoRegion {
region_id: self.region_id,
display_name: self.display_name,
}
}
}
}
impl MatchmakerLobbyJoinInfoRegion {
pub fn builder() -> crate::model::matchmaker_lobby_join_info_region::Builder {
crate::model::matchmaker_lobby_join_info_region::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum CaptchaConfig {
Hcaptcha(crate::model::CaptchaConfigHcaptcha),
#[non_exhaustive]
Unknown,
}
impl CaptchaConfig {
#[allow(irrefutable_let_patterns)]
pub fn as_hcaptcha(&self) -> std::result::Result<&crate::model::CaptchaConfigHcaptcha, &Self> {
if let CaptchaConfig::Hcaptcha(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_hcaptcha(&self) -> bool {
self.as_hcaptcha().is_ok()
}
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CaptchaConfigHcaptcha {
#[allow(missing_docs)] pub client_response: std::option::Option<std::string::String>,
}
impl CaptchaConfigHcaptcha {
#[allow(missing_docs)] pub fn client_response(&self) -> std::option::Option<&str> {
self.client_response.as_deref()
}
}
impl std::fmt::Debug for CaptchaConfigHcaptcha {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CaptchaConfigHcaptcha");
formatter.field("client_response", &self.client_response);
formatter.finish()
}
}
pub mod captcha_config_hcaptcha {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_response: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn client_response(mut self, input: impl Into<std::string::String>) -> Self {
self.client_response = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_client_response(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_response = input;
self
}
pub fn build(self) -> crate::model::CaptchaConfigHcaptcha {
crate::model::CaptchaConfigHcaptcha {
client_response: self.client_response,
}
}
}
}
impl CaptchaConfigHcaptcha {
pub fn builder() -> crate::model::captcha_config_hcaptcha::Builder {
crate::model::captcha_config_hcaptcha::Builder::default()
}
}