diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpRefactorClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpRefactorClientCodegen.java
index 4ce60b82f1d..7eed37fdb87 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpRefactorClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpRefactorClientCodegen.java
@@ -592,7 +592,7 @@ public class CSharpRefactorClientCodegen extends AbstractCSharpCodegen {
parentVar.isInherited = true;
parentVar.hasMore = true;
last = parentVar;
- LOGGER.info("adding parent variable {}", property.name);
+ LOGGER.debug("adding parent variable {}", property.name);
codegenModel.parentVars.add(parentVar);
}
}
diff --git a/modules/openapi-generator/src/main/resources/csharp-refactor/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp-refactor/modelGeneric.mustache
index 44e2bb9a92f..36f99b42405 100644
--- a/modules/openapi-generator/src/main/resources/csharp-refactor/modelGeneric.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp-refactor/modelGeneric.mustache
@@ -3,8 +3,13 @@
///
[DataContract]
{{#discriminator}}
- [JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")]{{#children}}
- [JsonSubtypes.KnownSubType(typeof({{classname}}), "{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}")]{{/children}}
+ [JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")]
+ {{#children}}
+ [JsonSubtypes.KnownSubType(typeof({{classname}}), "{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}")]
+ {{/children}}
+ {{#mappedModels}}
+ [JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{{mappingName}}}")]
+ {{/mappedModels}}
{{/discriminator}}
{{#generatePropertyChanged}}
[ImplementPropertyChanged]
diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/README.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/README.md
index d557503f1af..9636dbeec5f 100644
--- a/samples/client/petstore/csharp-refactor/OpenAPIClient/README.md
+++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/README.md
@@ -169,6 +169,8 @@ Class | Method | HTTP request | Description
- [Model.Return](docs/Return.md)
- [Model.SpecialModelName](docs/SpecialModelName.md)
- [Model.Tag](docs/Tag.md)
+ - [Model.TypeHolderDefault](docs/TypeHolderDefault.md)
+ - [Model.TypeHolderExample](docs/TypeHolderExample.md)
- [Model.User](docs/User.md)
diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/TypeHolderDefault.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/TypeHolderDefault.md
new file mode 100644
index 00000000000..ccf43c723ec
--- /dev/null
+++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/TypeHolderDefault.md
@@ -0,0 +1,13 @@
+# Org.OpenAPITools.Model.TypeHolderDefault
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**StringItem** | **string** | | [default to "what"]
+**NumberItem** | **decimal** | |
+**IntegerItem** | **int** | |
+**BoolItem** | **bool** | | [default to true]
+**ArrayItem** | **List<int>** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/TypeHolderExample.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/TypeHolderExample.md
new file mode 100644
index 00000000000..c1b5b77f960
--- /dev/null
+++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/TypeHolderExample.md
@@ -0,0 +1,13 @@
+# Org.OpenAPITools.Model.TypeHolderExample
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**StringItem** | **string** | |
+**NumberItem** | **decimal** | |
+**IntegerItem** | **int** | |
+**BoolItem** | **bool** | |
+**ArrayItem** | **List<int>** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs
new file mode 100644
index 00000000000..f4c78879bf0
--- /dev/null
+++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs
@@ -0,0 +1,112 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using NUnit.Framework;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test
+{
+ ///
+ /// Class for testing TypeHolderDefault
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ [TestFixture]
+ public class TypeHolderDefaultTests
+ {
+ // TODO uncomment below to declare an instance variable for TypeHolderDefault
+ //private TypeHolderDefault instance;
+
+ ///
+ /// Setup before each test
+ ///
+ [SetUp]
+ public void Init()
+ {
+ // TODO uncomment below to create an instance of TypeHolderDefault
+ //instance = new TypeHolderDefault();
+ }
+
+ ///
+ /// Clean up after each test
+ ///
+ [TearDown]
+ public void Cleanup()
+ {
+
+ }
+
+ ///
+ /// Test an instance of TypeHolderDefault
+ ///
+ [Test]
+ public void TypeHolderDefaultInstanceTest()
+ {
+ // TODO uncomment below to test "IsInstanceOfType" TypeHolderDefault
+ //Assert.IsInstanceOfType (instance, "variable 'instance' is a TypeHolderDefault");
+ }
+
+
+ ///
+ /// Test the property 'StringItem'
+ ///
+ [Test]
+ public void StringItemTest()
+ {
+ // TODO unit test for the property 'StringItem'
+ }
+ ///
+ /// Test the property 'NumberItem'
+ ///
+ [Test]
+ public void NumberItemTest()
+ {
+ // TODO unit test for the property 'NumberItem'
+ }
+ ///
+ /// Test the property 'IntegerItem'
+ ///
+ [Test]
+ public void IntegerItemTest()
+ {
+ // TODO unit test for the property 'IntegerItem'
+ }
+ ///
+ /// Test the property 'BoolItem'
+ ///
+ [Test]
+ public void BoolItemTest()
+ {
+ // TODO unit test for the property 'BoolItem'
+ }
+ ///
+ /// Test the property 'ArrayItem'
+ ///
+ [Test]
+ public void ArrayItemTest()
+ {
+ // TODO unit test for the property 'ArrayItem'
+ }
+
+ }
+
+}
diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs
new file mode 100644
index 00000000000..a4760f2c4c9
--- /dev/null
+++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs
@@ -0,0 +1,112 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using NUnit.Framework;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test
+{
+ ///
+ /// Class for testing TypeHolderExample
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ [TestFixture]
+ public class TypeHolderExampleTests
+ {
+ // TODO uncomment below to declare an instance variable for TypeHolderExample
+ //private TypeHolderExample instance;
+
+ ///
+ /// Setup before each test
+ ///
+ [SetUp]
+ public void Init()
+ {
+ // TODO uncomment below to create an instance of TypeHolderExample
+ //instance = new TypeHolderExample();
+ }
+
+ ///
+ /// Clean up after each test
+ ///
+ [TearDown]
+ public void Cleanup()
+ {
+
+ }
+
+ ///
+ /// Test an instance of TypeHolderExample
+ ///
+ [Test]
+ public void TypeHolderExampleInstanceTest()
+ {
+ // TODO uncomment below to test "IsInstanceOfType" TypeHolderExample
+ //Assert.IsInstanceOfType (instance, "variable 'instance' is a TypeHolderExample");
+ }
+
+
+ ///
+ /// Test the property 'StringItem'
+ ///
+ [Test]
+ public void StringItemTest()
+ {
+ // TODO unit test for the property 'StringItem'
+ }
+ ///
+ /// Test the property 'NumberItem'
+ ///
+ [Test]
+ public void NumberItemTest()
+ {
+ // TODO unit test for the property 'NumberItem'
+ }
+ ///
+ /// Test the property 'IntegerItem'
+ ///
+ [Test]
+ public void IntegerItemTest()
+ {
+ // TODO unit test for the property 'IntegerItem'
+ }
+ ///
+ /// Test the property 'BoolItem'
+ ///
+ [Test]
+ public void BoolItemTest()
+ {
+ // TODO unit test for the property 'BoolItem'
+ }
+ ///
+ /// Test the property 'ArrayItem'
+ ///
+ [Test]
+ public void ArrayItemTest()
+ {
+ // TODO unit test for the property 'ArrayItem'
+ }
+
+ }
+
+}
diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs
new file mode 100644
index 00000000000..8be68877c78
--- /dev/null
+++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs
@@ -0,0 +1,212 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System.ComponentModel.DataAnnotations;
+using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
+using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
+
+namespace Org.OpenAPITools.Model
+{
+ ///
+ /// TypeHolderDefault
+ ///
+ [DataContract]
+ public partial class TypeHolderDefault : IEquatable, IValidatableObject
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ [JsonConstructorAttribute]
+ protected TypeHolderDefault() { }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// stringItem (required) (default to "what").
+ /// numberItem (required).
+ /// integerItem (required).
+ /// boolItem (required) (default to true).
+ /// arrayItem (required).
+ public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List arrayItem = default(List))
+ {
+ // to ensure "stringItem" is required (not null)
+ if (stringItem == null)
+ {
+ throw new InvalidDataException("stringItem is a required property for TypeHolderDefault and cannot be null");
+ }
+ else
+ {
+ this.StringItem = stringItem;
+ }
+
+ // to ensure "numberItem" is required (not null)
+ if (numberItem == null)
+ {
+ throw new InvalidDataException("numberItem is a required property for TypeHolderDefault and cannot be null");
+ }
+ else
+ {
+ this.NumberItem = numberItem;
+ }
+
+ // to ensure "integerItem" is required (not null)
+ if (integerItem == null)
+ {
+ throw new InvalidDataException("integerItem is a required property for TypeHolderDefault and cannot be null");
+ }
+ else
+ {
+ this.IntegerItem = integerItem;
+ }
+
+ // to ensure "boolItem" is required (not null)
+ if (boolItem == null)
+ {
+ throw new InvalidDataException("boolItem is a required property for TypeHolderDefault and cannot be null");
+ }
+ else
+ {
+ this.BoolItem = boolItem;
+ }
+
+ // to ensure "arrayItem" is required (not null)
+ if (arrayItem == null)
+ {
+ throw new InvalidDataException("arrayItem is a required property for TypeHolderDefault and cannot be null");
+ }
+ else
+ {
+ this.ArrayItem = arrayItem;
+ }
+
+ }
+
+ ///
+ /// Gets or Sets StringItem
+ ///
+ [DataMember(Name="string_item", EmitDefaultValue=false)]
+ public string StringItem { get; set; }
+
+ ///
+ /// Gets or Sets NumberItem
+ ///
+ [DataMember(Name="number_item", EmitDefaultValue=false)]
+ public decimal NumberItem { get; set; }
+
+ ///
+ /// Gets or Sets IntegerItem
+ ///
+ [DataMember(Name="integer_item", EmitDefaultValue=false)]
+ public int IntegerItem { get; set; }
+
+ ///
+ /// Gets or Sets BoolItem
+ ///
+ [DataMember(Name="bool_item", EmitDefaultValue=false)]
+ public bool BoolItem { get; set; }
+
+ ///
+ /// Gets or Sets ArrayItem
+ ///
+ [DataMember(Name="array_item", EmitDefaultValue=false)]
+ public List ArrayItem { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class TypeHolderDefault {\n");
+ sb.Append(" StringItem: ").Append(StringItem).Append("\n");
+ sb.Append(" NumberItem: ").Append(NumberItem).Append("\n");
+ sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n");
+ sb.Append(" BoolItem: ").Append(BoolItem).Append("\n");
+ sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonConvert.SerializeObject(this, Formatting.Indented);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object input)
+ {
+ return OpenAPIClientUtils.compareLogic.Compare(this, input as TypeHolderDefault).AreEqual;
+ }
+
+ ///
+ /// Returns true if TypeHolderDefault instances are equal
+ ///
+ /// Instance of TypeHolderDefault to be compared
+ /// Boolean
+ public bool Equals(TypeHolderDefault input)
+ {
+ return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (this.StringItem != null)
+ hashCode = hashCode * 59 + this.StringItem.GetHashCode();
+ if (this.NumberItem != null)
+ hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
+ if (this.IntegerItem != null)
+ hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
+ if (this.BoolItem != null)
+ hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
+ if (this.ArrayItem != null)
+ hashCode = hashCode * 59 + this.ArrayItem.GetHashCode();
+ return hashCode;
+ }
+ }
+
+ ///
+ /// To validate all properties of the instance
+ ///
+ /// Validation context
+ /// Validation Result
+ IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
+ }
+
+}
diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs
new file mode 100644
index 00000000000..83183b1d4a5
--- /dev/null
+++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs
@@ -0,0 +1,212 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System.ComponentModel.DataAnnotations;
+using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
+using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
+
+namespace Org.OpenAPITools.Model
+{
+ ///
+ /// TypeHolderExample
+ ///
+ [DataContract]
+ public partial class TypeHolderExample : IEquatable, IValidatableObject
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ [JsonConstructorAttribute]
+ protected TypeHolderExample() { }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// stringItem (required).
+ /// numberItem (required).
+ /// integerItem (required).
+ /// boolItem (required).
+ /// arrayItem (required).
+ public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List))
+ {
+ // to ensure "stringItem" is required (not null)
+ if (stringItem == null)
+ {
+ throw new InvalidDataException("stringItem is a required property for TypeHolderExample and cannot be null");
+ }
+ else
+ {
+ this.StringItem = stringItem;
+ }
+
+ // to ensure "numberItem" is required (not null)
+ if (numberItem == null)
+ {
+ throw new InvalidDataException("numberItem is a required property for TypeHolderExample and cannot be null");
+ }
+ else
+ {
+ this.NumberItem = numberItem;
+ }
+
+ // to ensure "integerItem" is required (not null)
+ if (integerItem == null)
+ {
+ throw new InvalidDataException("integerItem is a required property for TypeHolderExample and cannot be null");
+ }
+ else
+ {
+ this.IntegerItem = integerItem;
+ }
+
+ // to ensure "boolItem" is required (not null)
+ if (boolItem == null)
+ {
+ throw new InvalidDataException("boolItem is a required property for TypeHolderExample and cannot be null");
+ }
+ else
+ {
+ this.BoolItem = boolItem;
+ }
+
+ // to ensure "arrayItem" is required (not null)
+ if (arrayItem == null)
+ {
+ throw new InvalidDataException("arrayItem is a required property for TypeHolderExample and cannot be null");
+ }
+ else
+ {
+ this.ArrayItem = arrayItem;
+ }
+
+ }
+
+ ///
+ /// Gets or Sets StringItem
+ ///
+ [DataMember(Name="string_item", EmitDefaultValue=false)]
+ public string StringItem { get; set; }
+
+ ///
+ /// Gets or Sets NumberItem
+ ///
+ [DataMember(Name="number_item", EmitDefaultValue=false)]
+ public decimal NumberItem { get; set; }
+
+ ///
+ /// Gets or Sets IntegerItem
+ ///
+ [DataMember(Name="integer_item", EmitDefaultValue=false)]
+ public int IntegerItem { get; set; }
+
+ ///
+ /// Gets or Sets BoolItem
+ ///
+ [DataMember(Name="bool_item", EmitDefaultValue=false)]
+ public bool BoolItem { get; set; }
+
+ ///
+ /// Gets or Sets ArrayItem
+ ///
+ [DataMember(Name="array_item", EmitDefaultValue=false)]
+ public List ArrayItem { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class TypeHolderExample {\n");
+ sb.Append(" StringItem: ").Append(StringItem).Append("\n");
+ sb.Append(" NumberItem: ").Append(NumberItem).Append("\n");
+ sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n");
+ sb.Append(" BoolItem: ").Append(BoolItem).Append("\n");
+ sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonConvert.SerializeObject(this, Formatting.Indented);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object input)
+ {
+ return OpenAPIClientUtils.compareLogic.Compare(this, input as TypeHolderExample).AreEqual;
+ }
+
+ ///
+ /// Returns true if TypeHolderExample instances are equal
+ ///
+ /// Instance of TypeHolderExample to be compared
+ /// Boolean
+ public bool Equals(TypeHolderExample input)
+ {
+ return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (this.StringItem != null)
+ hashCode = hashCode * 59 + this.StringItem.GetHashCode();
+ if (this.NumberItem != null)
+ hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
+ if (this.IntegerItem != null)
+ hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
+ if (this.BoolItem != null)
+ hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
+ if (this.ArrayItem != null)
+ hashCode = hashCode * 59 + this.ArrayItem.GetHashCode();
+ return hashCode;
+ }
+ }
+
+ ///
+ /// To validate all properties of the instance
+ ///
+ /// Validation context
+ /// Validation Result
+ IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
+ }
+
+}