mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-05 15:10:49 +00:00
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:
parent
8e68ff71c4
commit
ffd758d82d
@ -1,3 +1,4 @@
|
||||
{{#model}}
|
||||
/// <summary>
|
||||
/// {{description}}{{^description}}{{classname}}{{/description}}
|
||||
/// </summary>
|
||||
@ -16,20 +17,22 @@
|
||||
}
|
||||
|
||||
{{/isNullable}}
|
||||
{{#oneOf}}
|
||||
{{#composedSchemas.oneOf}}
|
||||
{{^isNull}}
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="{{classname}}" /> class
|
||||
/// with the <see cref="{{{.}}}" /> class
|
||||
/// with the <see cref="{{dataType}}" /> class
|
||||
/// </summary>
|
||||
/// <param name="actualInstance">An instance of {{{.}}}.</param>
|
||||
public {{classname}}({{{.}}} actualInstance)
|
||||
/// <param name="actualInstance">An instance of {{dataType}}.</param>
|
||||
public {{classname}}({{{dataType}}} actualInstance)
|
||||
{
|
||||
this.IsNullable = {{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}};
|
||||
this.IsNullable = {{#model.isNullable}}true{{/model.isNullable}}{{^model.isNullable}}false{{/model.isNullable}};
|
||||
this.SchemaType= "oneOf";
|
||||
this.ActualInstance = actualInstance{{^isNullable}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isNullable}};
|
||||
this.ActualInstance = actualInstance{{^model.isNullable}}{{^isPrimitiveType}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isPrimitiveType}}{{#isPrimitiveType}}{{#isArray}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isArray}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isFreeFormObject}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isFreeFormObject}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isString}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isString}}{{/isPrimitiveType}}{{/model.isNullable}};
|
||||
}
|
||||
|
||||
{{/oneOf}}
|
||||
{{/isNull}}
|
||||
{{/composedSchemas.oneOf}}
|
||||
|
||||
private Object _actualInstance;
|
||||
|
||||
@ -56,18 +59,20 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
{{#oneOf}}
|
||||
{{#composedSchemas.oneOf}}
|
||||
{{^isNull}}
|
||||
|
||||
/// <summary>
|
||||
/// Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`,
|
||||
/// Get the actual instance of `{{dataType}}`. If the actual instance is not `{{dataType}}`,
|
||||
/// the InvalidClassException will be thrown
|
||||
/// </summary>
|
||||
/// <returns>An instance of {{{.}}}</returns>
|
||||
public {{{.}}} Get{{{.}}}()
|
||||
/// <returns>An instance of {{dataType}}</returns>
|
||||
public {{{dataType}}} Get{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}{{#isArray}}{{#lambda.titlecase}}{{{dataFormat}}}{{/lambda.titlecase}}{{/isArray}}()
|
||||
{
|
||||
return ({{{.}}})this.ActualInstance;
|
||||
return ({{{dataType}}})this.ActualInstance;
|
||||
}
|
||||
{{/oneOf}}
|
||||
{{/isNull}}
|
||||
{{/composedSchemas.oneOf}}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -272,3 +277,4 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
{{/model}}
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user