[csharp] Refactor anyOf model template (#18901)

* Refactor AnyOf model removed "this."

* Updated csharp samples
This commit is contained in:
Filipe Silva 2024-06-11 11:43:27 +01:00 committed by GitHub
parent 8357cc313b
commit 7f34e11a7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 361 additions and 361 deletions

View File

@ -18,8 +18,8 @@
/// </summary>
public {{classname}}()
{
this.IsNullable = true;
this.SchemaType= "anyOf";
IsNullable = true;
SchemaType= "anyOf";
}
{{/isNullable}}
@ -33,9 +33,9 @@
/// <param name="actualInstance">An instance of {{dataType}}.</param>
public {{classname}}({{{dataType}}} actualInstance)
{
this.IsNullable = {{#model.isNullable}}true{{/model.isNullable}}{{^model.isNullable}}false{{/model.isNullable}};
this.SchemaType= "anyOf";
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}};
IsNullable = {{#model.isNullable}}true{{/model.isNullable}}{{^model.isNullable}}false{{/model.isNullable}};
SchemaType= "anyOf";
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}};
}
{{/isNull}}
@ -58,7 +58,7 @@
{{#anyOf}}
{{^-first}}else {{/-first}}if (value.GetType() == typeof({{{.}}}))
{
this._actualInstance = value;
_actualInstance = value;
}
{{/anyOf}}
else
@ -78,7 +78,7 @@
/// <returns>An instance of {{dataType}}</returns>
public {{{dataType}}} Get{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}{{#isArray}}{{#lambda.titlecase}}{{{dataFormat}}}{{/lambda.titlecase}}{{/isArray}}()
{
return ({{{dataType}}})this.ActualInstance;
return ({{{dataType}}})ActualInstance;
}
{{/isNull}}
{{/vendorExtensions.x-duplicated-data-type}}
@ -92,7 +92,7 @@
{
var sb = new StringBuilder();
sb.Append("class {{classname}} {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -103,7 +103,7 @@
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, {{classname}}.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, {{classname}}.SerializerSettings);
}
/// <summary>
@ -150,7 +150,7 @@
return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual;
{{/useCompareNetObjects}}
{{^useCompareNetObjects}}
return this.Equals(input as {{classname}});
return Equals(input as {{classname}});
{{/useCompareNetObjects}}
}
@ -168,7 +168,7 @@
if (input == null)
return false;
return this.ActualInstance.Equals(input.ActualInstance);
return ActualInstance.Equals(input.ActualInstance);
{{/useCompareNetObjects}}
}
@ -181,8 +181,8 @@
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -42,9 +42,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Apple.</param>
public GmFruit(Apple actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -54,9 +54,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Banana.</param>
public GmFruit(Banana actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -75,11 +75,11 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(Apple))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(Banana))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -95,7 +95,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Apple</returns>
public Apple GetApple()
{
return (Apple)this.ActualInstance;
return (Apple)ActualInstance;
}
/// <summary>
@ -105,7 +105,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Banana</returns>
public Banana GetBanana()
{
return (Banana)this.ActualInstance;
return (Banana)ActualInstance;
}
/// <summary>
@ -116,7 +116,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class GmFruit {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -127,7 +127,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, GmFruit.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, GmFruit.SerializerSettings);
}
/// <summary>
@ -201,8 +201,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -42,9 +42,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of string.</param>
public MixedAnyOfContent(string actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -54,9 +54,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of bool.</param>
public MixedAnyOfContent(bool actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -66,9 +66,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of int.</param>
public MixedAnyOfContent(int actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -78,9 +78,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of decimal.</param>
public MixedAnyOfContent(decimal actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -90,9 +90,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of MixedSubId.</param>
public MixedAnyOfContent(MixedSubId actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -111,23 +111,23 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(MixedSubId))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(bool))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(decimal))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(int))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(string))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -143,7 +143,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of string</returns>
public string GetString()
{
return (string)this.ActualInstance;
return (string)ActualInstance;
}
/// <summary>
@ -153,7 +153,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of bool</returns>
public bool GetBool()
{
return (bool)this.ActualInstance;
return (bool)ActualInstance;
}
/// <summary>
@ -163,7 +163,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of int</returns>
public int GetInt()
{
return (int)this.ActualInstance;
return (int)ActualInstance;
}
/// <summary>
@ -173,7 +173,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of decimal</returns>
public decimal GetDecimal()
{
return (decimal)this.ActualInstance;
return (decimal)ActualInstance;
}
/// <summary>
@ -183,7 +183,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of MixedSubId</returns>
public MixedSubId GetMixedSubId()
{
return (MixedSubId)this.ActualInstance;
return (MixedSubId)ActualInstance;
}
/// <summary>
@ -194,7 +194,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class MixedAnyOfContent {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -205,7 +205,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, MixedAnyOfContent.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, MixedAnyOfContent.SerializerSettings);
}
/// <summary>
@ -315,8 +315,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -41,9 +41,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Apple.</param>
public GmFruit(Apple actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -53,9 +53,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Banana.</param>
public GmFruit(Banana actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -74,11 +74,11 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(Apple))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(Banana))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -94,7 +94,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Apple</returns>
public Apple GetApple()
{
return (Apple)this.ActualInstance;
return (Apple)ActualInstance;
}
/// <summary>
@ -104,7 +104,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Banana</returns>
public Banana GetBanana()
{
return (Banana)this.ActualInstance;
return (Banana)ActualInstance;
}
/// <summary>
@ -115,7 +115,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class GmFruit {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -126,7 +126,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, GmFruit.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, GmFruit.SerializerSettings);
}
/// <summary>
@ -200,8 +200,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -41,9 +41,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of string.</param>
public MixedAnyOfContent(string actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -53,9 +53,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of bool.</param>
public MixedAnyOfContent(bool actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -65,9 +65,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of int.</param>
public MixedAnyOfContent(int actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -77,9 +77,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of decimal.</param>
public MixedAnyOfContent(decimal actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -89,9 +89,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of MixedSubId.</param>
public MixedAnyOfContent(MixedSubId actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -110,23 +110,23 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(MixedSubId))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(bool))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(decimal))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(int))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(string))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of string</returns>
public string GetString()
{
return (string)this.ActualInstance;
return (string)ActualInstance;
}
/// <summary>
@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of bool</returns>
public bool GetBool()
{
return (bool)this.ActualInstance;
return (bool)ActualInstance;
}
/// <summary>
@ -162,7 +162,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of int</returns>
public int GetInt()
{
return (int)this.ActualInstance;
return (int)ActualInstance;
}
/// <summary>
@ -172,7 +172,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of decimal</returns>
public decimal GetDecimal()
{
return (decimal)this.ActualInstance;
return (decimal)ActualInstance;
}
/// <summary>
@ -182,7 +182,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of MixedSubId</returns>
public MixedSubId GetMixedSubId()
{
return (MixedSubId)this.ActualInstance;
return (MixedSubId)ActualInstance;
}
/// <summary>
@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class MixedAnyOfContent {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -204,7 +204,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, MixedAnyOfContent.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, MixedAnyOfContent.SerializerSettings);
}
/// <summary>
@ -314,8 +314,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -41,9 +41,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Apple.</param>
public GmFruit(Apple actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -53,9 +53,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Banana.</param>
public GmFruit(Banana actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -74,11 +74,11 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(Apple))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(Banana))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -94,7 +94,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Apple</returns>
public Apple GetApple()
{
return (Apple)this.ActualInstance;
return (Apple)ActualInstance;
}
/// <summary>
@ -104,7 +104,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Banana</returns>
public Banana GetBanana()
{
return (Banana)this.ActualInstance;
return (Banana)ActualInstance;
}
/// <summary>
@ -115,7 +115,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class GmFruit {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -126,7 +126,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, GmFruit.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, GmFruit.SerializerSettings);
}
/// <summary>
@ -200,8 +200,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -41,9 +41,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of string.</param>
public MixedAnyOfContent(string actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -53,9 +53,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of bool.</param>
public MixedAnyOfContent(bool actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -65,9 +65,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of int.</param>
public MixedAnyOfContent(int actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -77,9 +77,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of decimal.</param>
public MixedAnyOfContent(decimal actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -89,9 +89,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of MixedSubId.</param>
public MixedAnyOfContent(MixedSubId actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -110,23 +110,23 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(MixedSubId))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(bool))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(decimal))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(int))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(string))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of string</returns>
public string GetString()
{
return (string)this.ActualInstance;
return (string)ActualInstance;
}
/// <summary>
@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of bool</returns>
public bool GetBool()
{
return (bool)this.ActualInstance;
return (bool)ActualInstance;
}
/// <summary>
@ -162,7 +162,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of int</returns>
public int GetInt()
{
return (int)this.ActualInstance;
return (int)ActualInstance;
}
/// <summary>
@ -172,7 +172,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of decimal</returns>
public decimal GetDecimal()
{
return (decimal)this.ActualInstance;
return (decimal)ActualInstance;
}
/// <summary>
@ -182,7 +182,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of MixedSubId</returns>
public MixedSubId GetMixedSubId()
{
return (MixedSubId)this.ActualInstance;
return (MixedSubId)ActualInstance;
}
/// <summary>
@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class MixedAnyOfContent {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -204,7 +204,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, MixedAnyOfContent.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, MixedAnyOfContent.SerializerSettings);
}
/// <summary>
@ -314,8 +314,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -41,9 +41,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Apple.</param>
public GmFruit(Apple actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -53,9 +53,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Banana.</param>
public GmFruit(Banana actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -74,11 +74,11 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(Apple))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(Banana))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -94,7 +94,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Apple</returns>
public Apple GetApple()
{
return (Apple)this.ActualInstance;
return (Apple)ActualInstance;
}
/// <summary>
@ -104,7 +104,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Banana</returns>
public Banana GetBanana()
{
return (Banana)this.ActualInstance;
return (Banana)ActualInstance;
}
/// <summary>
@ -115,7 +115,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class GmFruit {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -126,7 +126,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, GmFruit.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, GmFruit.SerializerSettings);
}
/// <summary>
@ -200,8 +200,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -41,9 +41,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of string.</param>
public MixedAnyOfContent(string actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -53,9 +53,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of bool.</param>
public MixedAnyOfContent(bool actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -65,9 +65,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of int.</param>
public MixedAnyOfContent(int actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -77,9 +77,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of decimal.</param>
public MixedAnyOfContent(decimal actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -89,9 +89,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of MixedSubId.</param>
public MixedAnyOfContent(MixedSubId actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -110,23 +110,23 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(MixedSubId))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(bool))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(decimal))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(int))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(string))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of string</returns>
public string GetString()
{
return (string)this.ActualInstance;
return (string)ActualInstance;
}
/// <summary>
@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of bool</returns>
public bool GetBool()
{
return (bool)this.ActualInstance;
return (bool)ActualInstance;
}
/// <summary>
@ -162,7 +162,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of int</returns>
public int GetInt()
{
return (int)this.ActualInstance;
return (int)ActualInstance;
}
/// <summary>
@ -172,7 +172,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of decimal</returns>
public decimal GetDecimal()
{
return (decimal)this.ActualInstance;
return (decimal)ActualInstance;
}
/// <summary>
@ -182,7 +182,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of MixedSubId</returns>
public MixedSubId GetMixedSubId()
{
return (MixedSubId)this.ActualInstance;
return (MixedSubId)ActualInstance;
}
/// <summary>
@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class MixedAnyOfContent {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -204,7 +204,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, MixedAnyOfContent.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, MixedAnyOfContent.SerializerSettings);
}
/// <summary>
@ -314,8 +314,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -41,9 +41,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Apple.</param>
public GmFruit(Apple actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -53,9 +53,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Banana.</param>
public GmFruit(Banana actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -74,11 +74,11 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(Apple))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(Banana))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -94,7 +94,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Apple</returns>
public Apple GetApple()
{
return (Apple)this.ActualInstance;
return (Apple)ActualInstance;
}
/// <summary>
@ -104,7 +104,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Banana</returns>
public Banana GetBanana()
{
return (Banana)this.ActualInstance;
return (Banana)ActualInstance;
}
/// <summary>
@ -115,7 +115,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class GmFruit {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -126,7 +126,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, GmFruit.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, GmFruit.SerializerSettings);
}
/// <summary>
@ -200,8 +200,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -41,9 +41,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of string.</param>
public MixedAnyOfContent(string actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -53,9 +53,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of bool.</param>
public MixedAnyOfContent(bool actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -65,9 +65,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of int.</param>
public MixedAnyOfContent(int actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -77,9 +77,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of decimal.</param>
public MixedAnyOfContent(decimal actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -89,9 +89,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of MixedSubId.</param>
public MixedAnyOfContent(MixedSubId actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -110,23 +110,23 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(MixedSubId))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(bool))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(decimal))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(int))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(string))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of string</returns>
public string GetString()
{
return (string)this.ActualInstance;
return (string)ActualInstance;
}
/// <summary>
@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of bool</returns>
public bool GetBool()
{
return (bool)this.ActualInstance;
return (bool)ActualInstance;
}
/// <summary>
@ -162,7 +162,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of int</returns>
public int GetInt()
{
return (int)this.ActualInstance;
return (int)ActualInstance;
}
/// <summary>
@ -172,7 +172,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of decimal</returns>
public decimal GetDecimal()
{
return (decimal)this.ActualInstance;
return (decimal)ActualInstance;
}
/// <summary>
@ -182,7 +182,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of MixedSubId</returns>
public MixedSubId GetMixedSubId()
{
return (MixedSubId)this.ActualInstance;
return (MixedSubId)ActualInstance;
}
/// <summary>
@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class MixedAnyOfContent {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -204,7 +204,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, MixedAnyOfContent.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, MixedAnyOfContent.SerializerSettings);
}
/// <summary>
@ -314,8 +314,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -41,9 +41,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Apple.</param>
public GmFruit(Apple actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -53,9 +53,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Banana.</param>
public GmFruit(Banana actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -74,11 +74,11 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(Apple))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(Banana))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -94,7 +94,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Apple</returns>
public Apple GetApple()
{
return (Apple)this.ActualInstance;
return (Apple)ActualInstance;
}
/// <summary>
@ -104,7 +104,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Banana</returns>
public Banana GetBanana()
{
return (Banana)this.ActualInstance;
return (Banana)ActualInstance;
}
/// <summary>
@ -115,7 +115,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class GmFruit {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -126,7 +126,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, GmFruit.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, GmFruit.SerializerSettings);
}
/// <summary>
@ -200,8 +200,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -41,9 +41,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of string.</param>
public MixedAnyOfContent(string actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -53,9 +53,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of bool.</param>
public MixedAnyOfContent(bool actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -65,9 +65,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of int.</param>
public MixedAnyOfContent(int actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -77,9 +77,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of decimal.</param>
public MixedAnyOfContent(decimal actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -89,9 +89,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of MixedSubId.</param>
public MixedAnyOfContent(MixedSubId actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -110,23 +110,23 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(MixedSubId))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(bool))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(decimal))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(int))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(string))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of string</returns>
public string GetString()
{
return (string)this.ActualInstance;
return (string)ActualInstance;
}
/// <summary>
@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of bool</returns>
public bool GetBool()
{
return (bool)this.ActualInstance;
return (bool)ActualInstance;
}
/// <summary>
@ -162,7 +162,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of int</returns>
public int GetInt()
{
return (int)this.ActualInstance;
return (int)ActualInstance;
}
/// <summary>
@ -172,7 +172,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of decimal</returns>
public decimal GetDecimal()
{
return (decimal)this.ActualInstance;
return (decimal)ActualInstance;
}
/// <summary>
@ -182,7 +182,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of MixedSubId</returns>
public MixedSubId GetMixedSubId()
{
return (MixedSubId)this.ActualInstance;
return (MixedSubId)ActualInstance;
}
/// <summary>
@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class MixedAnyOfContent {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -204,7 +204,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, MixedAnyOfContent.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, MixedAnyOfContent.SerializerSettings);
}
/// <summary>
@ -314,8 +314,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -41,9 +41,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Apple.</param>
public GmFruit(Apple actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -53,9 +53,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Banana.</param>
public GmFruit(Banana actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -74,11 +74,11 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(Apple))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(Banana))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -94,7 +94,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Apple</returns>
public Apple GetApple()
{
return (Apple)this.ActualInstance;
return (Apple)ActualInstance;
}
/// <summary>
@ -104,7 +104,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Banana</returns>
public Banana GetBanana()
{
return (Banana)this.ActualInstance;
return (Banana)ActualInstance;
}
/// <summary>
@ -115,7 +115,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class GmFruit {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -126,7 +126,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, GmFruit.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, GmFruit.SerializerSettings);
}
/// <summary>
@ -200,8 +200,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -41,9 +41,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of string.</param>
public MixedAnyOfContent(string actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -53,9 +53,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of bool.</param>
public MixedAnyOfContent(bool actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -65,9 +65,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of int.</param>
public MixedAnyOfContent(int actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -77,9 +77,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of decimal.</param>
public MixedAnyOfContent(decimal actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -89,9 +89,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of MixedSubId.</param>
public MixedAnyOfContent(MixedSubId actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -110,23 +110,23 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(MixedSubId))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(bool))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(decimal))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(int))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(string))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of string</returns>
public string GetString()
{
return (string)this.ActualInstance;
return (string)ActualInstance;
}
/// <summary>
@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of bool</returns>
public bool GetBool()
{
return (bool)this.ActualInstance;
return (bool)ActualInstance;
}
/// <summary>
@ -162,7 +162,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of int</returns>
public int GetInt()
{
return (int)this.ActualInstance;
return (int)ActualInstance;
}
/// <summary>
@ -172,7 +172,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of decimal</returns>
public decimal GetDecimal()
{
return (decimal)this.ActualInstance;
return (decimal)ActualInstance;
}
/// <summary>
@ -182,7 +182,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of MixedSubId</returns>
public MixedSubId GetMixedSubId()
{
return (MixedSubId)this.ActualInstance;
return (MixedSubId)ActualInstance;
}
/// <summary>
@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class MixedAnyOfContent {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -204,7 +204,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, MixedAnyOfContent.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, MixedAnyOfContent.SerializerSettings);
}
/// <summary>
@ -314,8 +314,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -39,9 +39,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Apple.</param>
public GmFruit(Apple actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -51,9 +51,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of Banana.</param>
public GmFruit(Banana actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -72,11 +72,11 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(Apple))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(Banana))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -92,7 +92,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Apple</returns>
public Apple GetApple()
{
return (Apple)this.ActualInstance;
return (Apple)ActualInstance;
}
/// <summary>
@ -102,7 +102,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of Banana</returns>
public Banana GetBanana()
{
return (Banana)this.ActualInstance;
return (Banana)ActualInstance;
}
/// <summary>
@ -113,7 +113,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class GmFruit {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -124,7 +124,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, GmFruit.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, GmFruit.SerializerSettings);
}
/// <summary>
@ -176,7 +176,7 @@ namespace Org.OpenAPITools.Model
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as GmFruit);
return Equals(input as GmFruit);
}
/// <summary>
@ -189,7 +189,7 @@ namespace Org.OpenAPITools.Model
if (input == null)
return false;
return this.ActualInstance.Equals(input.ActualInstance);
return ActualInstance.Equals(input.ActualInstance);
}
/// <summary>
@ -201,8 +201,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}

