/// <summary>
 /// Initializes a new instance of the <see cref="GetUniverseStarsStarIdOk" /> class.
 /// </summary>
 /// <param name="age">Age of star in years (required).</param>
 /// <param name="luminosity">luminosity number (required).</param>
 /// <param name="name">name string (required).</param>
 /// <param name="radius">radius integer (required).</param>
 /// <param name="solarSystemId">solar_system_id integer (required).</param>
 /// <param name="spectralClass">spectral_class string (required).</param>
 /// <param name="temperature">temperature integer (required).</param>
 /// <param name="typeId">type_id integer (required).</param>
 public GetUniverseStarsStarIdOk(long?age = default(long?), float?luminosity = default(float?), string name = default(string), long?radius = default(long?), int?solarSystemId = default(int?), SpectralClassEnum spectralClass = default(SpectralClassEnum), int?temperature = default(int?), int?typeId = default(int?))
 {
     // to ensure "age" is required (not null)
     if (age == null)
     {
         throw new InvalidDataException("age is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.Age = age;
     }
     // to ensure "luminosity" is required (not null)
     if (luminosity == null)
     {
         throw new InvalidDataException("luminosity is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.Luminosity = luminosity;
     }
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     // to ensure "radius" is required (not null)
     if (radius == null)
     {
         throw new InvalidDataException("radius is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.Radius = radius;
     }
     // to ensure "solarSystemId" is required (not null)
     if (solarSystemId == null)
     {
         throw new InvalidDataException("solarSystemId is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.SolarSystemId = solarSystemId;
     }
     // to ensure "spectralClass" is required (not null)
     if (spectralClass == null)
     {
         throw new InvalidDataException("spectralClass is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.SpectralClass = spectralClass;
     }
     // to ensure "temperature" is required (not null)
     if (temperature == null)
     {
         throw new InvalidDataException("temperature is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.Temperature = temperature;
     }
     // to ensure "typeId" is required (not null)
     if (typeId == null)
     {
         throw new InvalidDataException("typeId is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.TypeId = typeId;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetUniverseStarsStarIdOk" /> class.
 /// </summary>
 /// <param name="Age">Age of star in years (required).</param>
 /// <param name="Luminosity">luminosity number (required).</param>
 /// <param name="Name">name string (required).</param>
 /// <param name="Radius">radius integer (required).</param>
 /// <param name="SolarSystemId">solar_system_id integer (required).</param>
 /// <param name="SpectralClass">spectral_class string (required).</param>
 /// <param name="Temperature">temperature integer (required).</param>
 /// <param name="TypeId">type_id integer (required).</param>
 public GetUniverseStarsStarIdOk(long?Age = default(long?), float?Luminosity = default(float?), string Name = default(string), long?Radius = default(long?), int?SolarSystemId = default(int?), SpectralClassEnum SpectralClass = default(SpectralClassEnum), int?Temperature = default(int?), int?TypeId = default(int?))
 {
     // to ensure "Age" is required (not null)
     if (Age == null)
     {
         throw new InvalidDataException("Age is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.Age = Age;
     }
     // to ensure "Luminosity" is required (not null)
     if (Luminosity == null)
     {
         throw new InvalidDataException("Luminosity is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.Luminosity = Luminosity;
     }
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     // to ensure "Radius" is required (not null)
     if (Radius == null)
     {
         throw new InvalidDataException("Radius is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.Radius = Radius;
     }
     // to ensure "SolarSystemId" is required (not null)
     if (SolarSystemId == null)
     {
         throw new InvalidDataException("SolarSystemId is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.SolarSystemId = SolarSystemId;
     }
     // to ensure "SpectralClass" is required (not null)
     if (SpectralClass == null)
     {
         throw new InvalidDataException("SpectralClass is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.SpectralClass = SpectralClass;
     }
     // to ensure "Temperature" is required (not null)
     if (Temperature == null)
     {
         throw new InvalidDataException("Temperature is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.Temperature = Temperature;
     }
     // to ensure "TypeId" is required (not null)
     if (TypeId == null)
     {
         throw new InvalidDataException("TypeId is a required property for GetUniverseStarsStarIdOk and cannot be null");
     }
     else
     {
         this.TypeId = TypeId;
     }
 }