/// <summary> /// Initializes a new instance of the <see cref="Triangle" /> class. /// </summary> /// <param name="scaleneTriangle">scaleneTriangle</param> /// <param name="shapeType">shapeType (required)</param> /// <param name="triangleType">triangleType (required)</param> public Triangle(ScaleneTriangle scaleneTriangle, string shapeType, string triangleType) { if (shapeType == null) { throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); } if (triangleType == null) { throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); } ScaleneTriangle = scaleneTriangle; ShapeType = shapeType; TriangleType = triangleType; }
/// <summary> /// Initializes a new instance of the <see cref="Triangle" /> class /// with the <see cref="ScaleneTriangle" /> class /// </summary> /// <param name="actualInstance">An instance of ScaleneTriangle.</param> public Triangle(ScaleneTriangle actualInstance) { this.IsNullable = false; this.SchemaType = "oneOf"; this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); }