fix: [csharp-netcore]: oneOf fixes for Primitive types (#11427)

* fix: [csharp-netcore]: oneOf fixes for Primitive types

- Escape type in XML comment to avoid issue with types<T> rendering.
- Conditionals for string and Object to still throw ArgumentException.

* fix: Adjust whitespace in csharp-netcore template.  Regenerate Petstore clients due to different order of items in composedSchemas.
This commit is contained in:
Jason Finch
2022-03-18 13:58:46 +10:00
committed by GitHub
parent 8e68ff71c4
commit ffd758d82d
31 changed files with 535 additions and 529 deletions

View File

@@ -35,18 +35,6 @@ namespace Org.OpenAPITools.Model
[DataContract(Name = "mammal")]
public partial class Mammal : AbstractOpenAPISchema, IEquatable<Mammal>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Pig" /> class
/// </summary>
/// <param name="actualInstance">An instance of Pig.</param>
public Mammal(Pig actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Whale" /> class
@@ -71,6 +59,18 @@ namespace Org.OpenAPITools.Model
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Pig" /> class
/// </summary>
/// <param name="actualInstance">An instance of Pig.</param>
public Mammal(Pig actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
private Object _actualInstance;
@@ -104,16 +104,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Pig`. If the actual instance is not `Pig`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Pig</returns>
public Pig GetPig()
{
return (Pig)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Whale`. If the actual instance is not `Whale`,
/// the InvalidClassException will be thrown
@@ -134,6 +124,16 @@ namespace Org.OpenAPITools.Model
return (Zebra)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Pig`. If the actual instance is not `Pig`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Pig</returns>
public Pig GetPig()
{
return (Pig)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -46,10 +46,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="NullableShape" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public NullableShape(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public NullableShape(Triangle actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="NullableShape" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public NullableShape(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public NullableShape(Quadrilateral actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -97,16 +97,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -117,6 +107,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -37,10 +37,10 @@ namespace Org.OpenAPITools.Model
{
/// <summary>
/// Initializes a new instance of the <see cref="Quadrilateral" /> class
/// with the <see cref="ComplexQuadrilateral" /> class
/// with the <see cref="SimpleQuadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of ComplexQuadrilateral.</param>
public Quadrilateral(ComplexQuadrilateral actualInstance)
/// <param name="actualInstance">An instance of SimpleQuadrilateral.</param>
public Quadrilateral(SimpleQuadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -49,10 +49,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="Quadrilateral" /> class
/// with the <see cref="SimpleQuadrilateral" /> class
/// with the <see cref="ComplexQuadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of SimpleQuadrilateral.</param>
public Quadrilateral(SimpleQuadrilateral actualInstance)
/// <param name="actualInstance">An instance of ComplexQuadrilateral.</param>
public Quadrilateral(ComplexQuadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -88,16 +88,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of ComplexQuadrilateral</returns>
public ComplexQuadrilateral GetComplexQuadrilateral()
{
return (ComplexQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`,
/// the InvalidClassException will be thrown
@@ -108,6 +98,16 @@ namespace Org.OpenAPITools.Model
return (SimpleQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of ComplexQuadrilateral</returns>
public ComplexQuadrilateral GetComplexQuadrilateral()
{
return (ComplexQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -37,10 +37,10 @@ namespace Org.OpenAPITools.Model
{
/// <summary>
/// Initializes a new instance of the <see cref="Shape" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public Shape(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public Shape(Triangle actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -49,10 +49,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="Shape" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public Shape(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public Shape(Quadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -88,16 +88,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -108,6 +98,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -46,10 +46,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="ShapeOrNull" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public ShapeOrNull(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public ShapeOrNull(Triangle actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="ShapeOrNull" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public ShapeOrNull(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public ShapeOrNull(Quadrilateral actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -97,16 +97,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -117,6 +107,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -36,18 +36,6 @@ namespace Org.OpenAPITools.Model
[DataContract(Name = "mammal")]
public partial class Mammal : AbstractOpenAPISchema, IEquatable<Mammal>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Pig" /> class
/// </summary>
/// <param name="actualInstance">An instance of Pig.</param>
public Mammal(Pig actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Whale" /> class
@@ -72,6 +60,18 @@ namespace Org.OpenAPITools.Model
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Pig" /> class
/// </summary>
/// <param name="actualInstance">An instance of Pig.</param>
public Mammal(Pig actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
private Object _actualInstance;
@@ -105,16 +105,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Pig`. If the actual instance is not `Pig`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Pig</returns>
public Pig GetPig()
{
return (Pig)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Whale`. If the actual instance is not `Whale`,
/// the InvalidClassException will be thrown
@@ -135,6 +125,16 @@ namespace Org.OpenAPITools.Model
return (Zebra)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Pig`. If the actual instance is not `Pig`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Pig</returns>
public Pig GetPig()
{
return (Pig)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -47,10 +47,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="NullableShape" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public NullableShape(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public NullableShape(Triangle actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -59,10 +59,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="NullableShape" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public NullableShape(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public NullableShape(Quadrilateral actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -98,16 +98,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -118,6 +108,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -38,10 +38,10 @@ namespace Org.OpenAPITools.Model
{
/// <summary>
/// Initializes a new instance of the <see cref="Quadrilateral" /> class
/// with the <see cref="ComplexQuadrilateral" /> class
/// with the <see cref="SimpleQuadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of ComplexQuadrilateral.</param>
public Quadrilateral(ComplexQuadrilateral actualInstance)
/// <param name="actualInstance">An instance of SimpleQuadrilateral.</param>
public Quadrilateral(SimpleQuadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -50,10 +50,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="Quadrilateral" /> class
/// with the <see cref="SimpleQuadrilateral" /> class
/// with the <see cref="ComplexQuadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of SimpleQuadrilateral.</param>
public Quadrilateral(SimpleQuadrilateral actualInstance)
/// <param name="actualInstance">An instance of ComplexQuadrilateral.</param>
public Quadrilateral(ComplexQuadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -89,16 +89,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of ComplexQuadrilateral</returns>
public ComplexQuadrilateral GetComplexQuadrilateral()
{
return (ComplexQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`,
/// the InvalidClassException will be thrown
@@ -109,6 +99,16 @@ namespace Org.OpenAPITools.Model
return (SimpleQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of ComplexQuadrilateral</returns>
public ComplexQuadrilateral GetComplexQuadrilateral()
{
return (ComplexQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -38,10 +38,10 @@ namespace Org.OpenAPITools.Model
{
/// <summary>
/// Initializes a new instance of the <see cref="Shape" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public Shape(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public Shape(Triangle actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -50,10 +50,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="Shape" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public Shape(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public Shape(Quadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -89,16 +89,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -109,6 +99,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -47,10 +47,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="ShapeOrNull" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public ShapeOrNull(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public ShapeOrNull(Triangle actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -59,10 +59,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="ShapeOrNull" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public ShapeOrNull(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public ShapeOrNull(Quadrilateral actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -98,16 +98,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -118,6 +108,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -35,18 +35,6 @@ namespace Org.OpenAPITools.Model
[DataContract(Name = "mammal")]
public partial class Mammal : AbstractOpenAPISchema, IEquatable<Mammal>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Pig" /> class
/// </summary>
/// <param name="actualInstance">An instance of Pig.</param>
public Mammal(Pig actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Whale" /> class
@@ -71,6 +59,18 @@ namespace Org.OpenAPITools.Model
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Pig" /> class
/// </summary>
/// <param name="actualInstance">An instance of Pig.</param>
public Mammal(Pig actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
private Object _actualInstance;
@@ -104,16 +104,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Pig`. If the actual instance is not `Pig`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Pig</returns>
public Pig GetPig()
{
return (Pig)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Whale`. If the actual instance is not `Whale`,
/// the InvalidClassException will be thrown
@@ -134,6 +124,16 @@ namespace Org.OpenAPITools.Model
return (Zebra)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Pig`. If the actual instance is not `Pig`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Pig</returns>
public Pig GetPig()
{
return (Pig)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -46,10 +46,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="NullableShape" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public NullableShape(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public NullableShape(Triangle actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="NullableShape" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public NullableShape(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public NullableShape(Quadrilateral actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -97,16 +97,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -117,6 +107,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -37,10 +37,10 @@ namespace Org.OpenAPITools.Model
{
/// <summary>
/// Initializes a new instance of the <see cref="Quadrilateral" /> class
/// with the <see cref="ComplexQuadrilateral" /> class
/// with the <see cref="SimpleQuadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of ComplexQuadrilateral.</param>
public Quadrilateral(ComplexQuadrilateral actualInstance)
/// <param name="actualInstance">An instance of SimpleQuadrilateral.</param>
public Quadrilateral(SimpleQuadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -49,10 +49,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="Quadrilateral" /> class
/// with the <see cref="SimpleQuadrilateral" /> class
/// with the <see cref="ComplexQuadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of SimpleQuadrilateral.</param>
public Quadrilateral(SimpleQuadrilateral actualInstance)
/// <param name="actualInstance">An instance of ComplexQuadrilateral.</param>
public Quadrilateral(ComplexQuadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -88,16 +88,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of ComplexQuadrilateral</returns>
public ComplexQuadrilateral GetComplexQuadrilateral()
{
return (ComplexQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`,
/// the InvalidClassException will be thrown
@@ -108,6 +98,16 @@ namespace Org.OpenAPITools.Model
return (SimpleQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of ComplexQuadrilateral</returns>
public ComplexQuadrilateral GetComplexQuadrilateral()
{
return (ComplexQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -37,10 +37,10 @@ namespace Org.OpenAPITools.Model
{
/// <summary>
/// Initializes a new instance of the <see cref="Shape" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public Shape(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public Shape(Triangle actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -49,10 +49,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="Shape" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public Shape(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public Shape(Quadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -88,16 +88,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -108,6 +98,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -46,10 +46,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="ShapeOrNull" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public ShapeOrNull(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public ShapeOrNull(Triangle actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="ShapeOrNull" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public ShapeOrNull(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public ShapeOrNull(Quadrilateral actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -97,16 +97,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -117,6 +107,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -35,18 +35,6 @@ namespace Org.OpenAPITools.Model
[DataContract(Name = "mammal")]
public partial class Mammal : AbstractOpenAPISchema, IEquatable<Mammal>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Pig" /> class
/// </summary>
/// <param name="actualInstance">An instance of Pig.</param>
public Mammal(Pig actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Whale" /> class
@@ -71,6 +59,18 @@ namespace Org.OpenAPITools.Model
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Pig" /> class
/// </summary>
/// <param name="actualInstance">An instance of Pig.</param>
public Mammal(Pig actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
private Object _actualInstance;
@@ -104,16 +104,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Pig`. If the actual instance is not `Pig`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Pig</returns>
public Pig GetPig()
{
return (Pig)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Whale`. If the actual instance is not `Whale`,
/// the InvalidClassException will be thrown
@@ -134,6 +124,16 @@ namespace Org.OpenAPITools.Model
return (Zebra)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Pig`. If the actual instance is not `Pig`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Pig</returns>
public Pig GetPig()
{
return (Pig)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -46,10 +46,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="NullableShape" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public NullableShape(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public NullableShape(Triangle actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="NullableShape" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public NullableShape(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public NullableShape(Quadrilateral actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -97,16 +97,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -117,6 +107,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -37,10 +37,10 @@ namespace Org.OpenAPITools.Model
{
/// <summary>
/// Initializes a new instance of the <see cref="Quadrilateral" /> class
/// with the <see cref="ComplexQuadrilateral" /> class
/// with the <see cref="SimpleQuadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of ComplexQuadrilateral.</param>
public Quadrilateral(ComplexQuadrilateral actualInstance)
/// <param name="actualInstance">An instance of SimpleQuadrilateral.</param>
public Quadrilateral(SimpleQuadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -49,10 +49,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="Quadrilateral" /> class
/// with the <see cref="SimpleQuadrilateral" /> class
/// with the <see cref="ComplexQuadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of SimpleQuadrilateral.</param>
public Quadrilateral(SimpleQuadrilateral actualInstance)
/// <param name="actualInstance">An instance of ComplexQuadrilateral.</param>
public Quadrilateral(ComplexQuadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -88,16 +88,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of ComplexQuadrilateral</returns>
public ComplexQuadrilateral GetComplexQuadrilateral()
{
return (ComplexQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`,
/// the InvalidClassException will be thrown
@@ -108,6 +98,16 @@ namespace Org.OpenAPITools.Model
return (SimpleQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of ComplexQuadrilateral</returns>
public ComplexQuadrilateral GetComplexQuadrilateral()
{
return (ComplexQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -37,10 +37,10 @@ namespace Org.OpenAPITools.Model
{
/// <summary>
/// Initializes a new instance of the <see cref="Shape" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public Shape(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public Shape(Triangle actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -49,10 +49,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="Shape" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public Shape(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public Shape(Quadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -88,16 +88,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -108,6 +98,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -46,10 +46,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="ShapeOrNull" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public ShapeOrNull(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public ShapeOrNull(Triangle actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="ShapeOrNull" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public ShapeOrNull(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public ShapeOrNull(Quadrilateral actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -97,16 +97,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -117,6 +107,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -35,18 +35,6 @@ namespace Org.OpenAPITools.Model
[DataContract(Name = "mammal")]
public partial class Mammal : AbstractOpenAPISchema, IEquatable<Mammal>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Pig" /> class
/// </summary>
/// <param name="actualInstance">An instance of Pig.</param>
public Mammal(Pig actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Whale" /> class
@@ -71,6 +59,18 @@ namespace Org.OpenAPITools.Model
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Pig" /> class
/// </summary>
/// <param name="actualInstance">An instance of Pig.</param>
public Mammal(Pig actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
private Object _actualInstance;
@@ -104,16 +104,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Pig`. If the actual instance is not `Pig`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Pig</returns>
public Pig GetPig()
{
return (Pig)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Whale`. If the actual instance is not `Whale`,
/// the InvalidClassException will be thrown
@@ -134,6 +124,16 @@ namespace Org.OpenAPITools.Model
return (Zebra)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Pig`. If the actual instance is not `Pig`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Pig</returns>
public Pig GetPig()
{
return (Pig)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -46,10 +46,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="NullableShape" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public NullableShape(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public NullableShape(Triangle actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="NullableShape" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public NullableShape(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public NullableShape(Quadrilateral actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -97,16 +97,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -117,6 +107,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -37,10 +37,10 @@ namespace Org.OpenAPITools.Model
{
/// <summary>
/// Initializes a new instance of the <see cref="Quadrilateral" /> class
/// with the <see cref="ComplexQuadrilateral" /> class
/// with the <see cref="SimpleQuadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of ComplexQuadrilateral.</param>
public Quadrilateral(ComplexQuadrilateral actualInstance)
/// <param name="actualInstance">An instance of SimpleQuadrilateral.</param>
public Quadrilateral(SimpleQuadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -49,10 +49,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="Quadrilateral" /> class
/// with the <see cref="SimpleQuadrilateral" /> class
/// with the <see cref="ComplexQuadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of SimpleQuadrilateral.</param>
public Quadrilateral(SimpleQuadrilateral actualInstance)
/// <param name="actualInstance">An instance of ComplexQuadrilateral.</param>
public Quadrilateral(ComplexQuadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -88,16 +88,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of ComplexQuadrilateral</returns>
public ComplexQuadrilateral GetComplexQuadrilateral()
{
return (ComplexQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`,
/// the InvalidClassException will be thrown
@@ -108,6 +98,16 @@ namespace Org.OpenAPITools.Model
return (SimpleQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of ComplexQuadrilateral</returns>
public ComplexQuadrilateral GetComplexQuadrilateral()
{
return (ComplexQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -37,10 +37,10 @@ namespace Org.OpenAPITools.Model
{
/// <summary>
/// Initializes a new instance of the <see cref="Shape" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public Shape(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public Shape(Triangle actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -49,10 +49,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="Shape" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public Shape(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public Shape(Quadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -88,16 +88,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -108,6 +98,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -46,10 +46,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="ShapeOrNull" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public ShapeOrNull(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public ShapeOrNull(Triangle actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="ShapeOrNull" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public ShapeOrNull(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public ShapeOrNull(Quadrilateral actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -97,16 +97,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -117,6 +107,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -35,18 +35,6 @@ namespace Org.OpenAPITools.Model
[DataContract(Name = "mammal")]
public partial class Mammal : AbstractOpenAPISchema, IEquatable<Mammal>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Pig" /> class
/// </summary>
/// <param name="actualInstance">An instance of Pig.</param>
public Mammal(Pig actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Whale" /> class
@@ -71,6 +59,18 @@ namespace Org.OpenAPITools.Model
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
/// Initializes a new instance of the <see cref="Mammal" /> class
/// with the <see cref="Pig" /> class
/// </summary>
/// <param name="actualInstance">An instance of Pig.</param>
public Mammal(Pig actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
private Object _actualInstance;
@@ -104,16 +104,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Pig`. If the actual instance is not `Pig`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Pig</returns>
public Pig GetPig()
{
return (Pig)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Whale`. If the actual instance is not `Whale`,
/// the InvalidClassException will be thrown
@@ -134,6 +124,16 @@ namespace Org.OpenAPITools.Model
return (Zebra)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Pig`. If the actual instance is not `Pig`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Pig</returns>
public Pig GetPig()
{
return (Pig)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -46,10 +46,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="NullableShape" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public NullableShape(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public NullableShape(Triangle actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="NullableShape" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public NullableShape(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public NullableShape(Quadrilateral actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -97,16 +97,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -117,6 +107,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -37,10 +37,10 @@ namespace Org.OpenAPITools.Model
{
/// <summary>
/// Initializes a new instance of the <see cref="Quadrilateral" /> class
/// with the <see cref="ComplexQuadrilateral" /> class
/// with the <see cref="SimpleQuadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of ComplexQuadrilateral.</param>
public Quadrilateral(ComplexQuadrilateral actualInstance)
/// <param name="actualInstance">An instance of SimpleQuadrilateral.</param>
public Quadrilateral(SimpleQuadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -49,10 +49,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="Quadrilateral" /> class
/// with the <see cref="SimpleQuadrilateral" /> class
/// with the <see cref="ComplexQuadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of SimpleQuadrilateral.</param>
public Quadrilateral(SimpleQuadrilateral actualInstance)
/// <param name="actualInstance">An instance of ComplexQuadrilateral.</param>
public Quadrilateral(ComplexQuadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -88,16 +88,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of ComplexQuadrilateral</returns>
public ComplexQuadrilateral GetComplexQuadrilateral()
{
return (ComplexQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`,
/// the InvalidClassException will be thrown
@@ -108,6 +98,16 @@ namespace Org.OpenAPITools.Model
return (SimpleQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of ComplexQuadrilateral</returns>
public ComplexQuadrilateral GetComplexQuadrilateral()
{
return (ComplexQuadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -37,10 +37,10 @@ namespace Org.OpenAPITools.Model
{
/// <summary>
/// Initializes a new instance of the <see cref="Shape" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public Shape(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public Shape(Triangle actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -49,10 +49,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="Shape" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public Shape(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public Shape(Quadrilateral actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
@@ -88,16 +88,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -108,6 +98,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>

View File

@@ -46,10 +46,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="ShapeOrNull" /> class
/// with the <see cref="Quadrilateral" /> class
/// with the <see cref="Triangle" /> class
/// </summary>
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public ShapeOrNull(Quadrilateral actualInstance)
/// <param name="actualInstance">An instance of Triangle.</param>
public ShapeOrNull(Triangle actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="ShapeOrNull" /> class
/// with the <see cref="Triangle" /> class
/// with the <see cref="Quadrilateral" /> class
/// </summary>
/// <param name="actualInstance">An instance of Triangle.</param>
public ShapeOrNull(Triangle actualInstance)
/// <param name="actualInstance">An instance of Quadrilateral.</param>
public ShapeOrNull(Quadrilateral actualInstance)
{
this.IsNullable = true;
this.SchemaType= "oneOf";
@@ -97,16 +97,6 @@ namespace Org.OpenAPITools.Model
}
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`,
/// the InvalidClassException will be thrown
@@ -117,6 +107,16 @@ namespace Org.OpenAPITools.Model
return (Triangle)this.ActualInstance;
}
/// <summary>
/// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of Quadrilateral</returns>
public Quadrilateral GetQuadrilateral()
{
return (Quadrilateral)this.ActualInstance;
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>