View File

@ -39,9 +39,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of string.</param>
public MixedAnyOfContent(string actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
/// <summary>
@ -51,9 +51,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of bool.</param>
public MixedAnyOfContent(bool actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -63,9 +63,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of int.</param>
public MixedAnyOfContent(int actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -75,9 +75,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of decimal.</param>
public MixedAnyOfContent(decimal actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance;
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance;
}
/// <summary>
@ -87,9 +87,9 @@ namespace Org.OpenAPITools.Model
/// <param name="actualInstance">An instance of MixedSubId.</param>
public MixedAnyOfContent(MixedSubId actualInstance)
{
this.IsNullable = false;
this.SchemaType= "anyOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
IsNullable = false;
SchemaType= "anyOf";
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}
@ -108,23 +108,23 @@ namespace Org.OpenAPITools.Model
{
if (value.GetType() == typeof(MixedSubId))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(bool))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(decimal))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(int))
{
this._actualInstance = value;
_actualInstance = value;
}
else if (value.GetType() == typeof(string))
{
this._actualInstance = value;
_actualInstance = value;
}
else
{
@ -140,7 +140,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of string</returns>
public string GetString()
{
return (string)this.ActualInstance;
return (string)ActualInstance;
}
/// <summary>
@ -150,7 +150,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of bool</returns>
public bool GetBool()
{
return (bool)this.ActualInstance;
return (bool)ActualInstance;
}
/// <summary>
@ -160,7 +160,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of int</returns>
public int GetInt()
{
return (int)this.ActualInstance;
return (int)ActualInstance;
}
/// <summary>
@ -170,7 +170,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of decimal</returns>
public decimal GetDecimal()
{
return (decimal)this.ActualInstance;
return (decimal)ActualInstance;
}
/// <summary>
@ -180,7 +180,7 @@ namespace Org.OpenAPITools.Model
/// <returns>An instance of MixedSubId</returns>
public MixedSubId GetMixedSubId()
{
return (MixedSubId)this.ActualInstance;
return (MixedSubId)ActualInstance;
}
/// <summary>
@ -191,7 +191,7 @@ namespace Org.OpenAPITools.Model
{
var sb = new StringBuilder();
sb.Append("class MixedAnyOfContent {\n");
sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n");
sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -202,7 +202,7 @@ namespace Org.OpenAPITools.Model
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this.ActualInstance, MixedAnyOfContent.SerializerSettings);
return JsonConvert.SerializeObject(ActualInstance, MixedAnyOfContent.SerializerSettings);
}
/// <summary>
@ -290,7 +290,7 @@ namespace Org.OpenAPITools.Model
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as MixedAnyOfContent);
return Equals(input as MixedAnyOfContent);
}
/// <summary>
@ -303,7 +303,7 @@ namespace Org.OpenAPITools.Model
if (input == null)
return false;
return this.ActualInstance.Equals(input.ActualInstance);
return ActualInstance.Equals(input.ActualInstance);
}
/// <summary>
@ -315,8 +315,8 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.ActualInstance != null)
hashCode = hashCode * 59 + this.ActualInstance.GetHashCode();
if (ActualInstance != null)
hashCode = hashCode * 59 + ActualInstance.GetHashCode();
return hashCode;
}
}