diff --git a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index b2c1365f903..5b726d69b9f 100644 --- a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -2836,108 +2836,6 @@ components: properties: id: type: string - # this class ensures that the CodegenProperties are sorted correctly - # https://github.com/OpenAPITools/openapi-generator/issues/18607 - MixLog: - type: object - properties: - id: - $ref: '#/components/schemas/uuid' - description: - type: string - mixDate: - type: string - format: date-time - shopId: - $ref: '#/components/schemas/uuid' - totalPrice: - type: number - format: float - nullable: true - totalRecalculations: - type: integer - format: int32 - totalOverPoors: - type: integer - format: int32 - totalSkips: - type: integer - format: int32 - totalUnderPours: - type: integer - format: int32 - formulaVersionDate: - type: string - format: date-time - someCode: - type: string - nullable: true - description: SomeCode is only required for color mixes - batchNumber: - type: string - brandCode: - type: string - description: BrandCode is only required for non-color mixes - brandId: - type: string - description: BrandId is only required for color mixes - brandName: - type: string - description: BrandName is only required for color mixes - categoryCode: - type: string - description: CategoryCode is not used anymore - color: - type: string - description: Color is only required for color mixes - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - type: string - description: ProductLineCode is only required for color mixes - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - nullable: true - type: integer - format: int32 - primerProductId: - type: string - productId: - type: string - description: ProductId is only required for color mixes - productName: - type: string - description: ProductName is only required for color mixes - selectedVersionIndex: - type: integer - format: int32 - required: - - id - - description - - mixDate - - totalRecalculations - - totalOverPoors - - totalSkips - - totalUnderPours - - formulaVersionDate - uuid: - type: string - format: uuid CopyActivity: type: object required: diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net4.7/FormModels/.openapi-generator/FILES index b9a5acbac34..930f03400a8 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/.openapi-generator/FILES @@ -64,7 +64,6 @@ docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md docs/models/MapTestMapOfEnumStringValue.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -223,7 +222,6 @@ src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs src/Org.OpenAPITools/Model/MapTestMapOfEnumStringValue.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml index 2430a21de4f..3c7d8aa3954 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml @@ -2592,108 +2592,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs index 14e2fd920e8..08b8e054141 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -102,7 +102,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new MapTestJsonConverter()); _jsonOptions.Converters.Add(new MapTestMapOfEnumStringValueJsonConverter()); _jsonOptions.Converters.Add(new MapTestMapOfEnumStringValueNullableJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index d18711f5103..00000000000 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1027 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new Option(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new Option(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new Option(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new Option(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new Option(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string Color { get { return this.ColorOption; } set { this.ColorOption = new Option(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new Option(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string Comment { get { return this.CommentOption; } set { this.CommentOption = new Option(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new Option(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string Country { get { return this.CountryOption; } set { this.CountryOption = new Option(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new Option(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new Option(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new Option(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new Option(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new Option(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new Option(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new Option(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new Option(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new Option(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new Option(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new Option(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new Option(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new Option(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new Option(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()); - break; - case "color": - color = new Option(utf8JsonReader.GetString()); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()); - break; - case "country": - country = new Option(utf8JsonReader.GetString()); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value, formulaVersionDate.Value.Value, id.Value.Value, mixDate.Value.Value, totalOverPoors.Value.Value, totalRecalculations.Value.Value, totalSkips.Value.Value, totalUnderPours.Value.Value, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value.Value); - else - writer.WriteNull("totalPrice"); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net4.7/Petstore/.openapi-generator/FILES index 80e274401fd..1facc69aec6 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/.openapi-generator/FILES @@ -56,7 +56,6 @@ docs/models/List.md docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -192,7 +191,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs index f4224c601f0..dbbc08df796 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -86,7 +86,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new LiteralStringClassJsonConverter()); _jsonOptions.Converters.Add(new MammalJsonConverter()); _jsonOptions.Converters.Add(new MapTestJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index d18711f5103..00000000000 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1027 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new Option(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new Option(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new Option(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new Option(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new Option(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string Color { get { return this.ColorOption; } set { this.ColorOption = new Option(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new Option(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string Comment { get { return this.CommentOption; } set { this.CommentOption = new Option(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new Option(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string Country { get { return this.CountryOption; } set { this.CountryOption = new Option(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new Option(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new Option(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new Option(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new Option(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new Option(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new Option(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new Option(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new Option(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new Option(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new Option(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new Option(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new Option(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new Option(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new Option(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()); - break; - case "color": - color = new Option(utf8JsonReader.GetString()); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()); - break; - case "country": - country = new Option(utf8JsonReader.GetString()); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value, formulaVersionDate.Value.Value, id.Value.Value, mixDate.Value.Value, totalOverPoors.Value.Value, totalRecalculations.Value.Value, totalSkips.Value.Value, totalUnderPours.Value.Value, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value.Value); - else - writer.WriteNull("totalPrice"); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net4.8/FormModels/.openapi-generator/FILES index b9a5acbac34..930f03400a8 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/.openapi-generator/FILES @@ -64,7 +64,6 @@ docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md docs/models/MapTestMapOfEnumStringValue.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -223,7 +222,6 @@ src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs src/Org.OpenAPITools/Model/MapTestMapOfEnumStringValue.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml index 2430a21de4f..3c7d8aa3954 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml @@ -2592,108 +2592,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs index 14e2fd920e8..08b8e054141 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -102,7 +102,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new MapTestJsonConverter()); _jsonOptions.Converters.Add(new MapTestMapOfEnumStringValueJsonConverter()); _jsonOptions.Converters.Add(new MapTestMapOfEnumStringValueNullableJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index d18711f5103..00000000000 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1027 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new Option(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new Option(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new Option(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new Option(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new Option(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string Color { get { return this.ColorOption; } set { this.ColorOption = new Option(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new Option(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string Comment { get { return this.CommentOption; } set { this.CommentOption = new Option(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new Option(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string Country { get { return this.CountryOption; } set { this.CountryOption = new Option(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new Option(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new Option(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new Option(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new Option(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new Option(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new Option(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new Option(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new Option(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new Option(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new Option(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new Option(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new Option(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new Option(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new Option(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()); - break; - case "color": - color = new Option(utf8JsonReader.GetString()); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()); - break; - case "country": - country = new Option(utf8JsonReader.GetString()); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value, formulaVersionDate.Value.Value, id.Value.Value, mixDate.Value.Value, totalOverPoors.Value.Value, totalRecalculations.Value.Value, totalSkips.Value.Value, totalUnderPours.Value.Value, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value.Value); - else - writer.WriteNull("totalPrice"); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net4.8/Petstore/.openapi-generator/FILES index 80e274401fd..1facc69aec6 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/.openapi-generator/FILES @@ -56,7 +56,6 @@ docs/models/List.md docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -192,7 +191,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs index f4224c601f0..dbbc08df796 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -86,7 +86,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new LiteralStringClassJsonConverter()); _jsonOptions.Converters.Add(new MammalJsonConverter()); _jsonOptions.Converters.Add(new MapTestJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index d18711f5103..00000000000 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1027 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new Option(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new Option(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new Option(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new Option(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new Option(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string Color { get { return this.ColorOption; } set { this.ColorOption = new Option(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new Option(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string Comment { get { return this.CommentOption; } set { this.CommentOption = new Option(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new Option(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string Country { get { return this.CountryOption; } set { this.CountryOption = new Option(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new Option(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new Option(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new Option(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new Option(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new Option(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new Option(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new Option(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new Option(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new Option(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new Option(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new Option(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new Option(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new Option(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new Option(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()); - break; - case "color": - color = new Option(utf8JsonReader.GetString()); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()); - break; - case "country": - country = new Option(utf8JsonReader.GetString()); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value, formulaVersionDate.Value.Value, id.Value.Value, mixDate.Value.Value, totalOverPoors.Value.Value, totalRecalculations.Value.Value, totalSkips.Value.Value, totalUnderPours.Value.Value, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value.Value); - else - writer.WriteNull("totalPrice"); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net8/FormModels/.openapi-generator/FILES index a1ef5edacd9..77738c830b4 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/.openapi-generator/FILES @@ -64,7 +64,6 @@ docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md docs/models/MapTestMapOfEnumStringValue.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -225,7 +224,6 @@ src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs src/Org.OpenAPITools/Model/MapTestMapOfEnumStringValue.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml index 2430a21de4f..3c7d8aa3954 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml @@ -2592,108 +2592,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/net8/FormModels/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs index a63f96c31ee..80118c6a1ec 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -104,7 +104,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new MapTestJsonConverter()); _jsonOptions.Converters.Add(new MapTestMapOfEnumStringValueJsonConverter()); _jsonOptions.Converters.Add(new MapTestMapOfEnumStringValueNullableJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index defed9c5c7c..00000000000 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1027 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string Color { get { return this.ColorOption; } set { this.ColorOption = new(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string Comment { get { return this.CommentOption; } set { this.CommentOption = new(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string Country { get { return this.CountryOption; } set { this.CountryOption = new(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()); - break; - case "color": - color = new Option(utf8JsonReader.GetString()); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()); - break; - case "country": - country = new Option(utf8JsonReader.GetString()); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value, formulaVersionDate.Value.Value, id.Value.Value, mixDate.Value.Value, totalOverPoors.Value.Value, totalRecalculations.Value.Value, totalSkips.Value.Value, totalUnderPours.Value.Value, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value.Value); - else - writer.WriteNull("totalPrice"); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/.openapi-generator/FILES index 2c3e342eac8..a24733a7c11 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/.openapi-generator/FILES @@ -56,7 +56,6 @@ docs/models/List.md docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -194,7 +193,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/HostConfiguration.cs index 240e556b9b3..1557552a768 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -90,7 +90,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new LiteralStringClassJsonConverter()); _jsonOptions.Converters.Add(new MammalJsonConverter()); _jsonOptions.Converters.Add(new MapTestJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index 564d9aa1a81..00000000000 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1029 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string? BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string? BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string? BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string? BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string? CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string? Color { get { return this.ColorOption; } set { this.ColorOption = new(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string? ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string? Comment { get { return this.CommentOption; } set { this.CommentOption = new(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string? CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string? Country { get { return this.CountryOption; } set { this.CountryOption = new(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string? CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string? CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string? CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string? DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string? DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string? PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string? ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string? ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string? ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string? SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()!); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()!); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()!); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()!); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()!); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()!); - break; - case "color": - color = new Option(utf8JsonReader.GetString()!); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()!); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()!); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()!); - break; - case "country": - country = new Option(utf8JsonReader.GetString()!); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()!); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()!); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()!); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()!); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()!); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()!); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()!); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()!); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()!); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value!, formulaVersionDate.Value!.Value!, id.Value!.Value!, mixDate.Value!.Value!, totalOverPoors.Value!.Value!, totalRecalculations.Value!.Value!, totalSkips.Value!.Value!, totalUnderPours.Value!.Value!, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value!.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value!.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value!.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value!.Value); - else - writer.WriteNull("totalPrice"); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net8/Petstore/.openapi-generator/FILES index 2c3e342eac8..a24733a7c11 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/.openapi-generator/FILES @@ -56,7 +56,6 @@ docs/models/List.md docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -194,7 +193,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/net8/Petstore/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs index b2246d1a538..47783040097 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -88,7 +88,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new LiteralStringClassJsonConverter()); _jsonOptions.Converters.Add(new MammalJsonConverter()); _jsonOptions.Converters.Add(new MapTestJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index defed9c5c7c..00000000000 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1027 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string Color { get { return this.ColorOption; } set { this.ColorOption = new(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string Comment { get { return this.CommentOption; } set { this.CommentOption = new(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string Country { get { return this.CountryOption; } set { this.CountryOption = new(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()); - break; - case "color": - color = new Option(utf8JsonReader.GetString()); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()); - break; - case "country": - country = new Option(utf8JsonReader.GetString()); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value, formulaVersionDate.Value.Value, id.Value.Value, mixDate.Value.Value, totalOverPoors.Value.Value, totalRecalculations.Value.Value, totalSkips.Value.Value, totalUnderPours.Value.Value, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value.Value); - else - writer.WriteNull("totalPrice"); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/.openapi-generator/FILES index 2c3e342eac8..a24733a7c11 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/.openapi-generator/FILES @@ -56,7 +56,6 @@ docs/models/List.md docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -194,7 +193,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/net8/SourceGeneration/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/HostConfiguration.cs index c7ce3c05913..9914ab629e3 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -90,7 +90,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new LiteralStringClassJsonConverter()); _jsonOptions.Converters.Add(new MammalJsonConverter()); _jsonOptions.Converters.Add(new MapTestJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); @@ -198,7 +197,6 @@ namespace Org.OpenAPITools.Client new LiteralStringClassSerializationContext(), new MammalSerializationContext(), new MapTestSerializationContext(), - new MixLogSerializationContext(), new MixedAnyOfSerializationContext(), new MixedAnyOfContentSerializationContext(), new MixedOneOfSerializationContext(), diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index 00252197397..00000000000 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1037 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Text.Json.Serialization.Metadata; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string? BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string? BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string? BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string? BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string? CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string? Color { get { return this.ColorOption; } set { this.ColorOption = new(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string? ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string? Comment { get { return this.CommentOption; } set { this.CommentOption = new(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string? CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string? Country { get { return this.CountryOption; } set { this.CountryOption = new(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string? CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string? CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string? CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string? DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string? DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string? PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string? ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string? ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string? ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string? SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()!); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()!); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()!); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()!); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()!); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()!); - break; - case "color": - color = new Option(utf8JsonReader.GetString()!); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()!); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()!); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()!); - break; - case "country": - country = new Option(utf8JsonReader.GetString()!); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()!); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()!); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()!); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()!); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()!); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()!); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()!); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()!); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()!); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value!, formulaVersionDate.Value!.Value!, id.Value!.Value!, mixDate.Value!.Value!, totalOverPoors.Value!.Value!, totalRecalculations.Value!.Value!, totalSkips.Value!.Value!, totalUnderPours.Value!.Value!, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value!.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value!.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value!.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value!.Value); - else - writer.WriteNull("totalPrice"); - } - } - - /// - /// The MixLogSerializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] - [JsonSerializable(typeof(MixLog))] - public partial class MixLogSerializationContext : JsonSerializerContext { } -} diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net9/FormModels/.openapi-generator/FILES index a1ef5edacd9..77738c830b4 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/.openapi-generator/FILES @@ -64,7 +64,6 @@ docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md docs/models/MapTestMapOfEnumStringValue.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -225,7 +224,6 @@ src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs src/Org.OpenAPITools/Model/MapTestMapOfEnumStringValue.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net9/FormModels/api/openapi.yaml index 2430a21de4f..3c7d8aa3954 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/api/openapi.yaml @@ -2592,108 +2592,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/net9/FormModels/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/net9/FormModels/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs index a63f96c31ee..80118c6a1ec 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -104,7 +104,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new MapTestJsonConverter()); _jsonOptions.Converters.Add(new MapTestMapOfEnumStringValueJsonConverter()); _jsonOptions.Converters.Add(new MapTestMapOfEnumStringValueNullableJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index defed9c5c7c..00000000000 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1027 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string Color { get { return this.ColorOption; } set { this.ColorOption = new(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string Comment { get { return this.CommentOption; } set { this.CommentOption = new(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string Country { get { return this.CountryOption; } set { this.CountryOption = new(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()); - break; - case "color": - color = new Option(utf8JsonReader.GetString()); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()); - break; - case "country": - country = new Option(utf8JsonReader.GetString()); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value, formulaVersionDate.Value.Value, id.Value.Value, mixDate.Value.Value, totalOverPoors.Value.Value, totalRecalculations.Value.Value, totalSkips.Value.Value, totalUnderPours.Value.Value, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value.Value); - else - writer.WriteNull("totalPrice"); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/.openapi-generator/FILES index 2c3e342eac8..a24733a7c11 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/.openapi-generator/FILES @@ -56,7 +56,6 @@ docs/models/List.md docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -194,7 +193,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Client/HostConfiguration.cs index 240e556b9b3..1557552a768 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -90,7 +90,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new LiteralStringClassJsonConverter()); _jsonOptions.Converters.Add(new MammalJsonConverter()); _jsonOptions.Converters.Add(new MapTestJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index 564d9aa1a81..00000000000 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1029 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string? BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string? BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string? BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string? BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string? CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string? Color { get { return this.ColorOption; } set { this.ColorOption = new(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string? ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string? Comment { get { return this.CommentOption; } set { this.CommentOption = new(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string? CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string? Country { get { return this.CountryOption; } set { this.CountryOption = new(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string? CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string? CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string? CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string? DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string? DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string? PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string? ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string? ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string? ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string? SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()!); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()!); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()!); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()!); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()!); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()!); - break; - case "color": - color = new Option(utf8JsonReader.GetString()!); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()!); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()!); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()!); - break; - case "country": - country = new Option(utf8JsonReader.GetString()!); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()!); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()!); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()!); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()!); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()!); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()!); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()!); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()!); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()!); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value!, formulaVersionDate.Value!.Value!, id.Value!.Value!, mixDate.Value!.Value!, totalOverPoors.Value!.Value!, totalRecalculations.Value!.Value!, totalSkips.Value!.Value!, totalUnderPours.Value!.Value!, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value!.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value!.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value!.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value!.Value); - else - writer.WriteNull("totalPrice"); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net9/Petstore/.openapi-generator/FILES index 2c3e342eac8..a24733a7c11 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/.openapi-generator/FILES @@ -56,7 +56,6 @@ docs/models/List.md docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -194,7 +193,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net9/Petstore/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/net9/Petstore/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/net9/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs index b2246d1a538..47783040097 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -88,7 +88,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new LiteralStringClassJsonConverter()); _jsonOptions.Converters.Add(new MammalJsonConverter()); _jsonOptions.Converters.Add(new MapTestJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index defed9c5c7c..00000000000 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1027 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string Color { get { return this.ColorOption; } set { this.ColorOption = new(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string Comment { get { return this.CommentOption; } set { this.CommentOption = new(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string Country { get { return this.CountryOption; } set { this.CountryOption = new(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()); - break; - case "color": - color = new Option(utf8JsonReader.GetString()); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()); - break; - case "country": - country = new Option(utf8JsonReader.GetString()); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value, formulaVersionDate.Value.Value, id.Value.Value, mixDate.Value.Value, totalOverPoors.Value.Value, totalRecalculations.Value.Value, totalSkips.Value.Value, totalUnderPours.Value.Value, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value.Value); - else - writer.WriteNull("totalPrice"); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/.openapi-generator/FILES index 2c3e342eac8..a24733a7c11 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/.openapi-generator/FILES @@ -56,7 +56,6 @@ docs/models/List.md docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -194,7 +193,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/net9/SourceGeneration/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Client/HostConfiguration.cs index c7ce3c05913..9914ab629e3 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -90,7 +90,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new LiteralStringClassJsonConverter()); _jsonOptions.Converters.Add(new MammalJsonConverter()); _jsonOptions.Converters.Add(new MapTestJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); @@ -198,7 +197,6 @@ namespace Org.OpenAPITools.Client new LiteralStringClassSerializationContext(), new MammalSerializationContext(), new MapTestSerializationContext(), - new MixLogSerializationContext(), new MixedAnyOfSerializationContext(), new MixedAnyOfContentSerializationContext(), new MixedOneOfSerializationContext(), diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index 00252197397..00000000000 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1037 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Text.Json.Serialization.Metadata; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string? BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string? BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string? BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string? BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string? CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string? Color { get { return this.ColorOption; } set { this.ColorOption = new(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string? ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string? Comment { get { return this.CommentOption; } set { this.CommentOption = new(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string? CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string? Country { get { return this.CountryOption; } set { this.CountryOption = new(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string? CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string? CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string? CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string? DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string? DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string? PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string? ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string? ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string? ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string? SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()!); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()!); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()!); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()!); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()!); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()!); - break; - case "color": - color = new Option(utf8JsonReader.GetString()!); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()!); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()!); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()!); - break; - case "country": - country = new Option(utf8JsonReader.GetString()!); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()!); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()!); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()!); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()!); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()!); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()!); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()!); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()!); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()!); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value!, formulaVersionDate.Value!.Value!, id.Value!.Value!, mixDate.Value!.Value!, totalOverPoors.Value!.Value!, totalRecalculations.Value!.Value!, totalSkips.Value!.Value!, totalUnderPours.Value!.Value!, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value!.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value!.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value!.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value!.Value); - else - writer.WriteNull("totalPrice"); - } - } - - /// - /// The MixLogSerializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] - [JsonSerializable(typeof(MixLog))] - public partial class MixLogSerializationContext : JsonSerializerContext { } -} diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/.openapi-generator/FILES index 80e274401fd..1facc69aec6 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/.openapi-generator/FILES @@ -56,7 +56,6 @@ docs/models/List.md docs/models/LiteralStringClass.md docs/models/Mammal.md docs/models/MapTest.md -docs/models/MixLog.md docs/models/MixedAnyOf.md docs/models/MixedAnyOfContent.md docs/models/MixedOneOf.md @@ -192,7 +191,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/models/MixLog.md b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/models/MixLog.md deleted file mode 100644 index 5184c03bea9..00000000000 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/models/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | | -**FormulaVersionDate** | **DateTime** | | -**Id** | **Guid** | | -**MixDate** | **DateTime** | | -**TotalOverPoors** | **int** | | -**TotalRecalculations** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] -**ShopId** | **Guid** | | [optional] -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**TotalPrice** | **float** | | [optional] - -[[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/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 3f108758fd2..00000000000 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs index f4224c601f0..dbbc08df796 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -86,7 +86,6 @@ namespace Org.OpenAPITools.Client _jsonOptions.Converters.Add(new LiteralStringClassJsonConverter()); _jsonOptions.Converters.Add(new MammalJsonConverter()); _jsonOptions.Converters.Add(new MapTestJsonConverter()); - _jsonOptions.Converters.Add(new MixLogJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfJsonConverter()); _jsonOptions.Converters.Add(new MixedAnyOfContentJsonConverter()); _jsonOptions.Converters.Add(new MixedOneOfJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index d18711f5103..00000000000 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1027 +0,0 @@ -// -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - public partial class MixLog : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// description - /// formulaVersionDate - /// id - /// mixDate - /// totalOverPoors - /// totalRecalculations - /// totalSkips - /// totalUnderPours - /// batchNumber - /// BrandCode is only required for non-color mixes - /// BrandId is only required for color mixes - /// BrandName is only required for color mixes - /// CategoryCode is not used anymore - /// Color is only required for color mixes - /// colorDescription - /// comment - /// commercialProductCode - /// country - /// createdBy - /// createdByFirstName - /// createdByLastName - /// deltaECalculationRepaired - /// deltaECalculationSprayout - /// ownColorVariantNumber - /// primerProductId - /// ProductId is only required for color mixes - /// ProductLineCode is only required for color mixes - /// ProductName is only required for color mixes - /// selectedVersionIndex - /// shopId - /// SomeCode is only required for color mixes - /// totalPrice - [JsonConstructor] - public MixLog(string description, DateTime formulaVersionDate, Guid id, DateTime mixDate, int totalOverPoors, int totalRecalculations, int totalSkips, int totalUnderPours, Option batchNumber = default, Option brandCode = default, Option brandId = default, Option brandName = default, Option categoryCode = default, Option color = default, Option colorDescription = default, Option comment = default, Option commercialProductCode = default, Option country = default, Option createdBy = default, Option createdByFirstName = default, Option createdByLastName = default, Option deltaECalculationRepaired = default, Option deltaECalculationSprayout = default, Option ownColorVariantNumber = default, Option primerProductId = default, Option productId = default, Option productLineCode = default, Option productName = default, Option selectedVersionIndex = default, Option shopId = default, Option someCode = default, Option totalPrice = default) - { - Description = description; - FormulaVersionDate = formulaVersionDate; - Id = id; - MixDate = mixDate; - TotalOverPoors = totalOverPoors; - TotalRecalculations = totalRecalculations; - TotalSkips = totalSkips; - TotalUnderPours = totalUnderPours; - BatchNumberOption = batchNumber; - BrandCodeOption = brandCode; - BrandIdOption = brandId; - BrandNameOption = brandName; - CategoryCodeOption = categoryCode; - ColorOption = color; - ColorDescriptionOption = colorDescription; - CommentOption = comment; - CommercialProductCodeOption = commercialProductCode; - CountryOption = country; - CreatedByOption = createdBy; - CreatedByFirstNameOption = createdByFirstName; - CreatedByLastNameOption = createdByLastName; - DeltaECalculationRepairedOption = deltaECalculationRepaired; - DeltaECalculationSprayoutOption = deltaECalculationSprayout; - OwnColorVariantNumberOption = ownColorVariantNumber; - PrimerProductIdOption = primerProductId; - ProductIdOption = productId; - ProductLineCodeOption = productLineCode; - ProductNameOption = productName; - SelectedVersionIndexOption = selectedVersionIndex; - ShopIdOption = shopId; - SomeCodeOption = someCode; - TotalPriceOption = totalPrice; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets Description - /// - [JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [JsonPropertyName("formulaVersionDate")] - public DateTime FormulaVersionDate { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public Guid Id { get; set; } - - /// - /// Gets or Sets MixDate - /// - [JsonPropertyName("mixDate")] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [JsonPropertyName("totalOverPoors")] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [JsonPropertyName("totalRecalculations")] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [JsonPropertyName("totalSkips")] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [JsonPropertyName("totalUnderPours")] - public int TotalUnderPours { get; set; } - - /// - /// Used to track the state of BatchNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BatchNumberOption { get; private set; } - - /// - /// Gets or Sets BatchNumber - /// - [JsonPropertyName("batchNumber")] - public string BatchNumber { get { return this.BatchNumberOption; } set { this.BatchNumberOption = new Option(value); } } - - /// - /// Used to track the state of BrandCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandCodeOption { get; private set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [JsonPropertyName("brandCode")] - public string BrandCode { get { return this.BrandCodeOption; } set { this.BrandCodeOption = new Option(value); } } - - /// - /// Used to track the state of BrandId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandIdOption { get; private set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [JsonPropertyName("brandId")] - public string BrandId { get { return this.BrandIdOption; } set { this.BrandIdOption = new Option(value); } } - - /// - /// Used to track the state of BrandName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrandNameOption { get; private set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [JsonPropertyName("brandName")] - public string BrandName { get { return this.BrandNameOption; } set { this.BrandNameOption = new Option(value); } } - - /// - /// Used to track the state of CategoryCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CategoryCodeOption { get; private set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [JsonPropertyName("categoryCode")] - public string CategoryCode { get { return this.CategoryCodeOption; } set { this.CategoryCodeOption = new Option(value); } } - - /// - /// Used to track the state of Color - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorOption { get; private set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [JsonPropertyName("color")] - public string Color { get { return this.ColorOption; } set { this.ColorOption = new Option(value); } } - - /// - /// Used to track the state of ColorDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColorDescriptionOption { get; private set; } - - /// - /// Gets or Sets ColorDescription - /// - [JsonPropertyName("colorDescription")] - public string ColorDescription { get { return this.ColorDescriptionOption; } set { this.ColorDescriptionOption = new Option(value); } } - - /// - /// Used to track the state of Comment - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommentOption { get; private set; } - - /// - /// Gets or Sets Comment - /// - [JsonPropertyName("comment")] - public string Comment { get { return this.CommentOption; } set { this.CommentOption = new Option(value); } } - - /// - /// Used to track the state of CommercialProductCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CommercialProductCodeOption { get; private set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [JsonPropertyName("commercialProductCode")] - public string CommercialProductCode { get { return this.CommercialProductCodeOption; } set { this.CommercialProductCodeOption = new Option(value); } } - - /// - /// Used to track the state of Country - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountryOption { get; private set; } - - /// - /// Gets or Sets Country - /// - [JsonPropertyName("country")] - public string Country { get { return this.CountryOption; } set { this.CountryOption = new Option(value); } } - - /// - /// Used to track the state of CreatedBy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByOption { get; private set; } - - /// - /// Gets or Sets CreatedBy - /// - [JsonPropertyName("createdBy")] - public string CreatedBy { get { return this.CreatedByOption; } set { this.CreatedByOption = new Option(value); } } - - /// - /// Used to track the state of CreatedByFirstName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByFirstNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [JsonPropertyName("createdByFirstName")] - public string CreatedByFirstName { get { return this.CreatedByFirstNameOption; } set { this.CreatedByFirstNameOption = new Option(value); } } - - /// - /// Used to track the state of CreatedByLastName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CreatedByLastNameOption { get; private set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [JsonPropertyName("createdByLastName")] - public string CreatedByLastName { get { return this.CreatedByLastNameOption; } set { this.CreatedByLastNameOption = new Option(value); } } - - /// - /// Used to track the state of DeltaECalculationRepaired - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationRepairedOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [JsonPropertyName("deltaECalculationRepaired")] - public string DeltaECalculationRepaired { get { return this.DeltaECalculationRepairedOption; } set { this.DeltaECalculationRepairedOption = new Option(value); } } - - /// - /// Used to track the state of DeltaECalculationSprayout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeltaECalculationSprayoutOption { get; private set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [JsonPropertyName("deltaECalculationSprayout")] - public string DeltaECalculationSprayout { get { return this.DeltaECalculationSprayoutOption; } set { this.DeltaECalculationSprayoutOption = new Option(value); } } - - /// - /// Used to track the state of OwnColorVariantNumber - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OwnColorVariantNumberOption { get; private set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [JsonPropertyName("ownColorVariantNumber")] - public int? OwnColorVariantNumber { get { return this.OwnColorVariantNumberOption; } set { this.OwnColorVariantNumberOption = new Option(value); } } - - /// - /// Used to track the state of PrimerProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PrimerProductIdOption { get; private set; } - - /// - /// Gets or Sets PrimerProductId - /// - [JsonPropertyName("primerProductId")] - public string PrimerProductId { get { return this.PrimerProductIdOption; } set { this.PrimerProductIdOption = new Option(value); } } - - /// - /// Used to track the state of ProductId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductIdOption { get; private set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [JsonPropertyName("productId")] - public string ProductId { get { return this.ProductIdOption; } set { this.ProductIdOption = new Option(value); } } - - /// - /// Used to track the state of ProductLineCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductLineCodeOption { get; private set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [JsonPropertyName("productLineCode")] - public string ProductLineCode { get { return this.ProductLineCodeOption; } set { this.ProductLineCodeOption = new Option(value); } } - - /// - /// Used to track the state of ProductName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProductNameOption { get; private set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [JsonPropertyName("productName")] - public string ProductName { get { return this.ProductNameOption; } set { this.ProductNameOption = new Option(value); } } - - /// - /// Used to track the state of SelectedVersionIndex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectedVersionIndexOption { get; private set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [JsonPropertyName("selectedVersionIndex")] - public int? SelectedVersionIndex { get { return this.SelectedVersionIndexOption; } set { this.SelectedVersionIndexOption = new Option(value); } } - - /// - /// Used to track the state of ShopId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShopIdOption { get; private set; } - - /// - /// Gets or Sets ShopId - /// - [JsonPropertyName("shopId")] - public Guid? ShopId { get { return this.ShopIdOption; } set { this.ShopIdOption = new Option(value); } } - - /// - /// Used to track the state of SomeCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SomeCodeOption { get; private set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [JsonPropertyName("someCode")] - public string SomeCode { get { return this.SomeCodeOption; } set { this.SomeCodeOption = new Option(value); } } - - /// - /// Used to track the state of TotalPrice - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TotalPriceOption { get; private set; } - - /// - /// Gets or Sets TotalPrice - /// - [JsonPropertyName("totalPrice")] - public float? TotalPrice { get { return this.TotalPriceOption; } set { this.TotalPriceOption = new Option(value); } } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class MixLogJsonConverter : JsonConverter - { - /// - /// The format to use to serialize FormulaVersionDate - /// - public static string FormulaVersionDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize MixDate - /// - public static string MixDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MixLog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option formulaVersionDate = default; - Option id = default; - Option mixDate = default; - Option totalOverPoors = default; - Option totalRecalculations = default; - Option totalSkips = default; - Option totalUnderPours = default; - Option batchNumber = default; - Option brandCode = default; - Option brandId = default; - Option brandName = default; - Option categoryCode = default; - Option color = default; - Option colorDescription = default; - Option comment = default; - Option commercialProductCode = default; - Option country = default; - Option createdBy = default; - Option createdByFirstName = default; - Option createdByLastName = default; - Option deltaECalculationRepaired = default; - Option deltaECalculationSprayout = default; - Option ownColorVariantNumber = default; - Option primerProductId = default; - Option productId = default; - Option productLineCode = default; - Option productName = default; - Option selectedVersionIndex = default; - Option shopId = default; - Option someCode = default; - Option totalPrice = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "description": - description = new Option(utf8JsonReader.GetString()); - break; - case "formulaVersionDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - formulaVersionDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "mixDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mixDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "totalOverPoors": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalOverPoors = new Option(utf8JsonReader.GetInt32()); - break; - case "totalRecalculations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalRecalculations = new Option(utf8JsonReader.GetInt32()); - break; - case "totalSkips": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalSkips = new Option(utf8JsonReader.GetInt32()); - break; - case "totalUnderPours": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalUnderPours = new Option(utf8JsonReader.GetInt32()); - break; - case "batchNumber": - batchNumber = new Option(utf8JsonReader.GetString()); - break; - case "brandCode": - brandCode = new Option(utf8JsonReader.GetString()); - break; - case "brandId": - brandId = new Option(utf8JsonReader.GetString()); - break; - case "brandName": - brandName = new Option(utf8JsonReader.GetString()); - break; - case "categoryCode": - categoryCode = new Option(utf8JsonReader.GetString()); - break; - case "color": - color = new Option(utf8JsonReader.GetString()); - break; - case "colorDescription": - colorDescription = new Option(utf8JsonReader.GetString()); - break; - case "comment": - comment = new Option(utf8JsonReader.GetString()); - break; - case "commercialProductCode": - commercialProductCode = new Option(utf8JsonReader.GetString()); - break; - case "country": - country = new Option(utf8JsonReader.GetString()); - break; - case "createdBy": - createdBy = new Option(utf8JsonReader.GetString()); - break; - case "createdByFirstName": - createdByFirstName = new Option(utf8JsonReader.GetString()); - break; - case "createdByLastName": - createdByLastName = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationRepaired": - deltaECalculationRepaired = new Option(utf8JsonReader.GetString()); - break; - case "deltaECalculationSprayout": - deltaECalculationSprayout = new Option(utf8JsonReader.GetString()); - break; - case "ownColorVariantNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ownColorVariantNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "primerProductId": - primerProductId = new Option(utf8JsonReader.GetString()); - break; - case "productId": - productId = new Option(utf8JsonReader.GetString()); - break; - case "productLineCode": - productLineCode = new Option(utf8JsonReader.GetString()); - break; - case "productName": - productName = new Option(utf8JsonReader.GetString()); - break; - case "selectedVersionIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectedVersionIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "shopId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shopId = new Option(utf8JsonReader.GetGuid()); - break; - case "someCode": - someCode = new Option(utf8JsonReader.GetString()); - break; - case "totalPrice": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalPrice = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!description.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(description)); - - if (!formulaVersionDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(formulaVersionDate)); - - if (!id.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(id)); - - if (!mixDate.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(mixDate)); - - if (!totalOverPoors.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalOverPoors)); - - if (!totalRecalculations.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalRecalculations)); - - if (!totalSkips.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalSkips)); - - if (!totalUnderPours.IsSet) - throw new ArgumentException("Property is required for class MixLog.", nameof(totalUnderPours)); - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class MixLog."); - - if (formulaVersionDate.IsSet && formulaVersionDate.Value == null) - throw new ArgumentNullException(nameof(formulaVersionDate), "Property is not nullable for class MixLog."); - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixLog."); - - if (mixDate.IsSet && mixDate.Value == null) - throw new ArgumentNullException(nameof(mixDate), "Property is not nullable for class MixLog."); - - if (totalOverPoors.IsSet && totalOverPoors.Value == null) - throw new ArgumentNullException(nameof(totalOverPoors), "Property is not nullable for class MixLog."); - - if (totalRecalculations.IsSet && totalRecalculations.Value == null) - throw new ArgumentNullException(nameof(totalRecalculations), "Property is not nullable for class MixLog."); - - if (totalSkips.IsSet && totalSkips.Value == null) - throw new ArgumentNullException(nameof(totalSkips), "Property is not nullable for class MixLog."); - - if (totalUnderPours.IsSet && totalUnderPours.Value == null) - throw new ArgumentNullException(nameof(totalUnderPours), "Property is not nullable for class MixLog."); - - if (batchNumber.IsSet && batchNumber.Value == null) - throw new ArgumentNullException(nameof(batchNumber), "Property is not nullable for class MixLog."); - - if (brandCode.IsSet && brandCode.Value == null) - throw new ArgumentNullException(nameof(brandCode), "Property is not nullable for class MixLog."); - - if (brandId.IsSet && brandId.Value == null) - throw new ArgumentNullException(nameof(brandId), "Property is not nullable for class MixLog."); - - if (brandName.IsSet && brandName.Value == null) - throw new ArgumentNullException(nameof(brandName), "Property is not nullable for class MixLog."); - - if (categoryCode.IsSet && categoryCode.Value == null) - throw new ArgumentNullException(nameof(categoryCode), "Property is not nullable for class MixLog."); - - if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class MixLog."); - - if (colorDescription.IsSet && colorDescription.Value == null) - throw new ArgumentNullException(nameof(colorDescription), "Property is not nullable for class MixLog."); - - if (comment.IsSet && comment.Value == null) - throw new ArgumentNullException(nameof(comment), "Property is not nullable for class MixLog."); - - if (commercialProductCode.IsSet && commercialProductCode.Value == null) - throw new ArgumentNullException(nameof(commercialProductCode), "Property is not nullable for class MixLog."); - - if (country.IsSet && country.Value == null) - throw new ArgumentNullException(nameof(country), "Property is not nullable for class MixLog."); - - if (createdBy.IsSet && createdBy.Value == null) - throw new ArgumentNullException(nameof(createdBy), "Property is not nullable for class MixLog."); - - if (createdByFirstName.IsSet && createdByFirstName.Value == null) - throw new ArgumentNullException(nameof(createdByFirstName), "Property is not nullable for class MixLog."); - - if (createdByLastName.IsSet && createdByLastName.Value == null) - throw new ArgumentNullException(nameof(createdByLastName), "Property is not nullable for class MixLog."); - - if (deltaECalculationRepaired.IsSet && deltaECalculationRepaired.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationRepaired), "Property is not nullable for class MixLog."); - - if (deltaECalculationSprayout.IsSet && deltaECalculationSprayout.Value == null) - throw new ArgumentNullException(nameof(deltaECalculationSprayout), "Property is not nullable for class MixLog."); - - if (primerProductId.IsSet && primerProductId.Value == null) - throw new ArgumentNullException(nameof(primerProductId), "Property is not nullable for class MixLog."); - - if (productId.IsSet && productId.Value == null) - throw new ArgumentNullException(nameof(productId), "Property is not nullable for class MixLog."); - - if (productLineCode.IsSet && productLineCode.Value == null) - throw new ArgumentNullException(nameof(productLineCode), "Property is not nullable for class MixLog."); - - if (productName.IsSet && productName.Value == null) - throw new ArgumentNullException(nameof(productName), "Property is not nullable for class MixLog."); - - if (selectedVersionIndex.IsSet && selectedVersionIndex.Value == null) - throw new ArgumentNullException(nameof(selectedVersionIndex), "Property is not nullable for class MixLog."); - - if (shopId.IsSet && shopId.Value == null) - throw new ArgumentNullException(nameof(shopId), "Property is not nullable for class MixLog."); - - return new MixLog(description.Value, formulaVersionDate.Value.Value, id.Value.Value, mixDate.Value.Value, totalOverPoors.Value.Value, totalRecalculations.Value.Value, totalSkips.Value.Value, totalUnderPours.Value.Value, batchNumber, brandCode, brandId, brandName, categoryCode, color, colorDescription, comment, commercialProductCode, country, createdBy, createdByFirstName, createdByLastName, deltaECalculationRepaired, deltaECalculationSprayout, ownColorVariantNumber, primerProductId, productId, productLineCode, productName, selectedVersionIndex, shopId, someCode, totalPrice); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mixLog, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MixLog mixLog, JsonSerializerOptions jsonSerializerOptions) - { - if (mixLog.Description == null) - throw new ArgumentNullException(nameof(mixLog.Description), "Property is required for class MixLog."); - - if (mixLog.BatchNumberOption.IsSet && mixLog.BatchNumber == null) - throw new ArgumentNullException(nameof(mixLog.BatchNumber), "Property is required for class MixLog."); - - if (mixLog.BrandCodeOption.IsSet && mixLog.BrandCode == null) - throw new ArgumentNullException(nameof(mixLog.BrandCode), "Property is required for class MixLog."); - - if (mixLog.BrandIdOption.IsSet && mixLog.BrandId == null) - throw new ArgumentNullException(nameof(mixLog.BrandId), "Property is required for class MixLog."); - - if (mixLog.BrandNameOption.IsSet && mixLog.BrandName == null) - throw new ArgumentNullException(nameof(mixLog.BrandName), "Property is required for class MixLog."); - - if (mixLog.CategoryCodeOption.IsSet && mixLog.CategoryCode == null) - throw new ArgumentNullException(nameof(mixLog.CategoryCode), "Property is required for class MixLog."); - - if (mixLog.ColorOption.IsSet && mixLog.Color == null) - throw new ArgumentNullException(nameof(mixLog.Color), "Property is required for class MixLog."); - - if (mixLog.ColorDescriptionOption.IsSet && mixLog.ColorDescription == null) - throw new ArgumentNullException(nameof(mixLog.ColorDescription), "Property is required for class MixLog."); - - if (mixLog.CommentOption.IsSet && mixLog.Comment == null) - throw new ArgumentNullException(nameof(mixLog.Comment), "Property is required for class MixLog."); - - if (mixLog.CommercialProductCodeOption.IsSet && mixLog.CommercialProductCode == null) - throw new ArgumentNullException(nameof(mixLog.CommercialProductCode), "Property is required for class MixLog."); - - if (mixLog.CountryOption.IsSet && mixLog.Country == null) - throw new ArgumentNullException(nameof(mixLog.Country), "Property is required for class MixLog."); - - if (mixLog.CreatedByOption.IsSet && mixLog.CreatedBy == null) - throw new ArgumentNullException(nameof(mixLog.CreatedBy), "Property is required for class MixLog."); - - if (mixLog.CreatedByFirstNameOption.IsSet && mixLog.CreatedByFirstName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByFirstName), "Property is required for class MixLog."); - - if (mixLog.CreatedByLastNameOption.IsSet && mixLog.CreatedByLastName == null) - throw new ArgumentNullException(nameof(mixLog.CreatedByLastName), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationRepairedOption.IsSet && mixLog.DeltaECalculationRepaired == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationRepaired), "Property is required for class MixLog."); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet && mixLog.DeltaECalculationSprayout == null) - throw new ArgumentNullException(nameof(mixLog.DeltaECalculationSprayout), "Property is required for class MixLog."); - - if (mixLog.PrimerProductIdOption.IsSet && mixLog.PrimerProductId == null) - throw new ArgumentNullException(nameof(mixLog.PrimerProductId), "Property is required for class MixLog."); - - if (mixLog.ProductIdOption.IsSet && mixLog.ProductId == null) - throw new ArgumentNullException(nameof(mixLog.ProductId), "Property is required for class MixLog."); - - if (mixLog.ProductLineCodeOption.IsSet && mixLog.ProductLineCode == null) - throw new ArgumentNullException(nameof(mixLog.ProductLineCode), "Property is required for class MixLog."); - - if (mixLog.ProductNameOption.IsSet && mixLog.ProductName == null) - throw new ArgumentNullException(nameof(mixLog.ProductName), "Property is required for class MixLog."); - - writer.WriteString("description", mixLog.Description); - - writer.WriteString("formulaVersionDate", mixLog.FormulaVersionDate.ToString(FormulaVersionDateFormat)); - - writer.WriteString("id", mixLog.Id); - - writer.WriteString("mixDate", mixLog.MixDate.ToString(MixDateFormat)); - - writer.WriteNumber("totalOverPoors", mixLog.TotalOverPoors); - - writer.WriteNumber("totalRecalculations", mixLog.TotalRecalculations); - - writer.WriteNumber("totalSkips", mixLog.TotalSkips); - - writer.WriteNumber("totalUnderPours", mixLog.TotalUnderPours); - - if (mixLog.BatchNumberOption.IsSet) - writer.WriteString("batchNumber", mixLog.BatchNumber); - - if (mixLog.BrandCodeOption.IsSet) - writer.WriteString("brandCode", mixLog.BrandCode); - - if (mixLog.BrandIdOption.IsSet) - writer.WriteString("brandId", mixLog.BrandId); - - if (mixLog.BrandNameOption.IsSet) - writer.WriteString("brandName", mixLog.BrandName); - - if (mixLog.CategoryCodeOption.IsSet) - writer.WriteString("categoryCode", mixLog.CategoryCode); - - if (mixLog.ColorOption.IsSet) - writer.WriteString("color", mixLog.Color); - - if (mixLog.ColorDescriptionOption.IsSet) - writer.WriteString("colorDescription", mixLog.ColorDescription); - - if (mixLog.CommentOption.IsSet) - writer.WriteString("comment", mixLog.Comment); - - if (mixLog.CommercialProductCodeOption.IsSet) - writer.WriteString("commercialProductCode", mixLog.CommercialProductCode); - - if (mixLog.CountryOption.IsSet) - writer.WriteString("country", mixLog.Country); - - if (mixLog.CreatedByOption.IsSet) - writer.WriteString("createdBy", mixLog.CreatedBy); - - if (mixLog.CreatedByFirstNameOption.IsSet) - writer.WriteString("createdByFirstName", mixLog.CreatedByFirstName); - - if (mixLog.CreatedByLastNameOption.IsSet) - writer.WriteString("createdByLastName", mixLog.CreatedByLastName); - - if (mixLog.DeltaECalculationRepairedOption.IsSet) - writer.WriteString("deltaECalculationRepaired", mixLog.DeltaECalculationRepaired); - - if (mixLog.DeltaECalculationSprayoutOption.IsSet) - writer.WriteString("deltaECalculationSprayout", mixLog.DeltaECalculationSprayout); - - if (mixLog.OwnColorVariantNumberOption.IsSet) - if (mixLog.OwnColorVariantNumberOption.Value != null) - writer.WriteNumber("ownColorVariantNumber", mixLog.OwnColorVariantNumberOption.Value.Value); - else - writer.WriteNull("ownColorVariantNumber"); - - if (mixLog.PrimerProductIdOption.IsSet) - writer.WriteString("primerProductId", mixLog.PrimerProductId); - - if (mixLog.ProductIdOption.IsSet) - writer.WriteString("productId", mixLog.ProductId); - - if (mixLog.ProductLineCodeOption.IsSet) - writer.WriteString("productLineCode", mixLog.ProductLineCode); - - if (mixLog.ProductNameOption.IsSet) - writer.WriteString("productName", mixLog.ProductName); - - if (mixLog.SelectedVersionIndexOption.IsSet) - writer.WriteNumber("selectedVersionIndex", mixLog.SelectedVersionIndexOption.Value.Value); - - if (mixLog.ShopIdOption.IsSet) - writer.WriteString("shopId", mixLog.ShopIdOption.Value.Value); - - if (mixLog.SomeCodeOption.IsSet) - if (mixLog.SomeCodeOption.Value != null) - writer.WriteString("someCode", mixLog.SomeCode); - else - writer.WriteNull("someCode"); - - if (mixLog.TotalPriceOption.IsSet) - if (mixLog.TotalPriceOption.Value != null) - writer.WriteNumber("totalPrice", mixLog.TotalPriceOption.Value.Value); - else - writer.WriteNull("totalPrice"); - } - } -} diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/httpclient/net9/Petstore/.openapi-generator/FILES index 89ea02c0b61..8bda3ce3fe7 100644 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/.openapi-generator/FILES @@ -53,7 +53,6 @@ docs/List.md docs/LiteralStringClass.md docs/Mammal.md docs/MapTest.md -docs/MixLog.md docs/MixedAnyOf.md docs/MixedAnyOfContent.md docs/MixedOneOf.md @@ -182,7 +181,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/README.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/README.md index 850a233587d..e1623481f18 100644 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore/README.md +++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/README.md @@ -240,7 +240,6 @@ Class | Method | HTTP request | Description - [Model.LiteralStringClass](docs/LiteralStringClass.md) - [Model.Mammal](docs/Mammal.md) - [Model.MapTest](docs/MapTest.md) - - [Model.MixLog](docs/MixLog.md) - [Model.MixedAnyOf](docs/MixedAnyOf.md) - [Model.MixedAnyOfContent](docs/MixedAnyOfContent.md) - [Model.MixedOneOf](docs/MixedOneOf.md) diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixLog.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixLog.md deleted file mode 100644 index 1872e30daaa..00000000000 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **Guid** | | -**Description** | **string** | | -**MixDate** | **DateTime** | | -**ShopId** | **Guid** | | [optional] -**TotalPrice** | **float?** | | [optional] -**TotalRecalculations** | **int** | | -**TotalOverPoors** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**FormulaVersionDate** | **DateTime** | | -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int?** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] - -[[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/httpclient/net9/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 887be61a957..00000000000 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,345 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - } -} diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index 31e0e4e46e3..00000000000 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,543 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using FileParameter = Org.OpenAPITools.Client.FileParameter; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - [DataContract(Name = "MixLog")] - public partial class MixLog : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MixLog() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// id (required). - /// description (required). - /// mixDate (required). - /// shopId. - /// totalPrice. - /// totalRecalculations (required). - /// totalOverPoors (required). - /// totalSkips (required). - /// totalUnderPours (required). - /// formulaVersionDate (required). - /// SomeCode is only required for color mixes. - /// batchNumber. - /// BrandCode is only required for non-color mixes. - /// BrandId is only required for color mixes. - /// BrandName is only required for color mixes. - /// CategoryCode is not used anymore. - /// Color is only required for color mixes. - /// colorDescription. - /// comment. - /// commercialProductCode. - /// ProductLineCode is only required for color mixes. - /// country. - /// createdBy. - /// createdByFirstName. - /// createdByLastName. - /// deltaECalculationRepaired. - /// deltaECalculationSprayout. - /// ownColorVariantNumber. - /// primerProductId. - /// ProductId is only required for color mixes. - /// ProductName is only required for color mixes. - /// selectedVersionIndex. - public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Guid shopId = default(Guid), float? totalPrice = default(float?), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), string someCode = default(string), string batchNumber = default(string), string brandCode = default(string), string brandId = default(string), string brandName = default(string), string categoryCode = default(string), string color = default(string), string colorDescription = default(string), string comment = default(string), string commercialProductCode = default(string), string productLineCode = default(string), string country = default(string), string createdBy = default(string), string createdByFirstName = default(string), string createdByLastName = default(string), string deltaECalculationRepaired = default(string), string deltaECalculationSprayout = default(string), int? ownColorVariantNumber = default(int?), string primerProductId = default(string), string productId = default(string), string productName = default(string), int selectedVersionIndex = default(int)) - { - this.Id = id; - // to ensure "description" is required (not null) - if (description == null) - { - throw new ArgumentNullException("description is a required property for MixLog and cannot be null"); - } - this.Description = description; - this.MixDate = mixDate; - this.TotalRecalculations = totalRecalculations; - this.TotalOverPoors = totalOverPoors; - this.TotalSkips = totalSkips; - this.TotalUnderPours = totalUnderPours; - this.FormulaVersionDate = formulaVersionDate; - this.ShopId = shopId; - this.TotalPrice = totalPrice; - this.SomeCode = someCode; - this.BatchNumber = batchNumber; - this.BrandCode = brandCode; - this.BrandId = brandId; - this.BrandName = brandName; - this.CategoryCode = categoryCode; - this.Color = color; - this.ColorDescription = colorDescription; - this.Comment = comment; - this.CommercialProductCode = commercialProductCode; - this.ProductLineCode = productLineCode; - this.Country = country; - this.CreatedBy = createdBy; - this.CreatedByFirstName = createdByFirstName; - this.CreatedByLastName = createdByLastName; - this.DeltaECalculationRepaired = deltaECalculationRepaired; - this.DeltaECalculationSprayout = deltaECalculationSprayout; - this.OwnColorVariantNumber = ownColorVariantNumber; - this.PrimerProductId = primerProductId; - this.ProductId = productId; - this.ProductName = productName; - this.SelectedVersionIndex = selectedVersionIndex; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] - public Guid Id { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets MixDate - /// - [DataMember(Name = "mixDate", IsRequired = true, EmitDefaultValue = true)] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets ShopId - /// - [DataMember(Name = "shopId", EmitDefaultValue = false)] - public Guid ShopId { get; set; } - - /// - /// Gets or Sets TotalPrice - /// - [DataMember(Name = "totalPrice", EmitDefaultValue = true)] - public float? TotalPrice { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [DataMember(Name = "totalRecalculations", IsRequired = true, EmitDefaultValue = true)] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [DataMember(Name = "totalOverPoors", IsRequired = true, EmitDefaultValue = true)] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [DataMember(Name = "totalSkips", IsRequired = true, EmitDefaultValue = true)] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [DataMember(Name = "totalUnderPours", IsRequired = true, EmitDefaultValue = true)] - public int TotalUnderPours { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [DataMember(Name = "formulaVersionDate", IsRequired = true, EmitDefaultValue = true)] - public DateTime FormulaVersionDate { get; set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [DataMember(Name = "someCode", EmitDefaultValue = true)] - public string SomeCode { get; set; } - - /// - /// Gets or Sets BatchNumber - /// - [DataMember(Name = "batchNumber", EmitDefaultValue = false)] - public string BatchNumber { get; set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [DataMember(Name = "brandCode", EmitDefaultValue = false)] - public string BrandCode { get; set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [DataMember(Name = "brandId", EmitDefaultValue = false)] - public string BrandId { get; set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [DataMember(Name = "brandName", EmitDefaultValue = false)] - public string BrandName { get; set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [DataMember(Name = "categoryCode", EmitDefaultValue = false)] - public string CategoryCode { get; set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } - - /// - /// Gets or Sets ColorDescription - /// - [DataMember(Name = "colorDescription", EmitDefaultValue = false)] - public string ColorDescription { get; set; } - - /// - /// Gets or Sets Comment - /// - [DataMember(Name = "comment", EmitDefaultValue = false)] - public string Comment { get; set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [DataMember(Name = "commercialProductCode", EmitDefaultValue = false)] - public string CommercialProductCode { get; set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [DataMember(Name = "productLineCode", EmitDefaultValue = false)] - public string ProductLineCode { get; set; } - - /// - /// Gets or Sets Country - /// - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// Gets or Sets CreatedBy - /// - [DataMember(Name = "createdBy", EmitDefaultValue = false)] - public string CreatedBy { get; set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [DataMember(Name = "createdByFirstName", EmitDefaultValue = false)] - public string CreatedByFirstName { get; set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [DataMember(Name = "createdByLastName", EmitDefaultValue = false)] - public string CreatedByLastName { get; set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [DataMember(Name = "deltaECalculationRepaired", EmitDefaultValue = false)] - public string DeltaECalculationRepaired { get; set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [DataMember(Name = "deltaECalculationSprayout", EmitDefaultValue = false)] - public string DeltaECalculationSprayout { get; set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [DataMember(Name = "ownColorVariantNumber", EmitDefaultValue = true)] - public int? OwnColorVariantNumber { get; set; } - - /// - /// Gets or Sets PrimerProductId - /// - [DataMember(Name = "primerProductId", EmitDefaultValue = false)] - public string PrimerProductId { get; set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [DataMember(Name = "productId", EmitDefaultValue = false)] - public string ProductId { get; set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [DataMember(Name = "productName", EmitDefaultValue = false)] - public string ProductName { get; set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [DataMember(Name = "selectedVersionIndex", EmitDefaultValue = false)] - public int SelectedVersionIndex { get; set; } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).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 Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 MixLog).AreEqual; - } - - /// - /// Returns true if MixLog instances are equal - /// - /// Instance of MixLog to be compared - /// Boolean - public bool Equals(MixLog 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.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.MixDate != null) - { - hashCode = (hashCode * 59) + this.MixDate.GetHashCode(); - } - if (this.ShopId != null) - { - hashCode = (hashCode * 59) + this.ShopId.GetHashCode(); - } - if (this.TotalPrice != null) - { - hashCode = (hashCode * 59) + this.TotalPrice.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TotalRecalculations.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalOverPoors.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalSkips.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalUnderPours.GetHashCode(); - if (this.FormulaVersionDate != null) - { - hashCode = (hashCode * 59) + this.FormulaVersionDate.GetHashCode(); - } - if (this.SomeCode != null) - { - hashCode = (hashCode * 59) + this.SomeCode.GetHashCode(); - } - if (this.BatchNumber != null) - { - hashCode = (hashCode * 59) + this.BatchNumber.GetHashCode(); - } - if (this.BrandCode != null) - { - hashCode = (hashCode * 59) + this.BrandCode.GetHashCode(); - } - if (this.BrandId != null) - { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); - } - if (this.BrandName != null) - { - hashCode = (hashCode * 59) + this.BrandName.GetHashCode(); - } - if (this.CategoryCode != null) - { - hashCode = (hashCode * 59) + this.CategoryCode.GetHashCode(); - } - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - if (this.ColorDescription != null) - { - hashCode = (hashCode * 59) + this.ColorDescription.GetHashCode(); - } - if (this.Comment != null) - { - hashCode = (hashCode * 59) + this.Comment.GetHashCode(); - } - if (this.CommercialProductCode != null) - { - hashCode = (hashCode * 59) + this.CommercialProductCode.GetHashCode(); - } - if (this.ProductLineCode != null) - { - hashCode = (hashCode * 59) + this.ProductLineCode.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.CreatedBy != null) - { - hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); - } - if (this.CreatedByFirstName != null) - { - hashCode = (hashCode * 59) + this.CreatedByFirstName.GetHashCode(); - } - if (this.CreatedByLastName != null) - { - hashCode = (hashCode * 59) + this.CreatedByLastName.GetHashCode(); - } - if (this.DeltaECalculationRepaired != null) - { - hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.GetHashCode(); - } - if (this.DeltaECalculationSprayout != null) - { - hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.GetHashCode(); - } - if (this.OwnColorVariantNumber != null) - { - hashCode = (hashCode * 59) + this.OwnColorVariantNumber.GetHashCode(); - } - if (this.PrimerProductId != null) - { - hashCode = (hashCode * 59) + this.PrimerProductId.GetHashCode(); - } - if (this.ProductId != null) - { - hashCode = (hashCode * 59) + this.ProductId.GetHashCode(); - } - if (this.ProductName != null) - { - hashCode = (hashCode * 59) + this.ProductName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SelectedVersionIndex.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.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/httpclient/standard2.0/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/.openapi-generator/FILES index 571b78dd9b1..b0909e10d1a 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/.openapi-generator/FILES @@ -53,7 +53,6 @@ docs/List.md docs/LiteralStringClass.md docs/Mammal.md docs/MapTest.md -docs/MixLog.md docs/MixedAnyOf.md docs/MixedAnyOfContent.md docs/MixedOneOf.md @@ -181,7 +180,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/README.md b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/README.md index 5a9be2e8750..055197c0676 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/README.md +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/README.md @@ -228,7 +228,6 @@ Class | Method | HTTP request | Description - [Model.LiteralStringClass](docs/LiteralStringClass.md) - [Model.Mammal](docs/Mammal.md) - [Model.MapTest](docs/MapTest.md) - - [Model.MixLog](docs/MixLog.md) - [Model.MixedAnyOf](docs/MixedAnyOf.md) - [Model.MixedAnyOfContent](docs/MixedAnyOfContent.md) - [Model.MixedOneOf](docs/MixedOneOf.md) diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/MixLog.md b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/MixLog.md deleted file mode 100644 index 1872e30daaa..00000000000 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **Guid** | | -**Description** | **string** | | -**MixDate** | **DateTime** | | -**ShopId** | **Guid** | | [optional] -**TotalPrice** | **float?** | | [optional] -**TotalRecalculations** | **int** | | -**TotalOverPoors** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**FormulaVersionDate** | **DateTime** | | -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int?** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] - -[[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/httpclient/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 887be61a957..00000000000 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,345 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - } -} diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index 31e0e4e46e3..00000000000 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,543 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using FileParameter = Org.OpenAPITools.Client.FileParameter; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - [DataContract(Name = "MixLog")] - public partial class MixLog : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MixLog() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// id (required). - /// description (required). - /// mixDate (required). - /// shopId. - /// totalPrice. - /// totalRecalculations (required). - /// totalOverPoors (required). - /// totalSkips (required). - /// totalUnderPours (required). - /// formulaVersionDate (required). - /// SomeCode is only required for color mixes. - /// batchNumber. - /// BrandCode is only required for non-color mixes. - /// BrandId is only required for color mixes. - /// BrandName is only required for color mixes. - /// CategoryCode is not used anymore. - /// Color is only required for color mixes. - /// colorDescription. - /// comment. - /// commercialProductCode. - /// ProductLineCode is only required for color mixes. - /// country. - /// createdBy. - /// createdByFirstName. - /// createdByLastName. - /// deltaECalculationRepaired. - /// deltaECalculationSprayout. - /// ownColorVariantNumber. - /// primerProductId. - /// ProductId is only required for color mixes. - /// ProductName is only required for color mixes. - /// selectedVersionIndex. - public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Guid shopId = default(Guid), float? totalPrice = default(float?), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), string someCode = default(string), string batchNumber = default(string), string brandCode = default(string), string brandId = default(string), string brandName = default(string), string categoryCode = default(string), string color = default(string), string colorDescription = default(string), string comment = default(string), string commercialProductCode = default(string), string productLineCode = default(string), string country = default(string), string createdBy = default(string), string createdByFirstName = default(string), string createdByLastName = default(string), string deltaECalculationRepaired = default(string), string deltaECalculationSprayout = default(string), int? ownColorVariantNumber = default(int?), string primerProductId = default(string), string productId = default(string), string productName = default(string), int selectedVersionIndex = default(int)) - { - this.Id = id; - // to ensure "description" is required (not null) - if (description == null) - { - throw new ArgumentNullException("description is a required property for MixLog and cannot be null"); - } - this.Description = description; - this.MixDate = mixDate; - this.TotalRecalculations = totalRecalculations; - this.TotalOverPoors = totalOverPoors; - this.TotalSkips = totalSkips; - this.TotalUnderPours = totalUnderPours; - this.FormulaVersionDate = formulaVersionDate; - this.ShopId = shopId; - this.TotalPrice = totalPrice; - this.SomeCode = someCode; - this.BatchNumber = batchNumber; - this.BrandCode = brandCode; - this.BrandId = brandId; - this.BrandName = brandName; - this.CategoryCode = categoryCode; - this.Color = color; - this.ColorDescription = colorDescription; - this.Comment = comment; - this.CommercialProductCode = commercialProductCode; - this.ProductLineCode = productLineCode; - this.Country = country; - this.CreatedBy = createdBy; - this.CreatedByFirstName = createdByFirstName; - this.CreatedByLastName = createdByLastName; - this.DeltaECalculationRepaired = deltaECalculationRepaired; - this.DeltaECalculationSprayout = deltaECalculationSprayout; - this.OwnColorVariantNumber = ownColorVariantNumber; - this.PrimerProductId = primerProductId; - this.ProductId = productId; - this.ProductName = productName; - this.SelectedVersionIndex = selectedVersionIndex; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] - public Guid Id { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets MixDate - /// - [DataMember(Name = "mixDate", IsRequired = true, EmitDefaultValue = true)] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets ShopId - /// - [DataMember(Name = "shopId", EmitDefaultValue = false)] - public Guid ShopId { get; set; } - - /// - /// Gets or Sets TotalPrice - /// - [DataMember(Name = "totalPrice", EmitDefaultValue = true)] - public float? TotalPrice { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [DataMember(Name = "totalRecalculations", IsRequired = true, EmitDefaultValue = true)] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [DataMember(Name = "totalOverPoors", IsRequired = true, EmitDefaultValue = true)] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [DataMember(Name = "totalSkips", IsRequired = true, EmitDefaultValue = true)] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [DataMember(Name = "totalUnderPours", IsRequired = true, EmitDefaultValue = true)] - public int TotalUnderPours { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [DataMember(Name = "formulaVersionDate", IsRequired = true, EmitDefaultValue = true)] - public DateTime FormulaVersionDate { get; set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [DataMember(Name = "someCode", EmitDefaultValue = true)] - public string SomeCode { get; set; } - - /// - /// Gets or Sets BatchNumber - /// - [DataMember(Name = "batchNumber", EmitDefaultValue = false)] - public string BatchNumber { get; set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [DataMember(Name = "brandCode", EmitDefaultValue = false)] - public string BrandCode { get; set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [DataMember(Name = "brandId", EmitDefaultValue = false)] - public string BrandId { get; set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [DataMember(Name = "brandName", EmitDefaultValue = false)] - public string BrandName { get; set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [DataMember(Name = "categoryCode", EmitDefaultValue = false)] - public string CategoryCode { get; set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } - - /// - /// Gets or Sets ColorDescription - /// - [DataMember(Name = "colorDescription", EmitDefaultValue = false)] - public string ColorDescription { get; set; } - - /// - /// Gets or Sets Comment - /// - [DataMember(Name = "comment", EmitDefaultValue = false)] - public string Comment { get; set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [DataMember(Name = "commercialProductCode", EmitDefaultValue = false)] - public string CommercialProductCode { get; set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [DataMember(Name = "productLineCode", EmitDefaultValue = false)] - public string ProductLineCode { get; set; } - - /// - /// Gets or Sets Country - /// - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// Gets or Sets CreatedBy - /// - [DataMember(Name = "createdBy", EmitDefaultValue = false)] - public string CreatedBy { get; set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [DataMember(Name = "createdByFirstName", EmitDefaultValue = false)] - public string CreatedByFirstName { get; set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [DataMember(Name = "createdByLastName", EmitDefaultValue = false)] - public string CreatedByLastName { get; set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [DataMember(Name = "deltaECalculationRepaired", EmitDefaultValue = false)] - public string DeltaECalculationRepaired { get; set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [DataMember(Name = "deltaECalculationSprayout", EmitDefaultValue = false)] - public string DeltaECalculationSprayout { get; set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [DataMember(Name = "ownColorVariantNumber", EmitDefaultValue = true)] - public int? OwnColorVariantNumber { get; set; } - - /// - /// Gets or Sets PrimerProductId - /// - [DataMember(Name = "primerProductId", EmitDefaultValue = false)] - public string PrimerProductId { get; set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [DataMember(Name = "productId", EmitDefaultValue = false)] - public string ProductId { get; set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [DataMember(Name = "productName", EmitDefaultValue = false)] - public string ProductName { get; set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [DataMember(Name = "selectedVersionIndex", EmitDefaultValue = false)] - public int SelectedVersionIndex { get; set; } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).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 Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 MixLog).AreEqual; - } - - /// - /// Returns true if MixLog instances are equal - /// - /// Instance of MixLog to be compared - /// Boolean - public bool Equals(MixLog 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.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.MixDate != null) - { - hashCode = (hashCode * 59) + this.MixDate.GetHashCode(); - } - if (this.ShopId != null) - { - hashCode = (hashCode * 59) + this.ShopId.GetHashCode(); - } - if (this.TotalPrice != null) - { - hashCode = (hashCode * 59) + this.TotalPrice.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TotalRecalculations.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalOverPoors.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalSkips.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalUnderPours.GetHashCode(); - if (this.FormulaVersionDate != null) - { - hashCode = (hashCode * 59) + this.FormulaVersionDate.GetHashCode(); - } - if (this.SomeCode != null) - { - hashCode = (hashCode * 59) + this.SomeCode.GetHashCode(); - } - if (this.BatchNumber != null) - { - hashCode = (hashCode * 59) + this.BatchNumber.GetHashCode(); - } - if (this.BrandCode != null) - { - hashCode = (hashCode * 59) + this.BrandCode.GetHashCode(); - } - if (this.BrandId != null) - { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); - } - if (this.BrandName != null) - { - hashCode = (hashCode * 59) + this.BrandName.GetHashCode(); - } - if (this.CategoryCode != null) - { - hashCode = (hashCode * 59) + this.CategoryCode.GetHashCode(); - } - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - if (this.ColorDescription != null) - { - hashCode = (hashCode * 59) + this.ColorDescription.GetHashCode(); - } - if (this.Comment != null) - { - hashCode = (hashCode * 59) + this.Comment.GetHashCode(); - } - if (this.CommercialProductCode != null) - { - hashCode = (hashCode * 59) + this.CommercialProductCode.GetHashCode(); - } - if (this.ProductLineCode != null) - { - hashCode = (hashCode * 59) + this.ProductLineCode.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.CreatedBy != null) - { - hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); - } - if (this.CreatedByFirstName != null) - { - hashCode = (hashCode * 59) + this.CreatedByFirstName.GetHashCode(); - } - if (this.CreatedByLastName != null) - { - hashCode = (hashCode * 59) + this.CreatedByLastName.GetHashCode(); - } - if (this.DeltaECalculationRepaired != null) - { - hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.GetHashCode(); - } - if (this.DeltaECalculationSprayout != null) - { - hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.GetHashCode(); - } - if (this.OwnColorVariantNumber != null) - { - hashCode = (hashCode * 59) + this.OwnColorVariantNumber.GetHashCode(); - } - if (this.PrimerProductId != null) - { - hashCode = (hashCode * 59) + this.PrimerProductId.GetHashCode(); - } - if (this.ProductId != null) - { - hashCode = (hashCode * 59) + this.ProductId.GetHashCode(); - } - if (this.ProductName != null) - { - hashCode = (hashCode * 59) + this.ProductName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SelectedVersionIndex.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.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/restsharp/net8/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/restsharp/net8/Petstore/.openapi-generator/FILES index 05aeba36d54..f63a424386f 100644 --- a/samples/client/petstore/csharp/restsharp/net8/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/restsharp/net8/Petstore/.openapi-generator/FILES @@ -53,7 +53,6 @@ docs/List.md docs/LiteralStringClass.md docs/Mammal.md docs/MapTest.md -docs/MixLog.md docs/MixedAnyOf.md docs/MixedAnyOfContent.md docs/MixedOneOf.md @@ -184,7 +183,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/restsharp/net8/Petstore/README.md b/samples/client/petstore/csharp/restsharp/net8/Petstore/README.md index 7d4a2e1b1ff..de946ecd37a 100644 --- a/samples/client/petstore/csharp/restsharp/net8/Petstore/README.md +++ b/samples/client/petstore/csharp/restsharp/net8/Petstore/README.md @@ -215,7 +215,6 @@ Class | Method | HTTP request | Description - [Model.LiteralStringClass](docs/LiteralStringClass.md) - [Model.Mammal](docs/Mammal.md) - [Model.MapTest](docs/MapTest.md) - - [Model.MixLog](docs/MixLog.md) - [Model.MixedAnyOf](docs/MixedAnyOf.md) - [Model.MixedAnyOfContent](docs/MixedAnyOfContent.md) - [Model.MixedOneOf](docs/MixedOneOf.md) diff --git a/samples/client/petstore/csharp/restsharp/net8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net8/Petstore/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/restsharp/net8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net8/Petstore/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/restsharp/net8/Petstore/docs/MixLog.md b/samples/client/petstore/csharp/restsharp/net8/Petstore/docs/MixLog.md deleted file mode 100644 index 1872e30daaa..00000000000 --- a/samples/client/petstore/csharp/restsharp/net8/Petstore/docs/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **Guid** | | -**Description** | **string** | | -**MixDate** | **DateTime** | | -**ShopId** | **Guid** | | [optional] -**TotalPrice** | **float?** | | [optional] -**TotalRecalculations** | **int** | | -**TotalOverPoors** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**FormulaVersionDate** | **DateTime** | | -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int?** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] - -[[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/restsharp/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/restsharp/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 887be61a957..00000000000 --- a/samples/client/petstore/csharp/restsharp/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,345 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - } -} diff --git a/samples/client/petstore/csharp/restsharp/net8/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/restsharp/net8/Petstore/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index 6dbe8fdadda..00000000000 --- a/samples/client/petstore/csharp/restsharp/net8/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,527 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - [DataContract(Name = "MixLog")] - public partial class MixLog : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MixLog() { } - /// - /// Initializes a new instance of the class. - /// - /// id (required). - /// description (required). - /// mixDate (required). - /// shopId. - /// totalPrice. - /// totalRecalculations (required). - /// totalOverPoors (required). - /// totalSkips (required). - /// totalUnderPours (required). - /// formulaVersionDate (required). - /// SomeCode is only required for color mixes. - /// batchNumber. - /// BrandCode is only required for non-color mixes. - /// BrandId is only required for color mixes. - /// BrandName is only required for color mixes. - /// CategoryCode is not used anymore. - /// Color is only required for color mixes. - /// colorDescription. - /// comment. - /// commercialProductCode. - /// ProductLineCode is only required for color mixes. - /// country. - /// createdBy. - /// createdByFirstName. - /// createdByLastName. - /// deltaECalculationRepaired. - /// deltaECalculationSprayout. - /// ownColorVariantNumber. - /// primerProductId. - /// ProductId is only required for color mixes. - /// ProductName is only required for color mixes. - /// selectedVersionIndex. - public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Guid shopId = default(Guid), float? totalPrice = default(float?), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), string someCode = default(string), string batchNumber = default(string), string brandCode = default(string), string brandId = default(string), string brandName = default(string), string categoryCode = default(string), string color = default(string), string colorDescription = default(string), string comment = default(string), string commercialProductCode = default(string), string productLineCode = default(string), string country = default(string), string createdBy = default(string), string createdByFirstName = default(string), string createdByLastName = default(string), string deltaECalculationRepaired = default(string), string deltaECalculationSprayout = default(string), int? ownColorVariantNumber = default(int?), string primerProductId = default(string), string productId = default(string), string productName = default(string), int selectedVersionIndex = default(int)) - { - this.Id = id; - // to ensure "description" is required (not null) - if (description == null) - { - throw new ArgumentNullException("description is a required property for MixLog and cannot be null"); - } - this.Description = description; - this.MixDate = mixDate; - this.TotalRecalculations = totalRecalculations; - this.TotalOverPoors = totalOverPoors; - this.TotalSkips = totalSkips; - this.TotalUnderPours = totalUnderPours; - this.FormulaVersionDate = formulaVersionDate; - this.ShopId = shopId; - this.TotalPrice = totalPrice; - this.SomeCode = someCode; - this.BatchNumber = batchNumber; - this.BrandCode = brandCode; - this.BrandId = brandId; - this.BrandName = brandName; - this.CategoryCode = categoryCode; - this.Color = color; - this.ColorDescription = colorDescription; - this.Comment = comment; - this.CommercialProductCode = commercialProductCode; - this.ProductLineCode = productLineCode; - this.Country = country; - this.CreatedBy = createdBy; - this.CreatedByFirstName = createdByFirstName; - this.CreatedByLastName = createdByLastName; - this.DeltaECalculationRepaired = deltaECalculationRepaired; - this.DeltaECalculationSprayout = deltaECalculationSprayout; - this.OwnColorVariantNumber = ownColorVariantNumber; - this.PrimerProductId = primerProductId; - this.ProductId = productId; - this.ProductName = productName; - this.SelectedVersionIndex = selectedVersionIndex; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] - public Guid Id { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets MixDate - /// - [DataMember(Name = "mixDate", IsRequired = true, EmitDefaultValue = true)] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets ShopId - /// - [DataMember(Name = "shopId", EmitDefaultValue = false)] - public Guid ShopId { get; set; } - - /// - /// Gets or Sets TotalPrice - /// - [DataMember(Name = "totalPrice", EmitDefaultValue = true)] - public float? TotalPrice { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [DataMember(Name = "totalRecalculations", IsRequired = true, EmitDefaultValue = true)] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [DataMember(Name = "totalOverPoors", IsRequired = true, EmitDefaultValue = true)] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [DataMember(Name = "totalSkips", IsRequired = true, EmitDefaultValue = true)] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [DataMember(Name = "totalUnderPours", IsRequired = true, EmitDefaultValue = true)] - public int TotalUnderPours { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [DataMember(Name = "formulaVersionDate", IsRequired = true, EmitDefaultValue = true)] - public DateTime FormulaVersionDate { get; set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [DataMember(Name = "someCode", EmitDefaultValue = true)] - public string SomeCode { get; set; } - - /// - /// Gets or Sets BatchNumber - /// - [DataMember(Name = "batchNumber", EmitDefaultValue = false)] - public string BatchNumber { get; set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [DataMember(Name = "brandCode", EmitDefaultValue = false)] - public string BrandCode { get; set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [DataMember(Name = "brandId", EmitDefaultValue = false)] - public string BrandId { get; set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [DataMember(Name = "brandName", EmitDefaultValue = false)] - public string BrandName { get; set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [DataMember(Name = "categoryCode", EmitDefaultValue = false)] - public string CategoryCode { get; set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } - - /// - /// Gets or Sets ColorDescription - /// - [DataMember(Name = "colorDescription", EmitDefaultValue = false)] - public string ColorDescription { get; set; } - - /// - /// Gets or Sets Comment - /// - [DataMember(Name = "comment", EmitDefaultValue = false)] - public string Comment { get; set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [DataMember(Name = "commercialProductCode", EmitDefaultValue = false)] - public string CommercialProductCode { get; set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [DataMember(Name = "productLineCode", EmitDefaultValue = false)] - public string ProductLineCode { get; set; } - - /// - /// Gets or Sets Country - /// - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// Gets or Sets CreatedBy - /// - [DataMember(Name = "createdBy", EmitDefaultValue = false)] - public string CreatedBy { get; set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [DataMember(Name = "createdByFirstName", EmitDefaultValue = false)] - public string CreatedByFirstName { get; set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [DataMember(Name = "createdByLastName", EmitDefaultValue = false)] - public string CreatedByLastName { get; set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [DataMember(Name = "deltaECalculationRepaired", EmitDefaultValue = false)] - public string DeltaECalculationRepaired { get; set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [DataMember(Name = "deltaECalculationSprayout", EmitDefaultValue = false)] - public string DeltaECalculationSprayout { get; set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [DataMember(Name = "ownColorVariantNumber", EmitDefaultValue = true)] - public int? OwnColorVariantNumber { get; set; } - - /// - /// Gets or Sets PrimerProductId - /// - [DataMember(Name = "primerProductId", EmitDefaultValue = false)] - public string PrimerProductId { get; set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [DataMember(Name = "productId", EmitDefaultValue = false)] - public string ProductId { get; set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [DataMember(Name = "productName", EmitDefaultValue = false)] - public string ProductName { get; set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [DataMember(Name = "selectedVersionIndex", EmitDefaultValue = false)] - public int SelectedVersionIndex { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).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 Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 MixLog).AreEqual; - } - - /// - /// Returns true if MixLog instances are equal - /// - /// Instance of MixLog to be compared - /// Boolean - public bool Equals(MixLog 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.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.MixDate != null) - { - hashCode = (hashCode * 59) + this.MixDate.GetHashCode(); - } - if (this.ShopId != null) - { - hashCode = (hashCode * 59) + this.ShopId.GetHashCode(); - } - if (this.TotalPrice != null) - { - hashCode = (hashCode * 59) + this.TotalPrice.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TotalRecalculations.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalOverPoors.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalSkips.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalUnderPours.GetHashCode(); - if (this.FormulaVersionDate != null) - { - hashCode = (hashCode * 59) + this.FormulaVersionDate.GetHashCode(); - } - if (this.SomeCode != null) - { - hashCode = (hashCode * 59) + this.SomeCode.GetHashCode(); - } - if (this.BatchNumber != null) - { - hashCode = (hashCode * 59) + this.BatchNumber.GetHashCode(); - } - if (this.BrandCode != null) - { - hashCode = (hashCode * 59) + this.BrandCode.GetHashCode(); - } - if (this.BrandId != null) - { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); - } - if (this.BrandName != null) - { - hashCode = (hashCode * 59) + this.BrandName.GetHashCode(); - } - if (this.CategoryCode != null) - { - hashCode = (hashCode * 59) + this.CategoryCode.GetHashCode(); - } - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - if (this.ColorDescription != null) - { - hashCode = (hashCode * 59) + this.ColorDescription.GetHashCode(); - } - if (this.Comment != null) - { - hashCode = (hashCode * 59) + this.Comment.GetHashCode(); - } - if (this.CommercialProductCode != null) - { - hashCode = (hashCode * 59) + this.CommercialProductCode.GetHashCode(); - } - if (this.ProductLineCode != null) - { - hashCode = (hashCode * 59) + this.ProductLineCode.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.CreatedBy != null) - { - hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); - } - if (this.CreatedByFirstName != null) - { - hashCode = (hashCode * 59) + this.CreatedByFirstName.GetHashCode(); - } - if (this.CreatedByLastName != null) - { - hashCode = (hashCode * 59) + this.CreatedByLastName.GetHashCode(); - } - if (this.DeltaECalculationRepaired != null) - { - hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.GetHashCode(); - } - if (this.DeltaECalculationSprayout != null) - { - hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.GetHashCode(); - } - if (this.OwnColorVariantNumber != null) - { - hashCode = (hashCode * 59) + this.OwnColorVariantNumber.GetHashCode(); - } - if (this.PrimerProductId != null) - { - hashCode = (hashCode * 59) + this.PrimerProductId.GetHashCode(); - } - if (this.ProductId != null) - { - hashCode = (hashCode * 59) + this.ProductId.GetHashCode(); - } - if (this.ProductName != null) - { - hashCode = (hashCode * 59) + this.ProductName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SelectedVersionIndex.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/restsharp/standard2.0/ConditionalSerialization/.openapi-generator/FILES b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/.openapi-generator/FILES index 05aeba36d54..f63a424386f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/.openapi-generator/FILES @@ -53,7 +53,6 @@ docs/List.md docs/LiteralStringClass.md docs/Mammal.md docs/MapTest.md -docs/MixLog.md docs/MixedAnyOf.md docs/MixedAnyOfContent.md docs/MixedOneOf.md @@ -184,7 +183,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/README.md b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/README.md index 701078a164d..523a2d86252 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/README.md +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/README.md @@ -203,7 +203,6 @@ Class | Method | HTTP request | Description - [Model.LiteralStringClass](docs/LiteralStringClass.md) - [Model.Mammal](docs/Mammal.md) - [Model.MapTest](docs/MapTest.md) - - [Model.MixLog](docs/MixLog.md) - [Model.MixedAnyOf](docs/MixedAnyOf.md) - [Model.MixedAnyOfContent](docs/MixedAnyOfContent.md) - [Model.MixedOneOf](docs/MixedOneOf.md) diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/MixLog.md b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/MixLog.md deleted file mode 100644 index 1872e30daaa..00000000000 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **Guid** | | -**Description** | **string** | | -**MixDate** | **DateTime** | | -**ShopId** | **Guid** | | [optional] -**TotalPrice** | **float?** | | [optional] -**TotalRecalculations** | **int** | | -**TotalOverPoors** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**FormulaVersionDate** | **DateTime** | | -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int?** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] - -[[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/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 887be61a957..00000000000 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,345 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Fact] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'MixDate' - /// - [Fact] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - - /// - /// Test the property 'ShopId' - /// - [Fact] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - - /// - /// Test the property 'TotalRecalculations' - /// - [Fact] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - - /// - /// Test the property 'TotalOverPoors' - /// - [Fact] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - - /// - /// Test the property 'TotalSkips' - /// - [Fact] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - - /// - /// Test the property 'TotalUnderPours' - /// - [Fact] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - - /// - /// Test the property 'FormulaVersionDate' - /// - [Fact] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - - /// - /// Test the property 'SomeCode' - /// - [Fact] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - - /// - /// Test the property 'BatchNumber' - /// - [Fact] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - - /// - /// Test the property 'BrandCode' - /// - [Fact] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - - /// - /// Test the property 'BrandName' - /// - [Fact] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - - /// - /// Test the property 'CategoryCode' - /// - [Fact] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - - /// - /// Test the property 'Color' - /// - [Fact] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - /// - /// Test the property 'ColorDescription' - /// - [Fact] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - - /// - /// Test the property 'Comment' - /// - [Fact] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - - /// - /// Test the property 'CommercialProductCode' - /// - [Fact] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - - /// - /// Test the property 'ProductLineCode' - /// - [Fact] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - - /// - /// Test the property 'CreatedBy' - /// - [Fact] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - - /// - /// Test the property 'CreatedByFirstName' - /// - [Fact] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - - /// - /// Test the property 'CreatedByLastName' - /// - [Fact] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Fact] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Fact] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Fact] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - - /// - /// Test the property 'PrimerProductId' - /// - [Fact] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - - /// - /// Test the property 'ProductId' - /// - [Fact] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - - /// - /// Test the property 'ProductName' - /// - [Fact] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - - /// - /// Test the property 'SelectedVersionIndex' - /// - [Fact] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - } -} diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index a698b135146..00000000000 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,1214 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; -using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - [DataContract(Name = "MixLog")] - public partial class MixLog : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MixLog() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// id (required). - /// description (required). - /// mixDate (required). - /// shopId. - /// totalPrice. - /// totalRecalculations (required). - /// totalOverPoors (required). - /// totalSkips (required). - /// totalUnderPours (required). - /// formulaVersionDate (required). - /// SomeCode is only required for color mixes. - /// batchNumber. - /// BrandCode is only required for non-color mixes. - /// BrandId is only required for color mixes. - /// BrandName is only required for color mixes. - /// CategoryCode is not used anymore. - /// Color is only required for color mixes. - /// colorDescription. - /// comment. - /// commercialProductCode. - /// ProductLineCode is only required for color mixes. - /// country. - /// createdBy. - /// createdByFirstName. - /// createdByLastName. - /// deltaECalculationRepaired. - /// deltaECalculationSprayout. - /// ownColorVariantNumber. - /// primerProductId. - /// ProductId is only required for color mixes. - /// ProductName is only required for color mixes. - /// selectedVersionIndex. - public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Guid shopId = default(Guid), float? totalPrice = default(float?), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), string someCode = default(string), string batchNumber = default(string), string brandCode = default(string), string brandId = default(string), string brandName = default(string), string categoryCode = default(string), string color = default(string), string colorDescription = default(string), string comment = default(string), string commercialProductCode = default(string), string productLineCode = default(string), string country = default(string), string createdBy = default(string), string createdByFirstName = default(string), string createdByLastName = default(string), string deltaECalculationRepaired = default(string), string deltaECalculationSprayout = default(string), int? ownColorVariantNumber = default(int?), string primerProductId = default(string), string productId = default(string), string productName = default(string), int selectedVersionIndex = default(int)) - { - this._Id = id; - // to ensure "description" is required (not null) - if (description == null) - { - throw new ArgumentNullException("description is a required property for MixLog and cannot be null"); - } - this._Description = description; - this._MixDate = mixDate; - this._TotalRecalculations = totalRecalculations; - this._TotalOverPoors = totalOverPoors; - this._TotalSkips = totalSkips; - this._TotalUnderPours = totalUnderPours; - this._FormulaVersionDate = formulaVersionDate; - this._ShopId = shopId; - if (this.ShopId != null) - { - this._flagShopId = true; - } - this._TotalPrice = totalPrice; - if (this.TotalPrice != null) - { - this._flagTotalPrice = true; - } - this._SomeCode = someCode; - if (this.SomeCode != null) - { - this._flagSomeCode = true; - } - this._BatchNumber = batchNumber; - if (this.BatchNumber != null) - { - this._flagBatchNumber = true; - } - this._BrandCode = brandCode; - if (this.BrandCode != null) - { - this._flagBrandCode = true; - } - this._BrandId = brandId; - if (this.BrandId != null) - { - this._flagBrandId = true; - } - this._BrandName = brandName; - if (this.BrandName != null) - { - this._flagBrandName = true; - } - this._CategoryCode = categoryCode; - if (this.CategoryCode != null) - { - this._flagCategoryCode = true; - } - this._Color = color; - if (this.Color != null) - { - this._flagColor = true; - } - this._ColorDescription = colorDescription; - if (this.ColorDescription != null) - { - this._flagColorDescription = true; - } - this._Comment = comment; - if (this.Comment != null) - { - this._flagComment = true; - } - this._CommercialProductCode = commercialProductCode; - if (this.CommercialProductCode != null) - { - this._flagCommercialProductCode = true; - } - this._ProductLineCode = productLineCode; - if (this.ProductLineCode != null) - { - this._flagProductLineCode = true; - } - this._Country = country; - if (this.Country != null) - { - this._flagCountry = true; - } - this._CreatedBy = createdBy; - if (this.CreatedBy != null) - { - this._flagCreatedBy = true; - } - this._CreatedByFirstName = createdByFirstName; - if (this.CreatedByFirstName != null) - { - this._flagCreatedByFirstName = true; - } - this._CreatedByLastName = createdByLastName; - if (this.CreatedByLastName != null) - { - this._flagCreatedByLastName = true; - } - this._DeltaECalculationRepaired = deltaECalculationRepaired; - if (this.DeltaECalculationRepaired != null) - { - this._flagDeltaECalculationRepaired = true; - } - this._DeltaECalculationSprayout = deltaECalculationSprayout; - if (this.DeltaECalculationSprayout != null) - { - this._flagDeltaECalculationSprayout = true; - } - this._OwnColorVariantNumber = ownColorVariantNumber; - if (this.OwnColorVariantNumber != null) - { - this._flagOwnColorVariantNumber = true; - } - this._PrimerProductId = primerProductId; - if (this.PrimerProductId != null) - { - this._flagPrimerProductId = true; - } - this._ProductId = productId; - if (this.ProductId != null) - { - this._flagProductId = true; - } - this._ProductName = productName; - if (this.ProductName != null) - { - this._flagProductName = true; - } - this._SelectedVersionIndex = selectedVersionIndex; - if (this.SelectedVersionIndex != null) - { - this._flagSelectedVersionIndex = true; - } - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] - public Guid Id - { - get{ return _Id;} - set - { - _Id = value; - _flagId = true; - } - } - private Guid _Id; - private bool _flagId; - - /// - /// Returns false as Id should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeId() - { - return _flagId; - } - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] - public string Description - { - get{ return _Description;} - set - { - _Description = value; - _flagDescription = true; - } - } - private string _Description; - private bool _flagDescription; - - /// - /// Returns false as Description should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeDescription() - { - return _flagDescription; - } - /// - /// Gets or Sets MixDate - /// - [DataMember(Name = "mixDate", IsRequired = true, EmitDefaultValue = true)] - public DateTime MixDate - { - get{ return _MixDate;} - set - { - _MixDate = value; - _flagMixDate = true; - } - } - private DateTime _MixDate; - private bool _flagMixDate; - - /// - /// Returns false as MixDate should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeMixDate() - { - return _flagMixDate; - } - /// - /// Gets or Sets ShopId - /// - [DataMember(Name = "shopId", EmitDefaultValue = false)] - public Guid ShopId - { - get{ return _ShopId;} - set - { - _ShopId = value; - _flagShopId = true; - } - } - private Guid _ShopId; - private bool _flagShopId; - - /// - /// Returns false as ShopId should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeShopId() - { - return _flagShopId; - } - /// - /// Gets or Sets TotalPrice - /// - [DataMember(Name = "totalPrice", EmitDefaultValue = true)] - public float? TotalPrice - { - get{ return _TotalPrice;} - set - { - _TotalPrice = value; - _flagTotalPrice = true; - } - } - private float? _TotalPrice; - private bool _flagTotalPrice; - - /// - /// Returns false as TotalPrice should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeTotalPrice() - { - return _flagTotalPrice; - } - /// - /// Gets or Sets TotalRecalculations - /// - [DataMember(Name = "totalRecalculations", IsRequired = true, EmitDefaultValue = true)] - public int TotalRecalculations - { - get{ return _TotalRecalculations;} - set - { - _TotalRecalculations = value; - _flagTotalRecalculations = true; - } - } - private int _TotalRecalculations; - private bool _flagTotalRecalculations; - - /// - /// Returns false as TotalRecalculations should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeTotalRecalculations() - { - return _flagTotalRecalculations; - } - /// - /// Gets or Sets TotalOverPoors - /// - [DataMember(Name = "totalOverPoors", IsRequired = true, EmitDefaultValue = true)] - public int TotalOverPoors - { - get{ return _TotalOverPoors;} - set - { - _TotalOverPoors = value; - _flagTotalOverPoors = true; - } - } - private int _TotalOverPoors; - private bool _flagTotalOverPoors; - - /// - /// Returns false as TotalOverPoors should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeTotalOverPoors() - { - return _flagTotalOverPoors; - } - /// - /// Gets or Sets TotalSkips - /// - [DataMember(Name = "totalSkips", IsRequired = true, EmitDefaultValue = true)] - public int TotalSkips - { - get{ return _TotalSkips;} - set - { - _TotalSkips = value; - _flagTotalSkips = true; - } - } - private int _TotalSkips; - private bool _flagTotalSkips; - - /// - /// Returns false as TotalSkips should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeTotalSkips() - { - return _flagTotalSkips; - } - /// - /// Gets or Sets TotalUnderPours - /// - [DataMember(Name = "totalUnderPours", IsRequired = true, EmitDefaultValue = true)] - public int TotalUnderPours - { - get{ return _TotalUnderPours;} - set - { - _TotalUnderPours = value; - _flagTotalUnderPours = true; - } - } - private int _TotalUnderPours; - private bool _flagTotalUnderPours; - - /// - /// Returns false as TotalUnderPours should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeTotalUnderPours() - { - return _flagTotalUnderPours; - } - /// - /// Gets or Sets FormulaVersionDate - /// - [DataMember(Name = "formulaVersionDate", IsRequired = true, EmitDefaultValue = true)] - public DateTime FormulaVersionDate - { - get{ return _FormulaVersionDate;} - set - { - _FormulaVersionDate = value; - _flagFormulaVersionDate = true; - } - } - private DateTime _FormulaVersionDate; - private bool _flagFormulaVersionDate; - - /// - /// Returns false as FormulaVersionDate should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeFormulaVersionDate() - { - return _flagFormulaVersionDate; - } - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [DataMember(Name = "someCode", EmitDefaultValue = true)] - public string SomeCode - { - get{ return _SomeCode;} - set - { - _SomeCode = value; - _flagSomeCode = true; - } - } - private string _SomeCode; - private bool _flagSomeCode; - - /// - /// Returns false as SomeCode should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeSomeCode() - { - return _flagSomeCode; - } - /// - /// Gets or Sets BatchNumber - /// - [DataMember(Name = "batchNumber", EmitDefaultValue = false)] - public string BatchNumber - { - get{ return _BatchNumber;} - set - { - _BatchNumber = value; - _flagBatchNumber = true; - } - } - private string _BatchNumber; - private bool _flagBatchNumber; - - /// - /// Returns false as BatchNumber should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBatchNumber() - { - return _flagBatchNumber; - } - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [DataMember(Name = "brandCode", EmitDefaultValue = false)] - public string BrandCode - { - get{ return _BrandCode;} - set - { - _BrandCode = value; - _flagBrandCode = true; - } - } - private string _BrandCode; - private bool _flagBrandCode; - - /// - /// Returns false as BrandCode should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBrandCode() - { - return _flagBrandCode; - } - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [DataMember(Name = "brandId", EmitDefaultValue = false)] - public string BrandId - { - get{ return _BrandId;} - set - { - _BrandId = value; - _flagBrandId = true; - } - } - private string _BrandId; - private bool _flagBrandId; - - /// - /// Returns false as BrandId should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBrandId() - { - return _flagBrandId; - } - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [DataMember(Name = "brandName", EmitDefaultValue = false)] - public string BrandName - { - get{ return _BrandName;} - set - { - _BrandName = value; - _flagBrandName = true; - } - } - private string _BrandName; - private bool _flagBrandName; - - /// - /// Returns false as BrandName should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBrandName() - { - return _flagBrandName; - } - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [DataMember(Name = "categoryCode", EmitDefaultValue = false)] - public string CategoryCode - { - get{ return _CategoryCode;} - set - { - _CategoryCode = value; - _flagCategoryCode = true; - } - } - private string _CategoryCode; - private bool _flagCategoryCode; - - /// - /// Returns false as CategoryCode should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeCategoryCode() - { - return _flagCategoryCode; - } - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color - { - get{ return _Color;} - set - { - _Color = value; - _flagColor = true; - } - } - private string _Color; - private bool _flagColor; - - /// - /// Returns false as Color should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeColor() - { - return _flagColor; - } - /// - /// Gets or Sets ColorDescription - /// - [DataMember(Name = "colorDescription", EmitDefaultValue = false)] - public string ColorDescription - { - get{ return _ColorDescription;} - set - { - _ColorDescription = value; - _flagColorDescription = true; - } - } - private string _ColorDescription; - private bool _flagColorDescription; - - /// - /// Returns false as ColorDescription should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeColorDescription() - { - return _flagColorDescription; - } - /// - /// Gets or Sets Comment - /// - [DataMember(Name = "comment", EmitDefaultValue = false)] - public string Comment - { - get{ return _Comment;} - set - { - _Comment = value; - _flagComment = true; - } - } - private string _Comment; - private bool _flagComment; - - /// - /// Returns false as Comment should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeComment() - { - return _flagComment; - } - /// - /// Gets or Sets CommercialProductCode - /// - [DataMember(Name = "commercialProductCode", EmitDefaultValue = false)] - public string CommercialProductCode - { - get{ return _CommercialProductCode;} - set - { - _CommercialProductCode = value; - _flagCommercialProductCode = true; - } - } - private string _CommercialProductCode; - private bool _flagCommercialProductCode; - - /// - /// Returns false as CommercialProductCode should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeCommercialProductCode() - { - return _flagCommercialProductCode; - } - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [DataMember(Name = "productLineCode", EmitDefaultValue = false)] - public string ProductLineCode - { - get{ return _ProductLineCode;} - set - { - _ProductLineCode = value; - _flagProductLineCode = true; - } - } - private string _ProductLineCode; - private bool _flagProductLineCode; - - /// - /// Returns false as ProductLineCode should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeProductLineCode() - { - return _flagProductLineCode; - } - /// - /// Gets or Sets Country - /// - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country - { - get{ return _Country;} - set - { - _Country = value; - _flagCountry = true; - } - } - private string _Country; - private bool _flagCountry; - - /// - /// Returns false as Country should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeCountry() - { - return _flagCountry; - } - /// - /// Gets or Sets CreatedBy - /// - [DataMember(Name = "createdBy", EmitDefaultValue = false)] - public string CreatedBy - { - get{ return _CreatedBy;} - set - { - _CreatedBy = value; - _flagCreatedBy = true; - } - } - private string _CreatedBy; - private bool _flagCreatedBy; - - /// - /// Returns false as CreatedBy should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeCreatedBy() - { - return _flagCreatedBy; - } - /// - /// Gets or Sets CreatedByFirstName - /// - [DataMember(Name = "createdByFirstName", EmitDefaultValue = false)] - public string CreatedByFirstName - { - get{ return _CreatedByFirstName;} - set - { - _CreatedByFirstName = value; - _flagCreatedByFirstName = true; - } - } - private string _CreatedByFirstName; - private bool _flagCreatedByFirstName; - - /// - /// Returns false as CreatedByFirstName should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeCreatedByFirstName() - { - return _flagCreatedByFirstName; - } - /// - /// Gets or Sets CreatedByLastName - /// - [DataMember(Name = "createdByLastName", EmitDefaultValue = false)] - public string CreatedByLastName - { - get{ return _CreatedByLastName;} - set - { - _CreatedByLastName = value; - _flagCreatedByLastName = true; - } - } - private string _CreatedByLastName; - private bool _flagCreatedByLastName; - - /// - /// Returns false as CreatedByLastName should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeCreatedByLastName() - { - return _flagCreatedByLastName; - } - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [DataMember(Name = "deltaECalculationRepaired", EmitDefaultValue = false)] - public string DeltaECalculationRepaired - { - get{ return _DeltaECalculationRepaired;} - set - { - _DeltaECalculationRepaired = value; - _flagDeltaECalculationRepaired = true; - } - } - private string _DeltaECalculationRepaired; - private bool _flagDeltaECalculationRepaired; - - /// - /// Returns false as DeltaECalculationRepaired should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeDeltaECalculationRepaired() - { - return _flagDeltaECalculationRepaired; - } - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [DataMember(Name = "deltaECalculationSprayout", EmitDefaultValue = false)] - public string DeltaECalculationSprayout - { - get{ return _DeltaECalculationSprayout;} - set - { - _DeltaECalculationSprayout = value; - _flagDeltaECalculationSprayout = true; - } - } - private string _DeltaECalculationSprayout; - private bool _flagDeltaECalculationSprayout; - - /// - /// Returns false as DeltaECalculationSprayout should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeDeltaECalculationSprayout() - { - return _flagDeltaECalculationSprayout; - } - /// - /// Gets or Sets OwnColorVariantNumber - /// - [DataMember(Name = "ownColorVariantNumber", EmitDefaultValue = true)] - public int? OwnColorVariantNumber - { - get{ return _OwnColorVariantNumber;} - set - { - _OwnColorVariantNumber = value; - _flagOwnColorVariantNumber = true; - } - } - private int? _OwnColorVariantNumber; - private bool _flagOwnColorVariantNumber; - - /// - /// Returns false as OwnColorVariantNumber should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeOwnColorVariantNumber() - { - return _flagOwnColorVariantNumber; - } - /// - /// Gets or Sets PrimerProductId - /// - [DataMember(Name = "primerProductId", EmitDefaultValue = false)] - public string PrimerProductId - { - get{ return _PrimerProductId;} - set - { - _PrimerProductId = value; - _flagPrimerProductId = true; - } - } - private string _PrimerProductId; - private bool _flagPrimerProductId; - - /// - /// Returns false as PrimerProductId should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializePrimerProductId() - { - return _flagPrimerProductId; - } - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [DataMember(Name = "productId", EmitDefaultValue = false)] - public string ProductId - { - get{ return _ProductId;} - set - { - _ProductId = value; - _flagProductId = true; - } - } - private string _ProductId; - private bool _flagProductId; - - /// - /// Returns false as ProductId should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeProductId() - { - return _flagProductId; - } - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [DataMember(Name = "productName", EmitDefaultValue = false)] - public string ProductName - { - get{ return _ProductName;} - set - { - _ProductName = value; - _flagProductName = true; - } - } - private string _ProductName; - private bool _flagProductName; - - /// - /// Returns false as ProductName should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeProductName() - { - return _flagProductName; - } - /// - /// Gets or Sets SelectedVersionIndex - /// - [DataMember(Name = "selectedVersionIndex", EmitDefaultValue = false)] - public int SelectedVersionIndex - { - get{ return _SelectedVersionIndex;} - set - { - _SelectedVersionIndex = value; - _flagSelectedVersionIndex = true; - } - } - private int _SelectedVersionIndex; - private bool _flagSelectedVersionIndex; - - /// - /// Returns false as SelectedVersionIndex should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeSelectedVersionIndex() - { - return _flagSelectedVersionIndex; - } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).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 Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 MixLog).AreEqual; - } - - /// - /// Returns true if MixLog instances are equal - /// - /// Instance of MixLog to be compared - /// Boolean - public bool Equals(MixLog 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.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.MixDate != null) - { - hashCode = (hashCode * 59) + this.MixDate.GetHashCode(); - } - if (this.ShopId != null) - { - hashCode = (hashCode * 59) + this.ShopId.GetHashCode(); - } - if (this.TotalPrice != null) - { - hashCode = (hashCode * 59) + this.TotalPrice.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TotalRecalculations.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalOverPoors.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalSkips.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalUnderPours.GetHashCode(); - if (this.FormulaVersionDate != null) - { - hashCode = (hashCode * 59) + this.FormulaVersionDate.GetHashCode(); - } - if (this.SomeCode != null) - { - hashCode = (hashCode * 59) + this.SomeCode.GetHashCode(); - } - if (this.BatchNumber != null) - { - hashCode = (hashCode * 59) + this.BatchNumber.GetHashCode(); - } - if (this.BrandCode != null) - { - hashCode = (hashCode * 59) + this.BrandCode.GetHashCode(); - } - if (this.BrandId != null) - { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); - } - if (this.BrandName != null) - { - hashCode = (hashCode * 59) + this.BrandName.GetHashCode(); - } - if (this.CategoryCode != null) - { - hashCode = (hashCode * 59) + this.CategoryCode.GetHashCode(); - } - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - if (this.ColorDescription != null) - { - hashCode = (hashCode * 59) + this.ColorDescription.GetHashCode(); - } - if (this.Comment != null) - { - hashCode = (hashCode * 59) + this.Comment.GetHashCode(); - } - if (this.CommercialProductCode != null) - { - hashCode = (hashCode * 59) + this.CommercialProductCode.GetHashCode(); - } - if (this.ProductLineCode != null) - { - hashCode = (hashCode * 59) + this.ProductLineCode.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.CreatedBy != null) - { - hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); - } - if (this.CreatedByFirstName != null) - { - hashCode = (hashCode * 59) + this.CreatedByFirstName.GetHashCode(); - } - if (this.CreatedByLastName != null) - { - hashCode = (hashCode * 59) + this.CreatedByLastName.GetHashCode(); - } - if (this.DeltaECalculationRepaired != null) - { - hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.GetHashCode(); - } - if (this.DeltaECalculationSprayout != null) - { - hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.GetHashCode(); - } - if (this.OwnColorVariantNumber != null) - { - hashCode = (hashCode * 59) + this.OwnColorVariantNumber.GetHashCode(); - } - if (this.PrimerProductId != null) - { - hashCode = (hashCode * 59) + this.PrimerProductId.GetHashCode(); - } - if (this.ProductId != null) - { - hashCode = (hashCode * 59) + this.ProductId.GetHashCode(); - } - if (this.ProductName != null) - { - hashCode = (hashCode * 59) + this.ProductName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SelectedVersionIndex.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.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/unityWebRequest/net9/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/.openapi-generator/FILES index d7c560eb3a6..7a3fb0afaba 100644 --- a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/.openapi-generator/FILES @@ -51,7 +51,6 @@ docs/List.md docs/LiteralStringClass.md docs/Mammal.md docs/MapTest.md -docs/MixLog.md docs/MixedAnyOf.md docs/MixedAnyOfContent.md docs/MixedOneOf.md @@ -180,7 +179,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/README.md b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/README.md index 22643d3b4c5..b7d030f82ff 100644 --- a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/README.md +++ b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/README.md @@ -189,7 +189,6 @@ Class | Method | HTTP request | Description - [Model.LiteralStringClass](LiteralStringClass.md) - [Model.Mammal](Mammal.md) - [Model.MapTest](MapTest.md) - - [Model.MixLog](MixLog.md) - [Model.MixedAnyOf](MixedAnyOf.md) - [Model.MixedAnyOfContent](MixedAnyOfContent.md) - [Model.MixedOneOf](MixedOneOf.md) diff --git a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/docs/MixLog.md b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/docs/MixLog.md deleted file mode 100644 index 1872e30daaa..00000000000 --- a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/docs/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **Guid** | | -**Description** | **string** | | -**MixDate** | **DateTime** | | -**ShopId** | **Guid** | | [optional] -**TotalPrice** | **float?** | | [optional] -**TotalRecalculations** | **int** | | -**TotalOverPoors** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**FormulaVersionDate** | **DateTime** | | -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int?** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] - -[[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/unityWebRequest/net9/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 11edb7f8e5e..00000000000 --- a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,314 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -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; -using NUnit.Framework; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Test] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Description' - /// - [Test] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - /// - /// Test the property 'MixDate' - /// - [Test] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - /// - /// Test the property 'ShopId' - /// - [Test] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - /// - /// Test the property 'TotalPrice' - /// - [Test] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - /// - /// Test the property 'TotalRecalculations' - /// - [Test] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - /// - /// Test the property 'TotalOverPoors' - /// - [Test] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - /// - /// Test the property 'TotalSkips' - /// - [Test] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - /// - /// Test the property 'TotalUnderPours' - /// - [Test] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - /// - /// Test the property 'FormulaVersionDate' - /// - [Test] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - /// - /// Test the property 'SomeCode' - /// - [Test] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - /// - /// Test the property 'BatchNumber' - /// - [Test] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - /// - /// Test the property 'BrandCode' - /// - [Test] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - /// - /// Test the property 'BrandId' - /// - [Test] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - /// - /// Test the property 'BrandName' - /// - [Test] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - /// - /// Test the property 'CategoryCode' - /// - [Test] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - /// - /// Test the property 'Color' - /// - [Test] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - /// - /// Test the property 'ColorDescription' - /// - [Test] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - /// - /// Test the property 'Comment' - /// - [Test] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - /// - /// Test the property 'CommercialProductCode' - /// - [Test] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - /// - /// Test the property 'ProductLineCode' - /// - [Test] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - /// - /// Test the property 'Country' - /// - [Test] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - /// - /// Test the property 'CreatedBy' - /// - [Test] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - /// - /// Test the property 'CreatedByFirstName' - /// - [Test] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - /// - /// Test the property 'CreatedByLastName' - /// - [Test] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Test] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Test] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Test] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - /// - /// Test the property 'PrimerProductId' - /// - [Test] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - /// - /// Test the property 'ProductId' - /// - [Test] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - /// - /// Test the property 'ProductName' - /// - [Test] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - /// - /// Test the property 'SelectedVersionIndex' - /// - [Test] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - } -} diff --git a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index dfc02b8315c..00000000000 --- a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,675 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - [DataContract(Name = "MixLog")] - public partial class MixLog : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MixLog() { } - /// - /// Initializes a new instance of the class. - /// - /// id (required). - /// description (required). - /// mixDate (required). - /// shopId. - /// totalPrice. - /// totalRecalculations (required). - /// totalOverPoors (required). - /// totalSkips (required). - /// totalUnderPours (required). - /// formulaVersionDate (required). - /// SomeCode is only required for color mixes. - /// batchNumber. - /// BrandCode is only required for non-color mixes. - /// BrandId is only required for color mixes. - /// BrandName is only required for color mixes. - /// CategoryCode is not used anymore. - /// Color is only required for color mixes. - /// colorDescription. - /// comment. - /// commercialProductCode. - /// ProductLineCode is only required for color mixes. - /// country. - /// createdBy. - /// createdByFirstName. - /// createdByLastName. - /// deltaECalculationRepaired. - /// deltaECalculationSprayout. - /// ownColorVariantNumber. - /// primerProductId. - /// ProductId is only required for color mixes. - /// ProductName is only required for color mixes. - /// selectedVersionIndex. - public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Guid shopId = default(Guid), float? totalPrice = default(float?), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), string someCode = default(string), string batchNumber = default(string), string brandCode = default(string), string brandId = default(string), string brandName = default(string), string categoryCode = default(string), string color = default(string), string colorDescription = default(string), string comment = default(string), string commercialProductCode = default(string), string productLineCode = default(string), string country = default(string), string createdBy = default(string), string createdByFirstName = default(string), string createdByLastName = default(string), string deltaECalculationRepaired = default(string), string deltaECalculationSprayout = default(string), int? ownColorVariantNumber = default(int?), string primerProductId = default(string), string productId = default(string), string productName = default(string), int selectedVersionIndex = default(int)) - { - this.Id = id; - // to ensure "description" is required (not null) - if (description == null) - { - throw new ArgumentNullException("description is a required property for MixLog and cannot be null"); - } - this.Description = description; - this.MixDate = mixDate; - this.TotalRecalculations = totalRecalculations; - this.TotalOverPoors = totalOverPoors; - this.TotalSkips = totalSkips; - this.TotalUnderPours = totalUnderPours; - this.FormulaVersionDate = formulaVersionDate; - this.ShopId = shopId; - this.TotalPrice = totalPrice; - this.SomeCode = someCode; - this.BatchNumber = batchNumber; - this.BrandCode = brandCode; - this.BrandId = brandId; - this.BrandName = brandName; - this.CategoryCode = categoryCode; - this.Color = color; - this.ColorDescription = colorDescription; - this.Comment = comment; - this.CommercialProductCode = commercialProductCode; - this.ProductLineCode = productLineCode; - this.Country = country; - this.CreatedBy = createdBy; - this.CreatedByFirstName = createdByFirstName; - this.CreatedByLastName = createdByLastName; - this.DeltaECalculationRepaired = deltaECalculationRepaired; - this.DeltaECalculationSprayout = deltaECalculationSprayout; - this.OwnColorVariantNumber = ownColorVariantNumber; - this.PrimerProductId = primerProductId; - this.ProductId = productId; - this.ProductName = productName; - this.SelectedVersionIndex = selectedVersionIndex; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] - public Guid Id { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets MixDate - /// - [DataMember(Name = "mixDate", IsRequired = true, EmitDefaultValue = true)] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets ShopId - /// - [DataMember(Name = "shopId", EmitDefaultValue = false)] - public Guid ShopId { get; set; } - - /// - /// Gets or Sets TotalPrice - /// - [DataMember(Name = "totalPrice", EmitDefaultValue = true)] - public float? TotalPrice { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [DataMember(Name = "totalRecalculations", IsRequired = true, EmitDefaultValue = true)] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [DataMember(Name = "totalOverPoors", IsRequired = true, EmitDefaultValue = true)] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [DataMember(Name = "totalSkips", IsRequired = true, EmitDefaultValue = true)] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [DataMember(Name = "totalUnderPours", IsRequired = true, EmitDefaultValue = true)] - public int TotalUnderPours { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [DataMember(Name = "formulaVersionDate", IsRequired = true, EmitDefaultValue = true)] - public DateTime FormulaVersionDate { get; set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [DataMember(Name = "someCode", EmitDefaultValue = true)] - public string SomeCode { get; set; } - - /// - /// Gets or Sets BatchNumber - /// - [DataMember(Name = "batchNumber", EmitDefaultValue = false)] - public string BatchNumber { get; set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [DataMember(Name = "brandCode", EmitDefaultValue = false)] - public string BrandCode { get; set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [DataMember(Name = "brandId", EmitDefaultValue = false)] - public string BrandId { get; set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [DataMember(Name = "brandName", EmitDefaultValue = false)] - public string BrandName { get; set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [DataMember(Name = "categoryCode", EmitDefaultValue = false)] - public string CategoryCode { get; set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } - - /// - /// Gets or Sets ColorDescription - /// - [DataMember(Name = "colorDescription", EmitDefaultValue = false)] - public string ColorDescription { get; set; } - - /// - /// Gets or Sets Comment - /// - [DataMember(Name = "comment", EmitDefaultValue = false)] - public string Comment { get; set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [DataMember(Name = "commercialProductCode", EmitDefaultValue = false)] - public string CommercialProductCode { get; set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [DataMember(Name = "productLineCode", EmitDefaultValue = false)] - public string ProductLineCode { get; set; } - - /// - /// Gets or Sets Country - /// - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// Gets or Sets CreatedBy - /// - [DataMember(Name = "createdBy", EmitDefaultValue = false)] - public string CreatedBy { get; set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [DataMember(Name = "createdByFirstName", EmitDefaultValue = false)] - public string CreatedByFirstName { get; set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [DataMember(Name = "createdByLastName", EmitDefaultValue = false)] - public string CreatedByLastName { get; set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [DataMember(Name = "deltaECalculationRepaired", EmitDefaultValue = false)] - public string DeltaECalculationRepaired { get; set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [DataMember(Name = "deltaECalculationSprayout", EmitDefaultValue = false)] - public string DeltaECalculationSprayout { get; set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [DataMember(Name = "ownColorVariantNumber", EmitDefaultValue = true)] - public int? OwnColorVariantNumber { get; set; } - - /// - /// Gets or Sets PrimerProductId - /// - [DataMember(Name = "primerProductId", EmitDefaultValue = false)] - public string PrimerProductId { get; set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [DataMember(Name = "productId", EmitDefaultValue = false)] - public string ProductId { get; set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [DataMember(Name = "productName", EmitDefaultValue = false)] - public string ProductName { get; set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [DataMember(Name = "selectedVersionIndex", EmitDefaultValue = false)] - public int SelectedVersionIndex { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).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 Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MixLog); - } - - /// - /// Returns true if MixLog instances are equal - /// - /// Instance of MixLog to be compared - /// Boolean - public bool Equals(MixLog input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.MixDate == input.MixDate || - (this.MixDate != null && - this.MixDate.Equals(input.MixDate)) - ) && - ( - this.ShopId == input.ShopId || - (this.ShopId != null && - this.ShopId.Equals(input.ShopId)) - ) && - ( - this.TotalPrice == input.TotalPrice || - (this.TotalPrice != null && - this.TotalPrice.Equals(input.TotalPrice)) - ) && - ( - this.TotalRecalculations == input.TotalRecalculations || - this.TotalRecalculations.Equals(input.TotalRecalculations) - ) && - ( - this.TotalOverPoors == input.TotalOverPoors || - this.TotalOverPoors.Equals(input.TotalOverPoors) - ) && - ( - this.TotalSkips == input.TotalSkips || - this.TotalSkips.Equals(input.TotalSkips) - ) && - ( - this.TotalUnderPours == input.TotalUnderPours || - this.TotalUnderPours.Equals(input.TotalUnderPours) - ) && - ( - this.FormulaVersionDate == input.FormulaVersionDate || - (this.FormulaVersionDate != null && - this.FormulaVersionDate.Equals(input.FormulaVersionDate)) - ) && - ( - this.SomeCode == input.SomeCode || - (this.SomeCode != null && - this.SomeCode.Equals(input.SomeCode)) - ) && - ( - this.BatchNumber == input.BatchNumber || - (this.BatchNumber != null && - this.BatchNumber.Equals(input.BatchNumber)) - ) && - ( - this.BrandCode == input.BrandCode || - (this.BrandCode != null && - this.BrandCode.Equals(input.BrandCode)) - ) && - ( - this.BrandId == input.BrandId || - (this.BrandId != null && - this.BrandId.Equals(input.BrandId)) - ) && - ( - this.BrandName == input.BrandName || - (this.BrandName != null && - this.BrandName.Equals(input.BrandName)) - ) && - ( - this.CategoryCode == input.CategoryCode || - (this.CategoryCode != null && - this.CategoryCode.Equals(input.CategoryCode)) - ) && - ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) - ) && - ( - this.ColorDescription == input.ColorDescription || - (this.ColorDescription != null && - this.ColorDescription.Equals(input.ColorDescription)) - ) && - ( - this.Comment == input.Comment || - (this.Comment != null && - this.Comment.Equals(input.Comment)) - ) && - ( - this.CommercialProductCode == input.CommercialProductCode || - (this.CommercialProductCode != null && - this.CommercialProductCode.Equals(input.CommercialProductCode)) - ) && - ( - this.ProductLineCode == input.ProductLineCode || - (this.ProductLineCode != null && - this.ProductLineCode.Equals(input.ProductLineCode)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.CreatedBy == input.CreatedBy || - (this.CreatedBy != null && - this.CreatedBy.Equals(input.CreatedBy)) - ) && - ( - this.CreatedByFirstName == input.CreatedByFirstName || - (this.CreatedByFirstName != null && - this.CreatedByFirstName.Equals(input.CreatedByFirstName)) - ) && - ( - this.CreatedByLastName == input.CreatedByLastName || - (this.CreatedByLastName != null && - this.CreatedByLastName.Equals(input.CreatedByLastName)) - ) && - ( - this.DeltaECalculationRepaired == input.DeltaECalculationRepaired || - (this.DeltaECalculationRepaired != null && - this.DeltaECalculationRepaired.Equals(input.DeltaECalculationRepaired)) - ) && - ( - this.DeltaECalculationSprayout == input.DeltaECalculationSprayout || - (this.DeltaECalculationSprayout != null && - this.DeltaECalculationSprayout.Equals(input.DeltaECalculationSprayout)) - ) && - ( - this.OwnColorVariantNumber == input.OwnColorVariantNumber || - (this.OwnColorVariantNumber != null && - this.OwnColorVariantNumber.Equals(input.OwnColorVariantNumber)) - ) && - ( - this.PrimerProductId == input.PrimerProductId || - (this.PrimerProductId != null && - this.PrimerProductId.Equals(input.PrimerProductId)) - ) && - ( - this.ProductId == input.ProductId || - (this.ProductId != null && - this.ProductId.Equals(input.ProductId)) - ) && - ( - this.ProductName == input.ProductName || - (this.ProductName != null && - this.ProductName.Equals(input.ProductName)) - ) && - ( - this.SelectedVersionIndex == input.SelectedVersionIndex || - this.SelectedVersionIndex.Equals(input.SelectedVersionIndex) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.MixDate != null) - { - hashCode = (hashCode * 59) + this.MixDate.GetHashCode(); - } - if (this.ShopId != null) - { - hashCode = (hashCode * 59) + this.ShopId.GetHashCode(); - } - if (this.TotalPrice != null) - { - hashCode = (hashCode * 59) + this.TotalPrice.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TotalRecalculations.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalOverPoors.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalSkips.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalUnderPours.GetHashCode(); - if (this.FormulaVersionDate != null) - { - hashCode = (hashCode * 59) + this.FormulaVersionDate.GetHashCode(); - } - if (this.SomeCode != null) - { - hashCode = (hashCode * 59) + this.SomeCode.GetHashCode(); - } - if (this.BatchNumber != null) - { - hashCode = (hashCode * 59) + this.BatchNumber.GetHashCode(); - } - if (this.BrandCode != null) - { - hashCode = (hashCode * 59) + this.BrandCode.GetHashCode(); - } - if (this.BrandId != null) - { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); - } - if (this.BrandName != null) - { - hashCode = (hashCode * 59) + this.BrandName.GetHashCode(); - } - if (this.CategoryCode != null) - { - hashCode = (hashCode * 59) + this.CategoryCode.GetHashCode(); - } - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - if (this.ColorDescription != null) - { - hashCode = (hashCode * 59) + this.ColorDescription.GetHashCode(); - } - if (this.Comment != null) - { - hashCode = (hashCode * 59) + this.Comment.GetHashCode(); - } - if (this.CommercialProductCode != null) - { - hashCode = (hashCode * 59) + this.CommercialProductCode.GetHashCode(); - } - if (this.ProductLineCode != null) - { - hashCode = (hashCode * 59) + this.ProductLineCode.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.CreatedBy != null) - { - hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); - } - if (this.CreatedByFirstName != null) - { - hashCode = (hashCode * 59) + this.CreatedByFirstName.GetHashCode(); - } - if (this.CreatedByLastName != null) - { - hashCode = (hashCode * 59) + this.CreatedByLastName.GetHashCode(); - } - if (this.DeltaECalculationRepaired != null) - { - hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.GetHashCode(); - } - if (this.DeltaECalculationSprayout != null) - { - hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.GetHashCode(); - } - if (this.OwnColorVariantNumber != null) - { - hashCode = (hashCode * 59) + this.OwnColorVariantNumber.GetHashCode(); - } - if (this.PrimerProductId != null) - { - hashCode = (hashCode * 59) + this.PrimerProductId.GetHashCode(); - } - if (this.ProductId != null) - { - hashCode = (hashCode * 59) + this.ProductId.GetHashCode(); - } - if (this.ProductName != null) - { - hashCode = (hashCode * 59) + this.ProductName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SelectedVersionIndex.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/.openapi-generator/FILES index d7c560eb3a6..7a3fb0afaba 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/.openapi-generator/FILES @@ -51,7 +51,6 @@ docs/List.md docs/LiteralStringClass.md docs/Mammal.md docs/MapTest.md -docs/MixLog.md docs/MixedAnyOf.md docs/MixedAnyOfContent.md docs/MixedOneOf.md @@ -180,7 +179,6 @@ src/Org.OpenAPITools/Model/List.cs src/Org.OpenAPITools/Model/LiteralStringClass.cs src/Org.OpenAPITools/Model/Mammal.cs src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixLog.cs src/Org.OpenAPITools/Model/MixedAnyOf.cs src/Org.OpenAPITools/Model/MixedAnyOfContent.cs src/Org.OpenAPITools/Model/MixedOneOf.cs diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/README.md b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/README.md index 22643d3b4c5..b7d030f82ff 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/README.md +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/README.md @@ -189,7 +189,6 @@ Class | Method | HTTP request | Description - [Model.LiteralStringClass](LiteralStringClass.md) - [Model.Mammal](Mammal.md) - [Model.MapTest](MapTest.md) - - [Model.MixLog](MixLog.md) - [Model.MixedAnyOf](MixedAnyOf.md) - [Model.MixedAnyOfContent](MixedAnyOfContent.md) - [Model.MixedOneOf](MixedOneOf.md) diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml index 1214bb1bea4..6a83f7a1e48 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml @@ -2770,108 +2770,6 @@ components: properties: id: type: string - MixLog: - properties: - id: - format: uuid - type: string - description: - type: string - mixDate: - format: date-time - type: string - shopId: - format: uuid - type: string - totalPrice: - format: float - nullable: true - type: number - totalRecalculations: - format: int32 - type: integer - totalOverPoors: - format: int32 - type: integer - totalSkips: - format: int32 - type: integer - totalUnderPours: - format: int32 - type: integer - formulaVersionDate: - format: date-time - type: string - someCode: - description: SomeCode is only required for color mixes - nullable: true - type: string - batchNumber: - type: string - brandCode: - description: BrandCode is only required for non-color mixes - type: string - brandId: - description: BrandId is only required for color mixes - type: string - brandName: - description: BrandName is only required for color mixes - type: string - categoryCode: - description: CategoryCode is not used anymore - type: string - color: - description: Color is only required for color mixes - type: string - colorDescription: - type: string - comment: - type: string - commercialProductCode: - type: string - productLineCode: - description: ProductLineCode is only required for color mixes - type: string - country: - type: string - createdBy: - type: string - createdByFirstName: - type: string - createdByLastName: - type: string - deltaECalculationRepaired: - type: string - deltaECalculationSprayout: - type: string - ownColorVariantNumber: - format: int32 - nullable: true - type: integer - primerProductId: - type: string - productId: - description: ProductId is only required for color mixes - type: string - productName: - description: ProductName is only required for color mixes - type: string - selectedVersionIndex: - format: int32 - type: integer - required: - - description - - formulaVersionDate - - id - - mixDate - - totalOverPoors - - totalRecalculations - - totalSkips - - totalUnderPours - type: object - uuid: - format: uuid - type: string CopyActivity: allOf: - $ref: '#/components/schemas/EntityBase' diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/MixLog.md b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/MixLog.md deleted file mode 100644 index 1872e30daaa..00000000000 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/MixLog.md +++ /dev/null @@ -1,41 +0,0 @@ -# Org.OpenAPITools.Model.MixLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **Guid** | | -**Description** | **string** | | -**MixDate** | **DateTime** | | -**ShopId** | **Guid** | | [optional] -**TotalPrice** | **float?** | | [optional] -**TotalRecalculations** | **int** | | -**TotalOverPoors** | **int** | | -**TotalSkips** | **int** | | -**TotalUnderPours** | **int** | | -**FormulaVersionDate** | **DateTime** | | -**SomeCode** | **string** | SomeCode is only required for color mixes | [optional] -**BatchNumber** | **string** | | [optional] -**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional] -**BrandId** | **string** | BrandId is only required for color mixes | [optional] -**BrandName** | **string** | BrandName is only required for color mixes | [optional] -**CategoryCode** | **string** | CategoryCode is not used anymore | [optional] -**Color** | **string** | Color is only required for color mixes | [optional] -**ColorDescription** | **string** | | [optional] -**Comment** | **string** | | [optional] -**CommercialProductCode** | **string** | | [optional] -**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional] -**Country** | **string** | | [optional] -**CreatedBy** | **string** | | [optional] -**CreatedByFirstName** | **string** | | [optional] -**CreatedByLastName** | **string** | | [optional] -**DeltaECalculationRepaired** | **string** | | [optional] -**DeltaECalculationSprayout** | **string** | | [optional] -**OwnColorVariantNumber** | **int?** | | [optional] -**PrimerProductId** | **string** | | [optional] -**ProductId** | **string** | ProductId is only required for color mixes | [optional] -**ProductName** | **string** | ProductName is only required for color mixes | [optional] -**SelectedVersionIndex** | **int** | | [optional] - -[[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/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs deleted file mode 100644 index 11edb7f8e5e..00000000000 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixLogTests.cs +++ /dev/null @@ -1,314 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -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; -using NUnit.Framework; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixLog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixLogTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixLog - //private MixLog instance; - - public MixLogTests() - { - // TODO uncomment below to create an instance of MixLog - //instance = new MixLog(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixLog - /// - [Test] - public void MixLogInstanceTest() - { - // TODO uncomment below to test "IsType" MixLog - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Description' - /// - [Test] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - /// - /// Test the property 'MixDate' - /// - [Test] - public void MixDateTest() - { - // TODO unit test for the property 'MixDate' - } - /// - /// Test the property 'ShopId' - /// - [Test] - public void ShopIdTest() - { - // TODO unit test for the property 'ShopId' - } - /// - /// Test the property 'TotalPrice' - /// - [Test] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - /// - /// Test the property 'TotalRecalculations' - /// - [Test] - public void TotalRecalculationsTest() - { - // TODO unit test for the property 'TotalRecalculations' - } - /// - /// Test the property 'TotalOverPoors' - /// - [Test] - public void TotalOverPoorsTest() - { - // TODO unit test for the property 'TotalOverPoors' - } - /// - /// Test the property 'TotalSkips' - /// - [Test] - public void TotalSkipsTest() - { - // TODO unit test for the property 'TotalSkips' - } - /// - /// Test the property 'TotalUnderPours' - /// - [Test] - public void TotalUnderPoursTest() - { - // TODO unit test for the property 'TotalUnderPours' - } - /// - /// Test the property 'FormulaVersionDate' - /// - [Test] - public void FormulaVersionDateTest() - { - // TODO unit test for the property 'FormulaVersionDate' - } - /// - /// Test the property 'SomeCode' - /// - [Test] - public void SomeCodeTest() - { - // TODO unit test for the property 'SomeCode' - } - /// - /// Test the property 'BatchNumber' - /// - [Test] - public void BatchNumberTest() - { - // TODO unit test for the property 'BatchNumber' - } - /// - /// Test the property 'BrandCode' - /// - [Test] - public void BrandCodeTest() - { - // TODO unit test for the property 'BrandCode' - } - /// - /// Test the property 'BrandId' - /// - [Test] - public void BrandIdTest() - { - // TODO unit test for the property 'BrandId' - } - /// - /// Test the property 'BrandName' - /// - [Test] - public void BrandNameTest() - { - // TODO unit test for the property 'BrandName' - } - /// - /// Test the property 'CategoryCode' - /// - [Test] - public void CategoryCodeTest() - { - // TODO unit test for the property 'CategoryCode' - } - /// - /// Test the property 'Color' - /// - [Test] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - /// - /// Test the property 'ColorDescription' - /// - [Test] - public void ColorDescriptionTest() - { - // TODO unit test for the property 'ColorDescription' - } - /// - /// Test the property 'Comment' - /// - [Test] - public void CommentTest() - { - // TODO unit test for the property 'Comment' - } - /// - /// Test the property 'CommercialProductCode' - /// - [Test] - public void CommercialProductCodeTest() - { - // TODO unit test for the property 'CommercialProductCode' - } - /// - /// Test the property 'ProductLineCode' - /// - [Test] - public void ProductLineCodeTest() - { - // TODO unit test for the property 'ProductLineCode' - } - /// - /// Test the property 'Country' - /// - [Test] - public void CountryTest() - { - // TODO unit test for the property 'Country' - } - /// - /// Test the property 'CreatedBy' - /// - [Test] - public void CreatedByTest() - { - // TODO unit test for the property 'CreatedBy' - } - /// - /// Test the property 'CreatedByFirstName' - /// - [Test] - public void CreatedByFirstNameTest() - { - // TODO unit test for the property 'CreatedByFirstName' - } - /// - /// Test the property 'CreatedByLastName' - /// - [Test] - public void CreatedByLastNameTest() - { - // TODO unit test for the property 'CreatedByLastName' - } - /// - /// Test the property 'DeltaECalculationRepaired' - /// - [Test] - public void DeltaECalculationRepairedTest() - { - // TODO unit test for the property 'DeltaECalculationRepaired' - } - /// - /// Test the property 'DeltaECalculationSprayout' - /// - [Test] - public void DeltaECalculationSprayoutTest() - { - // TODO unit test for the property 'DeltaECalculationSprayout' - } - /// - /// Test the property 'OwnColorVariantNumber' - /// - [Test] - public void OwnColorVariantNumberTest() - { - // TODO unit test for the property 'OwnColorVariantNumber' - } - /// - /// Test the property 'PrimerProductId' - /// - [Test] - public void PrimerProductIdTest() - { - // TODO unit test for the property 'PrimerProductId' - } - /// - /// Test the property 'ProductId' - /// - [Test] - public void ProductIdTest() - { - // TODO unit test for the property 'ProductId' - } - /// - /// Test the property 'ProductName' - /// - [Test] - public void ProductNameTest() - { - // TODO unit test for the property 'ProductName' - } - /// - /// Test the property 'SelectedVersionIndex' - /// - [Test] - public void SelectedVersionIndexTest() - { - // TODO unit test for the property 'SelectedVersionIndex' - } - } -} diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs deleted file mode 100644 index dfc02b8315c..00000000000 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixLog.cs +++ /dev/null @@ -1,675 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixLog - /// - [DataContract(Name = "MixLog")] - public partial class MixLog : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MixLog() { } - /// - /// Initializes a new instance of the class. - /// - /// id (required). - /// description (required). - /// mixDate (required). - /// shopId. - /// totalPrice. - /// totalRecalculations (required). - /// totalOverPoors (required). - /// totalSkips (required). - /// totalUnderPours (required). - /// formulaVersionDate (required). - /// SomeCode is only required for color mixes. - /// batchNumber. - /// BrandCode is only required for non-color mixes. - /// BrandId is only required for color mixes. - /// BrandName is only required for color mixes. - /// CategoryCode is not used anymore. - /// Color is only required for color mixes. - /// colorDescription. - /// comment. - /// commercialProductCode. - /// ProductLineCode is only required for color mixes. - /// country. - /// createdBy. - /// createdByFirstName. - /// createdByLastName. - /// deltaECalculationRepaired. - /// deltaECalculationSprayout. - /// ownColorVariantNumber. - /// primerProductId. - /// ProductId is only required for color mixes. - /// ProductName is only required for color mixes. - /// selectedVersionIndex. - public MixLog(Guid id = default(Guid), string description = default(string), DateTime mixDate = default(DateTime), Guid shopId = default(Guid), float? totalPrice = default(float?), int totalRecalculations = default(int), int totalOverPoors = default(int), int totalSkips = default(int), int totalUnderPours = default(int), DateTime formulaVersionDate = default(DateTime), string someCode = default(string), string batchNumber = default(string), string brandCode = default(string), string brandId = default(string), string brandName = default(string), string categoryCode = default(string), string color = default(string), string colorDescription = default(string), string comment = default(string), string commercialProductCode = default(string), string productLineCode = default(string), string country = default(string), string createdBy = default(string), string createdByFirstName = default(string), string createdByLastName = default(string), string deltaECalculationRepaired = default(string), string deltaECalculationSprayout = default(string), int? ownColorVariantNumber = default(int?), string primerProductId = default(string), string productId = default(string), string productName = default(string), int selectedVersionIndex = default(int)) - { - this.Id = id; - // to ensure "description" is required (not null) - if (description == null) - { - throw new ArgumentNullException("description is a required property for MixLog and cannot be null"); - } - this.Description = description; - this.MixDate = mixDate; - this.TotalRecalculations = totalRecalculations; - this.TotalOverPoors = totalOverPoors; - this.TotalSkips = totalSkips; - this.TotalUnderPours = totalUnderPours; - this.FormulaVersionDate = formulaVersionDate; - this.ShopId = shopId; - this.TotalPrice = totalPrice; - this.SomeCode = someCode; - this.BatchNumber = batchNumber; - this.BrandCode = brandCode; - this.BrandId = brandId; - this.BrandName = brandName; - this.CategoryCode = categoryCode; - this.Color = color; - this.ColorDescription = colorDescription; - this.Comment = comment; - this.CommercialProductCode = commercialProductCode; - this.ProductLineCode = productLineCode; - this.Country = country; - this.CreatedBy = createdBy; - this.CreatedByFirstName = createdByFirstName; - this.CreatedByLastName = createdByLastName; - this.DeltaECalculationRepaired = deltaECalculationRepaired; - this.DeltaECalculationSprayout = deltaECalculationSprayout; - this.OwnColorVariantNumber = ownColorVariantNumber; - this.PrimerProductId = primerProductId; - this.ProductId = productId; - this.ProductName = productName; - this.SelectedVersionIndex = selectedVersionIndex; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] - public Guid Id { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets MixDate - /// - [DataMember(Name = "mixDate", IsRequired = true, EmitDefaultValue = true)] - public DateTime MixDate { get; set; } - - /// - /// Gets or Sets ShopId - /// - [DataMember(Name = "shopId", EmitDefaultValue = false)] - public Guid ShopId { get; set; } - - /// - /// Gets or Sets TotalPrice - /// - [DataMember(Name = "totalPrice", EmitDefaultValue = true)] - public float? TotalPrice { get; set; } - - /// - /// Gets or Sets TotalRecalculations - /// - [DataMember(Name = "totalRecalculations", IsRequired = true, EmitDefaultValue = true)] - public int TotalRecalculations { get; set; } - - /// - /// Gets or Sets TotalOverPoors - /// - [DataMember(Name = "totalOverPoors", IsRequired = true, EmitDefaultValue = true)] - public int TotalOverPoors { get; set; } - - /// - /// Gets or Sets TotalSkips - /// - [DataMember(Name = "totalSkips", IsRequired = true, EmitDefaultValue = true)] - public int TotalSkips { get; set; } - - /// - /// Gets or Sets TotalUnderPours - /// - [DataMember(Name = "totalUnderPours", IsRequired = true, EmitDefaultValue = true)] - public int TotalUnderPours { get; set; } - - /// - /// Gets or Sets FormulaVersionDate - /// - [DataMember(Name = "formulaVersionDate", IsRequired = true, EmitDefaultValue = true)] - public DateTime FormulaVersionDate { get; set; } - - /// - /// SomeCode is only required for color mixes - /// - /// SomeCode is only required for color mixes - [DataMember(Name = "someCode", EmitDefaultValue = true)] - public string SomeCode { get; set; } - - /// - /// Gets or Sets BatchNumber - /// - [DataMember(Name = "batchNumber", EmitDefaultValue = false)] - public string BatchNumber { get; set; } - - /// - /// BrandCode is only required for non-color mixes - /// - /// BrandCode is only required for non-color mixes - [DataMember(Name = "brandCode", EmitDefaultValue = false)] - public string BrandCode { get; set; } - - /// - /// BrandId is only required for color mixes - /// - /// BrandId is only required for color mixes - [DataMember(Name = "brandId", EmitDefaultValue = false)] - public string BrandId { get; set; } - - /// - /// BrandName is only required for color mixes - /// - /// BrandName is only required for color mixes - [DataMember(Name = "brandName", EmitDefaultValue = false)] - public string BrandName { get; set; } - - /// - /// CategoryCode is not used anymore - /// - /// CategoryCode is not used anymore - [DataMember(Name = "categoryCode", EmitDefaultValue = false)] - public string CategoryCode { get; set; } - - /// - /// Color is only required for color mixes - /// - /// Color is only required for color mixes - [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } - - /// - /// Gets or Sets ColorDescription - /// - [DataMember(Name = "colorDescription", EmitDefaultValue = false)] - public string ColorDescription { get; set; } - - /// - /// Gets or Sets Comment - /// - [DataMember(Name = "comment", EmitDefaultValue = false)] - public string Comment { get; set; } - - /// - /// Gets or Sets CommercialProductCode - /// - [DataMember(Name = "commercialProductCode", EmitDefaultValue = false)] - public string CommercialProductCode { get; set; } - - /// - /// ProductLineCode is only required for color mixes - /// - /// ProductLineCode is only required for color mixes - [DataMember(Name = "productLineCode", EmitDefaultValue = false)] - public string ProductLineCode { get; set; } - - /// - /// Gets or Sets Country - /// - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// Gets or Sets CreatedBy - /// - [DataMember(Name = "createdBy", EmitDefaultValue = false)] - public string CreatedBy { get; set; } - - /// - /// Gets or Sets CreatedByFirstName - /// - [DataMember(Name = "createdByFirstName", EmitDefaultValue = false)] - public string CreatedByFirstName { get; set; } - - /// - /// Gets or Sets CreatedByLastName - /// - [DataMember(Name = "createdByLastName", EmitDefaultValue = false)] - public string CreatedByLastName { get; set; } - - /// - /// Gets or Sets DeltaECalculationRepaired - /// - [DataMember(Name = "deltaECalculationRepaired", EmitDefaultValue = false)] - public string DeltaECalculationRepaired { get; set; } - - /// - /// Gets or Sets DeltaECalculationSprayout - /// - [DataMember(Name = "deltaECalculationSprayout", EmitDefaultValue = false)] - public string DeltaECalculationSprayout { get; set; } - - /// - /// Gets or Sets OwnColorVariantNumber - /// - [DataMember(Name = "ownColorVariantNumber", EmitDefaultValue = true)] - public int? OwnColorVariantNumber { get; set; } - - /// - /// Gets or Sets PrimerProductId - /// - [DataMember(Name = "primerProductId", EmitDefaultValue = false)] - public string PrimerProductId { get; set; } - - /// - /// ProductId is only required for color mixes - /// - /// ProductId is only required for color mixes - [DataMember(Name = "productId", EmitDefaultValue = false)] - public string ProductId { get; set; } - - /// - /// ProductName is only required for color mixes - /// - /// ProductName is only required for color mixes - [DataMember(Name = "productName", EmitDefaultValue = false)] - public string ProductName { get; set; } - - /// - /// Gets or Sets SelectedVersionIndex - /// - [DataMember(Name = "selectedVersionIndex", EmitDefaultValue = false)] - public int SelectedVersionIndex { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MixLog {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" MixDate: ").Append(MixDate).Append("\n"); - sb.Append(" ShopId: ").Append(ShopId).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" TotalRecalculations: ").Append(TotalRecalculations).Append("\n"); - sb.Append(" TotalOverPoors: ").Append(TotalOverPoors).Append("\n"); - sb.Append(" TotalSkips: ").Append(TotalSkips).Append("\n"); - sb.Append(" TotalUnderPours: ").Append(TotalUnderPours).Append("\n"); - sb.Append(" FormulaVersionDate: ").Append(FormulaVersionDate).Append("\n"); - sb.Append(" SomeCode: ").Append(SomeCode).Append("\n"); - sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" BrandName: ").Append(BrandName).Append("\n"); - sb.Append(" CategoryCode: ").Append(CategoryCode).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" ColorDescription: ").Append(ColorDescription).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append(" CommercialProductCode: ").Append(CommercialProductCode).Append("\n"); - sb.Append(" ProductLineCode: ").Append(ProductLineCode).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); - sb.Append(" CreatedByFirstName: ").Append(CreatedByFirstName).Append("\n"); - sb.Append(" CreatedByLastName: ").Append(CreatedByLastName).Append("\n"); - sb.Append(" DeltaECalculationRepaired: ").Append(DeltaECalculationRepaired).Append("\n"); - sb.Append(" DeltaECalculationSprayout: ").Append(DeltaECalculationSprayout).Append("\n"); - sb.Append(" OwnColorVariantNumber: ").Append(OwnColorVariantNumber).Append("\n"); - sb.Append(" PrimerProductId: ").Append(PrimerProductId).Append("\n"); - sb.Append(" ProductId: ").Append(ProductId).Append("\n"); - sb.Append(" ProductName: ").Append(ProductName).Append("\n"); - sb.Append(" SelectedVersionIndex: ").Append(SelectedVersionIndex).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 Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MixLog); - } - - /// - /// Returns true if MixLog instances are equal - /// - /// Instance of MixLog to be compared - /// Boolean - public bool Equals(MixLog input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.MixDate == input.MixDate || - (this.MixDate != null && - this.MixDate.Equals(input.MixDate)) - ) && - ( - this.ShopId == input.ShopId || - (this.ShopId != null && - this.ShopId.Equals(input.ShopId)) - ) && - ( - this.TotalPrice == input.TotalPrice || - (this.TotalPrice != null && - this.TotalPrice.Equals(input.TotalPrice)) - ) && - ( - this.TotalRecalculations == input.TotalRecalculations || - this.TotalRecalculations.Equals(input.TotalRecalculations) - ) && - ( - this.TotalOverPoors == input.TotalOverPoors || - this.TotalOverPoors.Equals(input.TotalOverPoors) - ) && - ( - this.TotalSkips == input.TotalSkips || - this.TotalSkips.Equals(input.TotalSkips) - ) && - ( - this.TotalUnderPours == input.TotalUnderPours || - this.TotalUnderPours.Equals(input.TotalUnderPours) - ) && - ( - this.FormulaVersionDate == input.FormulaVersionDate || - (this.FormulaVersionDate != null && - this.FormulaVersionDate.Equals(input.FormulaVersionDate)) - ) && - ( - this.SomeCode == input.SomeCode || - (this.SomeCode != null && - this.SomeCode.Equals(input.SomeCode)) - ) && - ( - this.BatchNumber == input.BatchNumber || - (this.BatchNumber != null && - this.BatchNumber.Equals(input.BatchNumber)) - ) && - ( - this.BrandCode == input.BrandCode || - (this.BrandCode != null && - this.BrandCode.Equals(input.BrandCode)) - ) && - ( - this.BrandId == input.BrandId || - (this.BrandId != null && - this.BrandId.Equals(input.BrandId)) - ) && - ( - this.BrandName == input.BrandName || - (this.BrandName != null && - this.BrandName.Equals(input.BrandName)) - ) && - ( - this.CategoryCode == input.CategoryCode || - (this.CategoryCode != null && - this.CategoryCode.Equals(input.CategoryCode)) - ) && - ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) - ) && - ( - this.ColorDescription == input.ColorDescription || - (this.ColorDescription != null && - this.ColorDescription.Equals(input.ColorDescription)) - ) && - ( - this.Comment == input.Comment || - (this.Comment != null && - this.Comment.Equals(input.Comment)) - ) && - ( - this.CommercialProductCode == input.CommercialProductCode || - (this.CommercialProductCode != null && - this.CommercialProductCode.Equals(input.CommercialProductCode)) - ) && - ( - this.ProductLineCode == input.ProductLineCode || - (this.ProductLineCode != null && - this.ProductLineCode.Equals(input.ProductLineCode)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.CreatedBy == input.CreatedBy || - (this.CreatedBy != null && - this.CreatedBy.Equals(input.CreatedBy)) - ) && - ( - this.CreatedByFirstName == input.CreatedByFirstName || - (this.CreatedByFirstName != null && - this.CreatedByFirstName.Equals(input.CreatedByFirstName)) - ) && - ( - this.CreatedByLastName == input.CreatedByLastName || - (this.CreatedByLastName != null && - this.CreatedByLastName.Equals(input.CreatedByLastName)) - ) && - ( - this.DeltaECalculationRepaired == input.DeltaECalculationRepaired || - (this.DeltaECalculationRepaired != null && - this.DeltaECalculationRepaired.Equals(input.DeltaECalculationRepaired)) - ) && - ( - this.DeltaECalculationSprayout == input.DeltaECalculationSprayout || - (this.DeltaECalculationSprayout != null && - this.DeltaECalculationSprayout.Equals(input.DeltaECalculationSprayout)) - ) && - ( - this.OwnColorVariantNumber == input.OwnColorVariantNumber || - (this.OwnColorVariantNumber != null && - this.OwnColorVariantNumber.Equals(input.OwnColorVariantNumber)) - ) && - ( - this.PrimerProductId == input.PrimerProductId || - (this.PrimerProductId != null && - this.PrimerProductId.Equals(input.PrimerProductId)) - ) && - ( - this.ProductId == input.ProductId || - (this.ProductId != null && - this.ProductId.Equals(input.ProductId)) - ) && - ( - this.ProductName == input.ProductName || - (this.ProductName != null && - this.ProductName.Equals(input.ProductName)) - ) && - ( - this.SelectedVersionIndex == input.SelectedVersionIndex || - this.SelectedVersionIndex.Equals(input.SelectedVersionIndex) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.MixDate != null) - { - hashCode = (hashCode * 59) + this.MixDate.GetHashCode(); - } - if (this.ShopId != null) - { - hashCode = (hashCode * 59) + this.ShopId.GetHashCode(); - } - if (this.TotalPrice != null) - { - hashCode = (hashCode * 59) + this.TotalPrice.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TotalRecalculations.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalOverPoors.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalSkips.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalUnderPours.GetHashCode(); - if (this.FormulaVersionDate != null) - { - hashCode = (hashCode * 59) + this.FormulaVersionDate.GetHashCode(); - } - if (this.SomeCode != null) - { - hashCode = (hashCode * 59) + this.SomeCode.GetHashCode(); - } - if (this.BatchNumber != null) - { - hashCode = (hashCode * 59) + this.BatchNumber.GetHashCode(); - } - if (this.BrandCode != null) - { - hashCode = (hashCode * 59) + this.BrandCode.GetHashCode(); - } - if (this.BrandId != null) - { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); - } - if (this.BrandName != null) - { - hashCode = (hashCode * 59) + this.BrandName.GetHashCode(); - } - if (this.CategoryCode != null) - { - hashCode = (hashCode * 59) + this.CategoryCode.GetHashCode(); - } - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - if (this.ColorDescription != null) - { - hashCode = (hashCode * 59) + this.ColorDescription.GetHashCode(); - } - if (this.Comment != null) - { - hashCode = (hashCode * 59) + this.Comment.GetHashCode(); - } - if (this.CommercialProductCode != null) - { - hashCode = (hashCode * 59) + this.CommercialProductCode.GetHashCode(); - } - if (this.ProductLineCode != null) - { - hashCode = (hashCode * 59) + this.ProductLineCode.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.CreatedBy != null) - { - hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); - } - if (this.CreatedByFirstName != null) - { - hashCode = (hashCode * 59) + this.CreatedByFirstName.GetHashCode(); - } - if (this.CreatedByLastName != null) - { - hashCode = (hashCode * 59) + this.CreatedByLastName.GetHashCode(); - } - if (this.DeltaECalculationRepaired != null) - { - hashCode = (hashCode * 59) + this.DeltaECalculationRepaired.GetHashCode(); - } - if (this.DeltaECalculationSprayout != null) - { - hashCode = (hashCode * 59) + this.DeltaECalculationSprayout.GetHashCode(); - } - if (this.OwnColorVariantNumber != null) - { - hashCode = (hashCode * 59) + this.OwnColorVariantNumber.GetHashCode(); - } - if (this.PrimerProductId != null) - { - hashCode = (hashCode * 59) + this.PrimerProductId.GetHashCode(); - } - if (this.ProductId != null) - { - hashCode = (hashCode * 59) + this.ProductId.GetHashCode(); - } - if (this.ProductName != null) - { - hashCode = (hashCode * 59) + this.ProductName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SelectedVersionIndex.GetHashCode(); - return hashCode; - } - } - - } - -}