예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetUniverseMoonsMoonIdOk" /> class.
 /// </summary>
 /// <param name="MoonId">moon_id integer (required).</param>
 /// <param name="Name">name string (required).</param>
 /// <param name="Position">Position (required).</param>
 /// <param name="SystemId">The solar system this moon is in (required).</param>
 public GetUniverseMoonsMoonIdOk(int?MoonId = default(int?), string Name = default(string), GetUniverseMoonsMoonIdPosition Position = default(GetUniverseMoonsMoonIdPosition), int?SystemId = default(int?))
 {
     // to ensure "MoonId" is required (not null)
     if (MoonId == null)
     {
         throw new InvalidDataException("MoonId is a required property for GetUniverseMoonsMoonIdOk and cannot be null");
     }
     else
     {
         this.MoonId = MoonId;
     }
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for GetUniverseMoonsMoonIdOk and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     // to ensure "Position" is required (not null)
     if (Position == null)
     {
         throw new InvalidDataException("Position is a required property for GetUniverseMoonsMoonIdOk and cannot be null");
     }
     else
     {
         this.Position = Position;
     }
     // to ensure "SystemId" is required (not null)
     if (SystemId == null)
     {
         throw new InvalidDataException("SystemId is a required property for GetUniverseMoonsMoonIdOk and cannot be null");
     }
     else
     {
         this.SystemId = SystemId;
     }
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetUniverseMoonsMoonIdOk" /> class.
 /// </summary>
 /// <param name="moonId">moon_id integer (required).</param>
 /// <param name="name">name string (required).</param>
 /// <param name="position">position (required).</param>
 /// <param name="systemId">The solar system this moon is in (required).</param>
 public GetUniverseMoonsMoonIdOk(int?moonId = default(int?), string name = default(string), GetUniverseMoonsMoonIdPosition position = default(GetUniverseMoonsMoonIdPosition), int?systemId = default(int?))
 {
     // to ensure "moonId" is required (not null)
     if (moonId == null)
     {
         throw new InvalidDataException("moonId is a required property for GetUniverseMoonsMoonIdOk and cannot be null");
     }
     else
     {
         this.MoonId = moonId;
     }
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for GetUniverseMoonsMoonIdOk and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     // to ensure "position" is required (not null)
     if (position == null)
     {
         throw new InvalidDataException("position is a required property for GetUniverseMoonsMoonIdOk and cannot be null");
     }
     else
     {
         this.Position = position;
     }
     // to ensure "systemId" is required (not null)
     if (systemId == null)
     {
         throw new InvalidDataException("systemId is a required property for GetUniverseMoonsMoonIdOk and cannot be null");
     }
     else
     {
         this.SystemId = systemId;
     }
 }