/// <summary> /// Initializes a new instance of the <see cref="GetWarsWarIdOk" /> class. /// </summary> /// <param name="Aggressor">Aggressor.</param> /// <param name="Allies">allied corporations or alliances, each object contains either corporation_id or alliance_id.</param> /// <param name="Declared">Time that the war was declared (required).</param> /// <param name="Defender">Defender.</param> /// <param name="Finished">Time the war ended and shooting was no longer allowed.</param> /// <param name="Id">ID of the specified war (required).</param> /// <param name="Mutual">Was the war declared mutual by both parties (required).</param> /// <param name="OpenForAllies">Is the war currently open for allies or not (required).</param> /// <param name="Retracted">Time the war was retracted but both sides could still shoot each other.</param> /// <param name="Started">Time when the war started and both sides could shoot each other.</param> public GetWarsWarIdOk(GetWarsWarIdAggressor Aggressor = default(GetWarsWarIdAggressor), List <GetWarsWarIdAlly> Allies = default(List <GetWarsWarIdAlly>), DateTime?Declared = default(DateTime?), GetWarsWarIdDefender Defender = default(GetWarsWarIdDefender), DateTime?Finished = default(DateTime?), int?Id = default(int?), bool?Mutual = default(bool?), bool?OpenForAllies = default(bool?), DateTime?Retracted = default(DateTime?), DateTime?Started = default(DateTime?)) { // to ensure "Declared" is required (not null) if (Declared == null) { throw new InvalidDataException("Declared is a required property for GetWarsWarIdOk and cannot be null"); } else { this.Declared = Declared; } // to ensure "Id" is required (not null) if (Id == null) { throw new InvalidDataException("Id is a required property for GetWarsWarIdOk and cannot be null"); } else { this.Id = Id; } // to ensure "Mutual" is required (not null) if (Mutual == null) { throw new InvalidDataException("Mutual is a required property for GetWarsWarIdOk and cannot be null"); } else { this.Mutual = Mutual; } // to ensure "OpenForAllies" is required (not null) if (OpenForAllies == null) { throw new InvalidDataException("OpenForAllies is a required property for GetWarsWarIdOk and cannot be null"); } else { this.OpenForAllies = OpenForAllies; } this.Aggressor = Aggressor; this.Allies = Allies; this.Defender = Defender; this.Finished = Finished; this.Retracted = Retracted; this.Started = Started; }
/// <summary> /// Initializes a new instance of the <see cref="GetWarsWarIdOk" /> class. /// </summary> /// <param name="id">ID of the specified war (required).</param> /// <param name="declared">Time that the war was declared (required).</param> /// <param name="started">Time when the war started and both sides could shoot each other.</param> /// <param name="retracted">Time the war was retracted but both sides could still shoot each other.</param> /// <param name="finished">Time the war ended and shooting was no longer allowed.</param> /// <param name="mutual">Was the war declared mutual by both parties (required).</param> /// <param name="openForAllies">Is the war currently open for allies or not (required).</param> /// <param name="aggressor">aggressor (required).</param> /// <param name="defender">defender (required).</param> /// <param name="allies">allied corporations or alliances, each object contains either corporation_id or alliance_id.</param> public GetWarsWarIdOk(int?id = default(int?), DateTime?declared = default(DateTime?), DateTime?started = default(DateTime?), DateTime?retracted = default(DateTime?), DateTime?finished = default(DateTime?), bool?mutual = default(bool?), bool?openForAllies = default(bool?), GetWarsWarIdAggressor aggressor = default(GetWarsWarIdAggressor), GetWarsWarIdDefender defender = default(GetWarsWarIdDefender), List <GetWarsWarIdAlly> allies = default(List <GetWarsWarIdAlly>)) { // to ensure "id" is required (not null) if (id == null) { throw new InvalidDataException("id is a required property for GetWarsWarIdOk and cannot be null"); } else { this.Id = id; } // to ensure "declared" is required (not null) if (declared == null) { throw new InvalidDataException("declared is a required property for GetWarsWarIdOk and cannot be null"); } else { this.Declared = declared; } // to ensure "mutual" is required (not null) if (mutual == null) { throw new InvalidDataException("mutual is a required property for GetWarsWarIdOk and cannot be null"); } else { this.Mutual = mutual; } // to ensure "openForAllies" is required (not null) if (openForAllies == null) { throw new InvalidDataException("openForAllies is a required property for GetWarsWarIdOk and cannot be null"); } else { this.OpenForAllies = openForAllies; } // to ensure "aggressor" is required (not null) if (aggressor == null) { throw new InvalidDataException("aggressor is a required property for GetWarsWarIdOk and cannot be null"); } else { this.Aggressor = aggressor; } // to ensure "defender" is required (not null) if (defender == null) { throw new InvalidDataException("defender is a required property for GetWarsWarIdOk and cannot be null"); } else { this.Defender = defender; } this.Started = started; this.Retracted = retracted; this.Finished = finished; this.Allies = allies; }