/*
* Tribufu API
*
* REST API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* Contact: contact@tribufu.com
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Tribufu.Generated.Client.OpenAPIDateConverter;
namespace Tribufu.Generated.Model
{
///
/// GameServer
///
[DataContract(Name = "GameServer")]
public partial class GameServer : IValidatableObject
{
///
/// Gets or Sets Status
///
[DataMember(Name = "status", EmitDefaultValue = false)]
public ServerStatus? Status { get; set; }
///
/// Initializes a new instance of the class.
///
/// id.
/// name.
/// description.
/// address.
/// gamePort.
/// queryPort.
/// gameId.
/// gameIconUrl.
/// varVersion.
/// featured.
/// clusterId.
/// websiteUrl.
/// bannerUrl.
/// ownerId.
/// uptime.
/// status.
/// ping.
/// map.
/// usedSlots.
/// maxSlots.
/// motd.
/// players.
/// lastOnline.
/// country.
/// steam.
/// discordServerId.
/// youtubeVideoUrl.
/// tags.
/// commentCount.
/// created.
/// updated.
public GameServer(string id = default(string), string name = default(string), string description = default(string), string address = default(string), int? gamePort = default(int?), int queryPort = default(int), string gameId = default(string), string gameIconUrl = default(string), string varVersion = default(string), bool featured = default(bool), string clusterId = default(string), string websiteUrl = default(string), string bannerUrl = default(string), string ownerId = default(string), double uptime = default(double), ServerStatus? status = default(ServerStatus?), int? ping = default(int?), string map = default(string), int? usedSlots = default(int?), int? maxSlots = default(int?), string motd = default(string), string players = default(string), DateTime? lastOnline = default(DateTime?), string country = default(string), bool steam = default(bool), string discordServerId = default(string), string youtubeVideoUrl = default(string), string tags = default(string), int commentCount = default(int), DateTime created = default(DateTime), DateTime? updated = default(DateTime?))
{
this.Id = id;
this.Name = name;
this.Description = description;
this.Address = address;
this.GamePort = gamePort;
this.QueryPort = queryPort;
this.GameId = gameId;
this.GameIconUrl = gameIconUrl;
this.VarVersion = varVersion;
this.Featured = featured;
this.ClusterId = clusterId;
this.WebsiteUrl = websiteUrl;
this.BannerUrl = bannerUrl;
this.OwnerId = ownerId;
this.Uptime = uptime;
this.Status = status;
this.Ping = ping;
this.Map = map;
this.UsedSlots = usedSlots;
this.MaxSlots = maxSlots;
this.Motd = motd;
this.Players = players;
this.LastOnline = lastOnline;
this.Country = country;
this.Steam = steam;
this.DiscordServerId = discordServerId;
this.YoutubeVideoUrl = youtubeVideoUrl;
this.Tags = tags;
this.CommentCount = commentCount;
this.Created = created;
this.Updated = updated;
}
///
/// Gets or Sets Id
///
[DataMember(Name = "id", EmitDefaultValue = false)]
public string Id { get; set; }
///
/// Gets or Sets Name
///
[DataMember(Name = "name", EmitDefaultValue = true)]
public string Name { get; set; }
///
/// Gets or Sets Description
///
[DataMember(Name = "description", EmitDefaultValue = true)]
public string Description { get; set; }
///
/// Gets or Sets Address
///
[DataMember(Name = "address", EmitDefaultValue = true)]
public string Address { get; set; }
///
/// Gets or Sets GamePort
///
[DataMember(Name = "game_port", EmitDefaultValue = true)]
public int? GamePort { get; set; }
///
/// Gets or Sets QueryPort
///
[DataMember(Name = "query_port", EmitDefaultValue = false)]
public int QueryPort { get; set; }
///
/// Gets or Sets GameId
///
[DataMember(Name = "game_id", EmitDefaultValue = false)]
public string GameId { get; set; }
///
/// Gets or Sets GameIconUrl
///
[DataMember(Name = "game_icon_url", EmitDefaultValue = true)]
public string GameIconUrl { get; set; }
///
/// Gets or Sets VarVersion
///
[DataMember(Name = "version", EmitDefaultValue = true)]
public string VarVersion { get; set; }
///
/// Gets or Sets Featured
///
[DataMember(Name = "featured", EmitDefaultValue = true)]
public bool Featured { get; set; }
///
/// Gets or Sets ClusterId
///
[DataMember(Name = "cluster_id", EmitDefaultValue = true)]
public string ClusterId { get; set; }
///
/// Gets or Sets WebsiteUrl
///
[DataMember(Name = "website_url", EmitDefaultValue = true)]
public string WebsiteUrl { get; set; }
///
/// Gets or Sets BannerUrl
///
[DataMember(Name = "banner_url", EmitDefaultValue = true)]
public string BannerUrl { get; set; }
///
/// Gets or Sets OwnerId
///
[DataMember(Name = "owner_id", EmitDefaultValue = true)]
public string OwnerId { get; set; }
///
/// Gets or Sets Uptime
///
[DataMember(Name = "uptime", EmitDefaultValue = false)]
public double Uptime { get; set; }
///
/// Gets or Sets Ping
///
[DataMember(Name = "ping", EmitDefaultValue = true)]
public int? Ping { get; set; }
///
/// Gets or Sets Map
///
[DataMember(Name = "map", EmitDefaultValue = true)]
public string Map { get; set; }
///
/// Gets or Sets UsedSlots
///
[DataMember(Name = "used_slots", EmitDefaultValue = true)]
public int? UsedSlots { get; set; }
///
/// Gets or Sets MaxSlots
///
[DataMember(Name = "max_slots", EmitDefaultValue = true)]
public int? MaxSlots { get; set; }
///
/// Gets or Sets Motd
///
[DataMember(Name = "motd", EmitDefaultValue = true)]
public string Motd { get; set; }
///
/// Gets or Sets Players
///
[DataMember(Name = "players", EmitDefaultValue = true)]
public string Players { get; set; }
///
/// Gets or Sets LastOnline
///
[DataMember(Name = "last_online", EmitDefaultValue = true)]
public DateTime? LastOnline { get; set; }
///
/// Gets or Sets Country
///
[DataMember(Name = "country", EmitDefaultValue = true)]
public string Country { get; set; }
///
/// Gets or Sets Steam
///
[DataMember(Name = "steam", EmitDefaultValue = true)]
public bool Steam { get; set; }
///
/// Gets or Sets DiscordServerId
///
[DataMember(Name = "discord_server_id", EmitDefaultValue = true)]
public string DiscordServerId { get; set; }
///
/// Gets or Sets YoutubeVideoUrl
///
[DataMember(Name = "youtube_video_url", EmitDefaultValue = true)]
public string YoutubeVideoUrl { get; set; }
///
/// Gets or Sets Tags
///
[DataMember(Name = "tags", EmitDefaultValue = true)]
public string Tags { get; set; }
///
/// Gets or Sets CommentCount
///
[DataMember(Name = "comment_count", EmitDefaultValue = false)]
public int CommentCount { get; set; }
///
/// Gets or Sets Created
///
[DataMember(Name = "created", EmitDefaultValue = false)]
public DateTime Created { get; set; }
///
/// Gets or Sets Updated
///
[DataMember(Name = "updated", EmitDefaultValue = true)]
public DateTime? Updated { get; set; }
///
/// Returns the string presentation of the object
///
/// String presentation of the object
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class GameServer {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" Description: ").Append(Description).Append("\n");
sb.Append(" Address: ").Append(Address).Append("\n");
sb.Append(" GamePort: ").Append(GamePort).Append("\n");
sb.Append(" QueryPort: ").Append(QueryPort).Append("\n");
sb.Append(" GameId: ").Append(GameId).Append("\n");
sb.Append(" GameIconUrl: ").Append(GameIconUrl).Append("\n");
sb.Append(" VarVersion: ").Append(VarVersion).Append("\n");
sb.Append(" Featured: ").Append(Featured).Append("\n");
sb.Append(" ClusterId: ").Append(ClusterId).Append("\n");
sb.Append(" WebsiteUrl: ").Append(WebsiteUrl).Append("\n");
sb.Append(" BannerUrl: ").Append(BannerUrl).Append("\n");
sb.Append(" OwnerId: ").Append(OwnerId).Append("\n");
sb.Append(" Uptime: ").Append(Uptime).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n");
sb.Append(" Ping: ").Append(Ping).Append("\n");
sb.Append(" Map: ").Append(Map).Append("\n");
sb.Append(" UsedSlots: ").Append(UsedSlots).Append("\n");
sb.Append(" MaxSlots: ").Append(MaxSlots).Append("\n");
sb.Append(" Motd: ").Append(Motd).Append("\n");
sb.Append(" Players: ").Append(Players).Append("\n");
sb.Append(" LastOnline: ").Append(LastOnline).Append("\n");
sb.Append(" Country: ").Append(Country).Append("\n");
sb.Append(" Steam: ").Append(Steam).Append("\n");
sb.Append(" DiscordServerId: ").Append(DiscordServerId).Append("\n");
sb.Append(" YoutubeVideoUrl: ").Append(YoutubeVideoUrl).Append("\n");
sb.Append(" Tags: ").Append(Tags).Append("\n");
sb.Append(" CommentCount: ").Append(CommentCount).Append("\n");
sb.Append(" Created: ").Append(Created).Append("\n");
sb.Append(" Updated: ").Append(Updated).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
///
/// Returns the JSON string presentation of the object
///
/// JSON string presentation of the object
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
///
/// To validate all properties of the instance
///
/// Validation context
/// Validation Result
IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
{
// Name (string) maxLength
if (this.Name != null && this.Name.Length > 75)
{
yield return new ValidationResult("Invalid value for Name, length must be less than 75.", new [] { "Name" });
}
// Address (string) maxLength
if (this.Address != null && this.Address.Length > 255)
{
yield return new ValidationResult("Invalid value for Address, length must be less than 255.", new [] { "Address" });
}
// VarVersion (string) maxLength
if (this.VarVersion != null && this.VarVersion.Length > 45)
{
yield return new ValidationResult("Invalid value for VarVersion, length must be less than 45.", new [] { "VarVersion" });
}
// WebsiteUrl (string) maxLength
if (this.WebsiteUrl != null && this.WebsiteUrl.Length > 255)
{
yield return new ValidationResult("Invalid value for WebsiteUrl, length must be less than 255.", new [] { "WebsiteUrl" });
}
// BannerUrl (string) maxLength
if (this.BannerUrl != null && this.BannerUrl.Length > 255)
{
yield return new ValidationResult("Invalid value for BannerUrl, length must be less than 255.", new [] { "BannerUrl" });
}
// Map (string) maxLength
if (this.Map != null && this.Map.Length > 45)
{
yield return new ValidationResult("Invalid value for Map, length must be less than 45.", new [] { "Map" });
}
// Motd (string) maxLength
if (this.Motd != null && this.Motd.Length > 255)
{
yield return new ValidationResult("Invalid value for Motd, length must be less than 255.", new [] { "Motd" });
}
// Country (string) maxLength
if (this.Country != null && this.Country.Length > 2)
{
yield return new ValidationResult("Invalid value for Country, length must be less than 2.", new [] { "Country" });
}
// YoutubeVideoUrl (string) maxLength
if (this.YoutubeVideoUrl != null && this.YoutubeVideoUrl.Length > 255)
{
yield return new ValidationResult("Invalid value for YoutubeVideoUrl, length must be less than 255.", new [] { "YoutubeVideoUrl" });
}
yield break;
}
}
}