From 8bbc09f2f3278487aba32a0e601145d0dffedab7 Mon Sep 17 00:00:00 2001 From: Jorge Rangel Date: Thu, 12 Sep 2024 16:30:18 -0500 Subject: [PATCH] feat: support additional property serialization --- .../eng/scripts/Generate.ps1 | 1 - .../MrwSerializationTypeDefinition.cs | 405 +- .../src/Snippets/JsonElementSnippets.cs | 9 + .../src/Snippets/JsonPropertySnippets.cs | 2 + .../AdditionalPropertiesTest.cs | 164 + .../DiscriminatorTests.cs | 11 +- .../JsonModelCoreTests.cs | 12 + .../MultipleAdditionalProperties.cs | 52 + .../src/Properties/launchSettings.json | 5 + .../src/Providers/ModelFactoryProvider.cs | 56 +- .../src/Providers/ModelProvider.cs | 93 +- .../src/Shared/AdditionalPropertiesHelper.cs | 28 + .../src/Snippets/Snippet.cs | 1 + .../ModelProviders/DiscriminatorTests.cs | 31 +- .../SingleDiscriminatorTests.cs | 2 +- .../AdditionalPropertiesTests.cs | 895 ++ .../DifferentSpreadStringDerivedTests.cs | 44 + .../MultipleSpreadRecordTests.cs | 52 + .../DifferentSpreadStringDerived/Derived.json | 5 + .../DerivedWire.json | 5 + .../MultipleSpreadRecord.json | 5 + .../MultipleSpreadRecordWire.json | 5 + .../src/Generated/Models/Cobra.cs | 2 +- .../src/Generated/Models/Golden.cs | 2 +- .../src/Generated/Models/Eagle.cs | 2 +- .../src/Generated/Models/Goose.cs | 2 +- .../src/Generated/Models/SeaGull.cs | 2 +- .../src/Generated/Models/Sparrow.cs | 2 +- .../src/Generated/Models/TRex.cs | 2 +- .../additional-properties/Configuration.json | 6 + .../_Type.Property.AdditionalProperties.sln | 48 + .../Generated/AdditionalPropertiesClient.cs | 82 + .../AdditionalPropertiesClientOptions.cs | 12 + .../Generated/ExtendsDifferentSpreadFloat.cs | 34 + .../Generated/ExtendsDifferentSpreadModel.cs | 34 + .../ExtendsDifferentSpreadModelArray.cs | 34 + .../Generated/ExtendsDifferentSpreadString.cs | 34 + .../src/Generated/ExtendsFloat.cs | 34 + .../src/Generated/ExtendsModel.cs | 34 + .../src/Generated/ExtendsModelArray.cs | 34 + .../src/Generated/ExtendsString.cs | 34 + .../src/Generated/ExtendsUnknown.cs | 34 + .../src/Generated/ExtendsUnknownDerived.cs | 34 + .../Generated/ExtendsUnknownDiscriminated.cs | 34 + .../src/Generated/IsFloat.cs | 34 + .../src/Generated/IsModel.cs | 34 + .../src/Generated/IsModelArray.cs | 34 + .../src/Generated/IsString.cs | 34 + .../src/Generated/IsUnknown.cs | 34 + .../src/Generated/IsUnknownDerived.cs | 34 + .../src/Generated/IsUnknownDiscriminated.cs | 34 + ...fferentSpreadFloatDerived.Serialization.cs | 36 + .../Models/DifferentSpreadFloatDerived.cs | 22 + ...ifferentSpreadFloatRecord.Serialization.cs | 36 + .../Models/DifferentSpreadFloatRecord.cs | 24 + ...ntSpreadModelArrayDerived.Serialization.cs | 36 + .../DifferentSpreadModelArrayDerived.cs | 18 + ...entSpreadModelArrayRecord.Serialization.cs | 36 + .../Models/DifferentSpreadModelArrayRecord.cs | 24 + ...fferentSpreadModelDerived.Serialization.cs | 36 + .../Models/DifferentSpreadModelDerived.cs | 22 + ...ifferentSpreadModelRecord.Serialization.cs | 36 + .../Models/DifferentSpreadModelRecord.cs | 24 + ...ferentSpreadStringDerived.Serialization.cs | 36 + .../Models/DifferentSpreadStringDerived.cs | 22 + ...fferentSpreadStringRecord.Serialization.cs | 36 + .../Models/DifferentSpreadStringRecord.cs | 24 + ...FloatAdditionalProperties.Serialization.cs | 36 + .../ExtendsFloatAdditionalProperties.cs | 21 + ...ModelAdditionalProperties.Serialization.cs | 36 + .../ExtendsModelAdditionalProperties.cs | 22 + ...ArrayAdditionalProperties.Serialization.cs | 36 + .../ExtendsModelArrayAdditionalProperties.cs | 18 + ...tringAdditionalProperties.Serialization.cs | 36 + .../ExtendsStringAdditionalProperties.cs | 21 + ...knownAdditionalProperties.Serialization.cs | 36 + .../ExtendsUnknownAdditionalProperties.cs | 24 + ...ditionalPropertiesDerived.Serialization.cs | 36 + ...tendsUnknownAdditionalPropertiesDerived.cs | 28 + ...alPropertiesDiscriminated.Serialization.cs | 37 + ...nknownAdditionalPropertiesDiscriminated.cs | 30 + ...rtiesDiscriminatedDerived.Serialization.cs | 36 + ...dditionalPropertiesDiscriminatedDerived.cs | 28 + ...FloatAdditionalProperties.Serialization.cs | 36 + .../Models/IsFloatAdditionalProperties.cs | 21 + ...ModelAdditionalProperties.Serialization.cs | 36 + .../Models/IsModelAdditionalProperties.cs | 22 + ...ArrayAdditionalProperties.Serialization.cs | 36 + .../IsModelArrayAdditionalProperties.cs | 18 + ...tringAdditionalProperties.Serialization.cs | 36 + .../Models/IsStringAdditionalProperties.cs | 21 + ...knownAdditionalProperties.Serialization.cs | 36 + .../Models/IsUnknownAdditionalProperties.cs | 24 + ...ditionalPropertiesDerived.Serialization.cs | 36 + .../IsUnknownAdditionalPropertiesDerived.cs | 28 + ...alPropertiesDiscriminated.Serialization.cs | 37 + ...nknownAdditionalPropertiesDiscriminated.cs | 30 + ...rtiesDiscriminatedDerived.Serialization.cs | 36 + ...dditionalPropertiesDiscriminatedDerived.cs | 28 + .../Models/ModelForRecord.Serialization.cs | 36 + .../src/Generated/Models/ModelForRecord.cs | 17 + .../MultipleSpreadRecord.Serialization.cs | 36 + .../Generated/Models/MultipleSpreadRecord.cs | 23 + .../Models/SpreadFloatRecord.Serialization.cs | 36 + .../src/Generated/Models/SpreadFloatRecord.cs | 21 + .../SpreadModelArrayRecord.Serialization.cs | 36 + .../Models/SpreadModelArrayRecord.cs | 18 + .../Models/SpreadModelRecord.Serialization.cs | 36 + .../src/Generated/Models/SpreadModelRecord.cs | 22 + ...cordForDiscriminatedUnion.Serialization.cs | 36 + .../SpreadRecordForDiscriminatedUnion.cs | 22 + ...dForNonDiscriminatedUnion.Serialization.cs | 36 + .../SpreadRecordForNonDiscriminatedUnion.cs | 22 + ...ForNonDiscriminatedUnion2.Serialization.cs | 36 + .../SpreadRecordForNonDiscriminatedUnion2.cs | 22 + ...ForNonDiscriminatedUnion3.Serialization.cs | 36 + .../SpreadRecordForNonDiscriminatedUnion3.cs | 22 + .../SpreadRecordForUnion.Serialization.cs | 36 + .../Generated/Models/SpreadRecordForUnion.cs | 23 + .../SpreadStringRecord.Serialization.cs | 36 + .../Generated/Models/SpreadStringRecord.cs | 21 + ...alPropertiesDiscriminated.Serialization.cs | 31 + ...nknownAdditionalPropertiesDiscriminated.cs | 14 + ...alPropertiesDiscriminated.Serialization.cs | 31 + ...nknownAdditionalPropertiesDiscriminated.cs | 14 + .../Models/WidgetData0.Serialization.cs | 36 + .../src/Generated/Models/WidgetData0.cs | 19 + .../src/Generated/Models/WidgetData0Kind.cs | 31 + .../Models/WidgetData1.Serialization.cs | 36 + .../src/Generated/Models/WidgetData1.cs | 27 + .../src/Generated/Models/WidgetData1Kind.cs | 31 + .../Models/WidgetData2.Serialization.cs | 36 + .../src/Generated/Models/WidgetData2.cs | 19 + .../src/Generated/Models/WidgetData2Kind.cs | 31 + .../src/Generated/MultipleSpread.cs | 34 + .../src/Generated/SpreadDifferentFloat.cs | 34 + .../src/Generated/SpreadDifferentModel.cs | 34 + .../Generated/SpreadDifferentModelArray.cs | 34 + .../src/Generated/SpreadDifferentString.cs | 34 + .../src/Generated/SpreadFloat.cs | 34 + .../src/Generated/SpreadModel.cs | 34 + .../src/Generated/SpreadModelArray.cs | 34 + .../SpreadRecordDiscriminatedUnion.cs | 34 + .../SpreadRecordNonDiscriminatedUnion.cs | 34 + .../SpreadRecordNonDiscriminatedUnion2.cs | 34 + .../SpreadRecordNonDiscriminatedUnion3.cs | 34 + .../src/Generated/SpreadRecordUnion.cs | 34 + .../src/Generated/SpreadString.cs | 34 + ...ropertyAdditionalPropertiesModelFactory.cs | 88 + ..._Type.Property.AdditionalProperties.csproj | 16 + .../additional-properties/tspCodeModel.json | 7864 +++++++++++++++++ 151 files changed, 13366 insertions(+), 150 deletions(-) create mode 100644 packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/AdditionalPropertiesTest.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/JsonModelCoreTests/MultipleAdditionalProperties.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Shared/AdditionalPropertiesHelper.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/AdditionalPropertiesTests.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/DifferentSpreadStringDerivedTests.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/MultipleSpreadRecordTests.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/DifferentSpreadStringDerived/Derived.json create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/DifferentSpreadStringDerived/DerivedWire.json create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/MultipleSpreadRecord/MultipleSpreadRecord.json create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/MultipleSpreadRecord/MultipleSpreadRecordWire.json create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/Configuration.json create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/_Type.Property.AdditionalProperties.sln create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/AdditionalPropertiesClient.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/AdditionalPropertiesClientOptions.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadFloat.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModel.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModelArray.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadString.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsFloat.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModel.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModelArray.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsString.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknown.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDerived.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDiscriminated.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsFloat.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModel.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModelArray.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsString.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknown.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDerived.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDiscriminated.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ModelForRecord.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ModelForRecord.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/MultipleSpreadRecord.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/MultipleSpreadRecord.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadFloatRecord.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadFloatRecord.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelArrayRecord.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelArrayRecord.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelRecord.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelRecord.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForDiscriminatedUnion.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForDiscriminatedUnion.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion2.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion2.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion3.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion3.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForUnion.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForUnion.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadStringRecord.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadStringRecord.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData0.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData0.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData0Kind.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData1.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData1.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData1Kind.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData2.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData2.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData2Kind.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/MultipleSpread.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentFloat.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModel.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModelArray.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentString.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadFloat.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModel.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModelArray.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordDiscriminatedUnion.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion2.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion3.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordUnion.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadString.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/TypePropertyAdditionalPropertiesModelFactory.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/_Type.Property.AdditionalProperties.csproj create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/tspCodeModel.json diff --git a/packages/http-client-csharp/eng/scripts/Generate.ps1 b/packages/http-client-csharp/eng/scripts/Generate.ps1 index ff82216b10..1a38b1e560 100644 --- a/packages/http-client-csharp/eng/scripts/Generate.ps1 +++ b/packages/http-client-csharp/eng/scripts/Generate.ps1 @@ -76,7 +76,6 @@ $failingSpecs = @( Join-Path 'http' 'type' 'model' 'inheritance' 'not-discriminated' Join-Path 'http' 'type' 'model' 'inheritance' 'recursive' Join-Path 'http' 'type' 'model' 'templated' - Join-Path 'http' 'type' 'property' 'additional-properties' ) $cadlRanchLaunchProjects = @{} diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs index fbe9bc90c2..822eabef9b 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs @@ -26,8 +26,6 @@ namespace Microsoft.Generator.CSharp.ClientModel.Providers /// internal class MrwSerializationTypeDefinition : TypeProvider { - private const string AdditionalBinaryDataPropertiesFieldName = "_additionalBinaryDataProperties"; - private const string AdditionBinaryDataPropertiesPropertyName = "AdditionalBinaryDataProperties"; private const string JsonModelWriteCoreMethodName = "JsonModelWriteCore"; private const string JsonModelCreateCoreMethodName = "JsonModelCreateCore"; private const string PersistableModelWriteCoreMethodName = "PersistableModelWriteCore"; @@ -57,6 +55,7 @@ internal class MrwSerializationTypeDefinition : TypeProvider private ConstructorProvider? _serializationConstructor; // Flag to determine if the model should override the serialization methods private readonly bool _shouldOverrideMethods; + private Lazy _additionalProperties; public MrwSerializationTypeDefinition(InputModelType inputModel, ModelProvider modelProvider) { @@ -69,10 +68,9 @@ public MrwSerializationTypeDefinition(InputModelType inputModel, ModelProvider m _jsonModelObjectInterface = _isStruct ? (CSharpType)typeof(IJsonModel) : null; _persistableModelTInterface = new CSharpType(typeof(IPersistableModel<>), interfaceType.Type); _persistableModelObjectInterface = _isStruct ? (CSharpType)typeof(IPersistableModel) : null; - _rawDataField = _model.Fields.FirstOrDefault(f => f.Name == AdditionalBinaryDataPropertiesFieldName); - _additionalBinaryDataProperty = _model.Properties.FirstOrDefault( - p => p.Name == AdditionBinaryDataPropertiesPropertyName - || p.Name == "AdditionalProperties" && p.Type.IsDictionary && p.Type.ElementType.Equals(typeof(BinaryData))); + _rawDataField = _model.Fields.FirstOrDefault(f => f.Name == AdditionalPropertiesHelper.AdditionalBinaryDataPropsFieldName); + _additionalBinaryDataProperty = GetAdditionalBinaryDataPropertiesProp(); + _additionalProperties = new([.. _model.Properties.Where(IsAdditionalProperty)]); _shouldOverrideMethods = _model.Type.BaseType != null && _model.Type.BaseType is { IsFrameworkType: false }; _utf8JsonWriterSnippet = _utf8JsonWriterParameter.As(); _mrwOptionsParameterSnippet = _serializationOptionsParameter.As(); @@ -84,6 +82,7 @@ public MrwSerializationTypeDefinition(InputModelType inputModel, ModelProvider m protected override TypeSignatureModifiers GetDeclarationModifiers() => _model.DeclarationModifiers; private ConstructorProvider SerializationConstructor => _serializationConstructor ??= _model.FullConstructor; + private PropertyProvider[] AdditionalProperties => _additionalProperties.Value; protected override string BuildRelativeFilePath() => Path.Combine("src", "Generated", "Models", $"{Name}.Serialization.cs"); @@ -532,6 +531,7 @@ private MethodBodyStatement[] BuildJsonModelWriteCoreMethodBody() CreateValidateJsonFormat(_persistableModelTInterface, WriteAction), CallBaseJsonModelWriteCore(), CreateWritePropertiesStatements(), + CreateWriteAdditionalPropertiesStatement(), CreateWriteAdditionalRawDataStatement() ]; } @@ -564,7 +564,18 @@ private MethodBodyStatement GetPropertyVariableDeclarations() if (parameter.Property is { } property) { var variableRef = property.AsVariableExpression; - propertyDeclarationStatements.Add(Declare(variableRef, Default)); + if (IsAdditionalProperty(property)) + { + // IDictionary additionalTProperties = new Dictionary(); + propertyDeclarationStatements.Add(Declare(variableRef, new DictionaryExpression(property.Type, New.Instance(property.Type.PropertyInitializationType)))); + } + else + { + var defaultValue = (property.IsDiscriminator && _model.DiscriminatorValue != null && property.Type.IsFrameworkType) + ? Literal(_model.DiscriminatorValue) + : Default; + propertyDeclarationStatements.Add(Declare(variableRef, defaultValue)); + } } else { @@ -572,7 +583,7 @@ private MethodBodyStatement GetPropertyVariableDeclarations() Debug.Assert(parameter.Field != null); var field = parameter.Field; var fieldRef = field.AsVariableExpression; - if (field.Name == AdditionalBinaryDataPropertiesFieldName) + if (field.Name == AdditionalPropertiesHelper.AdditionalBinaryDataPropsFieldName) { // the raw data is kind of different because we assign it with an instance, not like others properties/fields // IDictionary additionalBinaryDataProperties = new Dictionary(); @@ -635,29 +646,6 @@ private MethodBodyStatement CallBaseJsonModelWriteCore() : MethodBodyStatement.Empty; } - private MethodBodyStatement GetPropertyInitializers() - { - List methodBodyStatements = new(_model.Properties.Count + 1); - - // we only need to have initializers for my own properties, the base properties are handled by the base constructor. - foreach (var property in _model.Properties) - { - // skip those non-spec properties - if (property.WireInfo == null) - { - continue; - } - methodBodyStatements.Add(property.Assign(property.AsParameter).Terminate()); - } - - if (_rawDataField != null) - { - methodBodyStatements.Add(_rawDataField.Assign(_rawDataField.AsParameter).Terminate()); - } - - return methodBodyStatements; - } - /// /// Builds the values for the serialization constructor parameters. /// @@ -672,7 +660,7 @@ private ValueExpression[] GetSerializationCtorParameterValues() var parameter = parameters[i]; if (parameter.Property is { } property) { - serializationCtorParameters[i] = GetValueForSerializationConstructor(property.Type, property.AsVariableExpression, property.WireInfo); + serializationCtorParameters[i] = GetValueForSerializationConstructor(property); continue; } else @@ -686,36 +674,42 @@ private ValueExpression[] GetSerializationCtorParameterValues() return serializationCtorParameters; } - private static ValueExpression GetValueForSerializationConstructor( - CSharpType propertyType, - VariableExpression propertyVarReference, - PropertyWireInformation? propertyWireInfo) + private static ValueExpression GetValueForSerializationConstructor(PropertyProvider propertyProvider) { - var isRequired = propertyWireInfo?.IsRequired ?? false; + var isRequired = propertyProvider.WireInfo?.IsRequired ?? false; - if (!propertyType.IsFrameworkType) + if (!propertyProvider.Type.IsFrameworkType || IsAdditionalProperty(propertyProvider)) { - return propertyVarReference; + return propertyProvider.AsVariableExpression; } else if (!isRequired) { - return OptionalSnippets.FallBackToChangeTrackingCollection(propertyVarReference, propertyType); + return OptionalSnippets.FallBackToChangeTrackingCollection(propertyProvider.AsVariableExpression, propertyProvider.Type); } - return propertyVarReference; + return propertyProvider.AsVariableExpression; } private List BuildDeserializePropertiesStatements(ScopedApi jsonProperty) { - List propertyDeserializationStatements = new(); + List propertyDeserializationStatements = []; + Dictionary> additionalPropsValueKindBodyStatements = []; var parameters = SerializationConstructor.Signature.Parameters; + // Create each property's deserialization statement for (int i = 0; i < parameters.Count; i++) { var parameter = parameters[i]; if (parameter.Property is { } property) { - // we should only deserialize properties with a wire info. Those properties without wire info indicate they are not spec properties. + // handle additional properties + if (property != _additionalBinaryDataProperty && IsAdditionalProperty(property)) + { + AddAdditionalPropertiesValueKindStatements(additionalPropsValueKindBodyStatements, property, jsonProperty); + continue; + } + + // By default, we should only deserialize properties with wire info. Those properties without wire info indicate they are not spec properties. if (property.WireInfo is not { } wireInfo) { continue; @@ -733,29 +727,283 @@ private List BuildDeserializePropertiesStatements(ScopedApi } } - // deserialize the raw data properties + // Add the additional properties deserialization switch statement + if (additionalPropsValueKindBodyStatements.Count > 0) + { + propertyDeserializationStatements.Add( + CreateDeserializeAdditionalPropsValueKindCheck(jsonProperty, additionalPropsValueKindBodyStatements)); + } + + // deserialize the raw binary data for the model + var rawBinaryData = _rawDataField + ?? _model.BaseModelProvider?.Fields.FirstOrDefault(f => f.Name == AdditionalPropertiesHelper.AdditionalBinaryDataPropsFieldName); + if (_additionalBinaryDataProperty != null) { - var elementType = _additionalBinaryDataProperty.Type.Arguments[1].FrameworkType; - var rawDataDeserializationValue = GetValueTypeDeserializationExpression(elementType, jsonProperty.Value(), SerializationFormat.Default); - propertyDeserializationStatements.Add(new IfStatement(_isNotEqualToWireConditionSnippet) - { - _additionalBinaryDataProperty.AsVariableExpression.AsDictionary(_additionalBinaryDataProperty.Type).Add(jsonProperty.Name(), rawDataDeserializationValue) - }); + var binaryDataDeserializationValue = GetValueTypeDeserializationExpression( + _additionalBinaryDataProperty.Type.ElementType.FrameworkType, jsonProperty.Value(), SerializationFormat.Default); + propertyDeserializationStatements.Add( + _additionalBinaryDataProperty.AsVariableExpression.AsDictionary(_additionalBinaryDataProperty.Type).Add(jsonProperty.Name(), binaryDataDeserializationValue)); } - else if (_rawDataField != null) + else if (rawBinaryData != null) { - var elementType = _rawDataField.Type.Arguments[1].FrameworkType; + var elementType = rawBinaryData.Type.Arguments[1].FrameworkType; var rawDataDeserializationValue = GetValueTypeDeserializationExpression(elementType, jsonProperty.Value(), SerializationFormat.Default); propertyDeserializationStatements.Add(new IfStatement(_isNotEqualToWireConditionSnippet) { - _rawDataField.AsVariableExpression.AsDictionary(_rawDataField.Type).Add(jsonProperty.Name(), rawDataDeserializationValue) + rawBinaryData.AsVariableExpression.AsDictionary(rawBinaryData.Type).Add(jsonProperty.Name(), rawDataDeserializationValue) }); } return propertyDeserializationStatements; } + private void AddAdditionalPropertiesValueKindStatements( + Dictionary> additionalPropsValueKindBodyStatements, + PropertyProvider additionalPropertiesProperty, + ScopedApi jsonProperty) + { + DictionaryExpression additionalPropsDict = additionalPropertiesProperty.AsVariableExpression.AsDictionary(additionalPropertiesProperty.Type); + var valueType = additionalPropertiesProperty.Type.ElementType; + + // Handle the known verifiable additional property value types + if (valueType.IsFrameworkType && AdditionalPropertiesHelper.VerifiableAdditionalPropertyTypes.Contains(valueType.FrameworkType)) + { + switch (valueType.FrameworkType) + { + case Type t when t == typeof(string): + AddStatements(JsonValueKind.String, + [ + DeserializeValue(valueType, jsonProperty.Value(), SerializationFormat.Default, out ValueExpression stringValue), + additionalPropsDict.Add(jsonProperty.Name(), stringValue), + Continue + ]); + break; + case Type t when t == typeof(bool): + AddStatements(JsonValueKind.True, + [ + DeserializeValue(valueType, jsonProperty.Value(), SerializationFormat.Default, out ValueExpression boolValue), + additionalPropsDict.Add(jsonProperty.Name(), boolValue), + Continue + ]); + break; + case Type t when t == typeof(float): + AddStatements(JsonValueKind.Number, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetSingle), out ScopedApi floatValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), floatValue), + Continue + }, + ]); + break; + case Type t when t == typeof(byte): + AddStatements(JsonValueKind.Number, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetByte), out ScopedApi byteValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), byteValue), + Continue + }, + ]); + break; + case Type t when t == typeof(byte[]): + AddStatements(JsonValueKind.String, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetBytesFromBase64), out ScopedApi byteArray)) + { + additionalPropsDict.Add(jsonProperty.Name(), byteArray), + Continue + }, + ]); + break; + case Type t when t == typeof(sbyte): + AddStatements(JsonValueKind.Number, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetSByte), out ScopedApi sbyteValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), sbyteValue), + Continue + }, + ]); + break; + case Type t when t == typeof(DateTime): + AddStatements(JsonValueKind.String, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetDateTime), out ScopedApi dateTimeValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), dateTimeValue), + Continue + }, + ]); + break; + case Type t when t == typeof(DateTimeOffset): + AddStatements(JsonValueKind.String, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetDateTimeOffset), out ScopedApi dateTimeOffsetValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), dateTimeOffsetValue), + Continue + }, + ]); + break; + case Type t when t == typeof(Guid): + AddStatements(JsonValueKind.String, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetGuid), out ScopedApi guidValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), guidValue), + Continue + }, + ]); + break; + case Type t when t == typeof(decimal): + AddStatements(JsonValueKind.Number, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetDecimal), out ScopedApi decimalValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), decimalValue), + Continue + }, + ]); + break; + case Type t when t == typeof(double): + AddStatements(JsonValueKind.Number, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetDouble), out ScopedApi doubleValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), doubleValue), + Continue + }, + ]); + break; + case Type t when t == typeof(short): + AddStatements(JsonValueKind.Number, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetInt16), out ScopedApi shortValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), shortValue), + Continue + }, + ]); + break; + case Type t when t == typeof(int): + AddStatements(JsonValueKind.Number, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetInt32), out ScopedApi intValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), intValue), + Continue + }, + ]); + break; + case Type t when t == typeof(long): + AddStatements(JsonValueKind.Number, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetInt64), out ScopedApi longValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), longValue), + Continue + }, + ]); + break; + case Type t when t == typeof(ushort): + AddStatements(JsonValueKind.Number, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetUInt16), out ScopedApi ushortValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), ushortValue), + Continue + }, + ]); + break; + case Type t when t == typeof(uint): + AddStatements(JsonValueKind.Number, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetUInt32), out ScopedApi uintValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), uintValue), + Continue + }, + ]); + break; + case Type t when t == typeof(ulong): + AddStatements(JsonValueKind.Number, + [ + new IfStatement(jsonProperty.Value().TryGetValue(nameof(JsonElement.TryGetUInt64), out ScopedApi ulongValue)) + { + additionalPropsDict.Add(jsonProperty.Name(), ulongValue), + Continue + }, + ]); + break; + default: + throw new InvalidOperationException($"Unable to generate additional properties value type validation for type {valueType.FrameworkType}."); + } + + return; + } + + if (valueType.IsList || valueType.IsDictionary) + { + var valueKind = valueType.IsList ? JsonValueKind.Array : JsonValueKind.Object; + AddStatements(valueKind, + [ + DeserializeValue(valueType, jsonProperty.Value(), SerializationFormat.Default, out ValueExpression value), + additionalPropsDict.Add(jsonProperty.Name(), value), + Continue + ]); + + return; + } + + // Local function to add statements to the value kind checks dictionary + void AddStatements(JsonValueKind valueKind, MethodBodyStatement[] statements) + { + if (!additionalPropsValueKindBodyStatements.TryGetValue(valueKind, out var checks)) + { + checks = []; + additionalPropsValueKindBodyStatements[valueKind] = checks; + } + checks.AddRange(statements); + } + } + + private static SwitchStatement CreateDeserializeAdditionalPropsValueKindCheck( + ScopedApi jsonProperty, + Dictionary> additionalPropsValueKindBodyStatements) + { + var switchCases = new List(additionalPropsValueKindBodyStatements.Count); + // Create the switch cases for each value kind, using the supplied built body statements + foreach (var (valueKind, statements) in additionalPropsValueKindBodyStatements) + { + switch (valueKind) + { + case JsonValueKind.String: + switchCases.Add(new(JsonValueKindSnippets.String, statements)); + break; + case JsonValueKind.True: + switchCases.Add(new SwitchCaseStatement( + BoolSnippets.Or(JsonValueKindSnippets.True.As(), JsonValueKindSnippets.False), statements)); + break; + case JsonValueKind.Number: + statements.Add(Break); + switchCases.Add(new SwitchCaseStatement(JsonValueKindSnippets.Number, statements)); + break; + case JsonValueKind.Array: + switchCases.Add(new SwitchCaseStatement(JsonValueKindSnippets.Array, statements)); + break; + case JsonValueKind.Object: + switchCases.Add(new SwitchCaseStatement(JsonValueKindSnippets.Object, statements)); + break; + default: + throw new InvalidOperationException($"Unable to generate additional properties value kind switch case for {valueKind}."); + } + } + + return new SwitchStatement(jsonProperty.ValueKind(), switchCases); + } + private MethodBodyStatement[] DeserializeProperty( PropertyProvider property, ScopedApi jsonProperty) @@ -1360,12 +1608,12 @@ private IfStatement CreateConditionalSerializationStatement( } /// - /// Builds the JSON write core body statement for the additional raw data. + /// Builds the JSON write core body statement for the additional binary data. /// - /// The method body statement that writes the additional raw data. + /// The method body statement that writes the additional binary data. private MethodBodyStatement CreateWriteAdditionalRawDataStatement() { - if (_rawDataField == null) + if (_rawDataField == null || _additionalBinaryDataProperty != null) { return MethodBodyStatement.Empty; } @@ -1384,6 +1632,42 @@ private MethodBodyStatement CreateWriteAdditionalRawDataStatement() }; } + private MethodBodyStatement CreateWriteAdditionalPropertiesStatement() + { + if (_inputModel.AdditionalProperties == null || AdditionalProperties.Length == 0) + { + return MethodBodyStatement.Empty; + } + + var statements = new MethodBodyStatement[AdditionalProperties.Length]; + for (int i = 0; i < AdditionalProperties.Length; i++) + { + var additionalPropertiesProperty = AdditionalProperties[i]; + var tKey = additionalPropertiesProperty.Type.Arguments[0]; + var tValue = additionalPropertiesProperty.Type.Arguments[1]; + // generate serialization statements for each key-value pair in the additional properties dictionary + var forEachStatement = new ForeachStatement("item", additionalPropertiesProperty.AsDictionary(tKey, tValue), out KeyValuePairExpression item) + { + _utf8JsonWriterSnippet.WritePropertyName(item.Key), + CreateSerializationStatement(additionalPropertiesProperty.Type.Arguments[1], item.Value, SerializationFormat.Default), + }; + statements[i] = forEachStatement; + } + + return statements; + } + + private PropertyProvider? GetAdditionalBinaryDataPropertiesProp() + { + PropertyProvider? property = _model.Properties.FirstOrDefault( + p => p.Name == AdditionalPropertiesHelper.AdditionalBinaryDataPropsFieldName + || p.BackingField?.Name == AdditionalPropertiesHelper.AdditionalBinaryDataPropsFieldName); + // search in the base model if the property is not found in the current model + return property ?? _model.BaseModelProvider?.Properties.FirstOrDefault( + p => p.Name == AdditionalPropertiesHelper.AdditionalBinaryDataPropsFieldName + || p.BackingField?.Name == AdditionalPropertiesHelper.AdditionalBinaryDataPropsFieldName); + } + private static bool TypeRequiresNullCheckInSerialization(CSharpType type) { if (type.IsCollection) @@ -1403,5 +1687,14 @@ private static bool TypeRequiresNullCheckInSerialization(CSharpType type) return false; } + + private static bool IsAdditionalProperty(PropertyProvider property) + { + // additional properties should have backing fields and its' type should be a dictionary + if (property.BackingField == null || !property.Type.IsDictionary) + return false; + var span = property.Name.AsSpan(); + return span.StartsWith("Additional", StringComparison.Ordinal) && span.EndsWith("Properties", StringComparison.Ordinal); + } } } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Snippets/JsonElementSnippets.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Snippets/JsonElementSnippets.cs index 941ab75fb5..04678ae5bd 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Snippets/JsonElementSnippets.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Snippets/JsonElementSnippets.cs @@ -90,5 +90,14 @@ public static ScopedApi TryGetInt64(this ScopedApi jsonElemen var invocation = new InvokeMethodExpression(jsonElement, nameof(JsonElement.TryGetInt64), [new DeclarationExpression(longValueDeclaration, true)]); return invocation.As(); } + + internal static ScopedApi TryGetValue(this ScopedApi jsonElement, string methodName, out ScopedApi value) + { + var valueName = typeof(T).Name.ToVariableName(); + var valueDeclaration = new VariableExpression(typeof(T), valueName); + value = valueDeclaration.As(); + var invocation = new InvokeMethodExpression(jsonElement, methodName, [new DeclarationExpression(valueDeclaration, true)]); + return invocation.As(); + } } } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Snippets/JsonPropertySnippets.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Snippets/JsonPropertySnippets.cs index 2d0a10129c..cb06f9385a 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Snippets/JsonPropertySnippets.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Snippets/JsonPropertySnippets.cs @@ -17,6 +17,8 @@ public static ScopedApi Name(this ScopedApi jsonProperty) public static ScopedApi Value(this ScopedApi jsonProperty) => jsonProperty.Property(nameof(JsonProperty.Value)).As(); + public static ScopedApi ValueKind(this ScopedApi jsonProperty) + => Value(jsonProperty).Property(nameof(JsonProperty.Value.ValueKind)).As(); public static ScopedApi NameEquals(this ScopedApi jsonProperty, string value) => jsonProperty.Invoke(nameof(JsonProperty.NameEquals), LiteralU8(value)).As(); diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/AdditionalPropertiesTest.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/AdditionalPropertiesTest.cs new file mode 100644 index 0000000000..a552a68ec4 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/AdditionalPropertiesTest.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Generator.CSharp.ClientModel.Providers; +using Microsoft.Generator.CSharp.Input; +using Microsoft.Generator.CSharp.Tests.Common; +using NUnit.Framework; + +namespace Microsoft.Generator.CSharp.ClientModel.Tests.Providers.MrwSerializationTypeDefinitions +{ + internal class AdditionalPropertiesTest + { + [TestCaseSource(nameof(TestBuildDeserializationMethodTestCases))] + public void TestBuildDeserializationMethod( + InputType additionalPropsValueType, + string[] expectedValueTypeNames, + string[] expectedValueKindChecks) + { + var inputModel = InputFactory.Model("cat", + properties: + [ + InputFactory.Property("color", InputPrimitiveType.String, isRequired: true), + ], + additionalProperties: additionalPropsValueType); + MockHelpers.LoadMockPlugin(inputModels: () => [inputModel]); + + var model = ClientModelPlugin.Instance.TypeFactory.CreateModel(inputModel); + var serializations = model!.SerializationProviders.FirstOrDefault() as MrwSerializationTypeDefinition; + Assert.IsNotNull(serializations); + var deserializationMethod = serializations!.BuildDeserializationMethod(); + Assert.IsNotNull(deserializationMethod); + + var signature = deserializationMethod?.Signature; + + Assert.IsNotNull(signature); + Assert.AreEqual(model.Type, signature?.ReturnType); + + var methodBody = deserializationMethod?.BodyStatements; + Assert.IsNotNull(methodBody); + + var methodBodyString = methodBody!.ToDisplayString(); + // validate the additional properties variable declarations + for (var i = 0; i < expectedValueTypeNames.Length; i++) + { + var expectedVariableName = i == 0 ? "additionalProperties" : $"additional{expectedValueTypeNames[i].ToCleanName()}Properties"; + var expectedDeclaration = $"global::System.Collections.Generic.IDictionary {expectedVariableName}"; + Assert.IsTrue(methodBodyString.Contains(expectedDeclaration, StringComparison.InvariantCultureIgnoreCase)); + } + + // validate the additional properties value kind check statements + foreach (var expectedValueKindCheck in expectedValueKindChecks) + { + Assert.IsTrue(methodBodyString.Contains(expectedValueKindCheck)); + } + + // validate return statement + if (expectedValueTypeNames.Length > 1) + { + // skip the first value type name as it is already included in the return statement + var additionalPropertiesVariables = "additionalProperties, " + string.Join(", ", expectedValueTypeNames.Skip(1).Select(v => $"additional{v.ToCleanName()}Properties,")); + var expectedReturnStatement = $"return new global::sample.namespace.Models.Cat(color, {additionalPropertiesVariables} additionalBinaryDataProperties);"; + Assert.IsTrue(methodBodyString.Contains(expectedReturnStatement)); + } + else + { + Assert.IsTrue(methodBodyString.Contains("return new global::sample.namespace.Models.Cat(color, additionalProperties, additionalBinaryDataProperties);")); + } + } + + [TestCaseSource(nameof(TestBuildJsonModelWriteCoreTestCases))] + public void TestBuildJsonModelWriteCore( + InputType additionalPropsValueType) + { + var inputModel = InputFactory.Model("cat", + properties: + [ + InputFactory.Property("color", InputPrimitiveType.String, isRequired: true), + ], + additionalProperties: additionalPropsValueType); + MockHelpers.LoadMockPlugin(inputModels: () => [inputModel]); + + var model = ClientModelPlugin.Instance.TypeFactory.CreateModel(inputModel); + var serializations = model!.SerializationProviders.FirstOrDefault() as MrwSerializationTypeDefinition; + Assert.IsNotNull(serializations); + + var writeCoreMethod = serializations!.BuildJsonModelWriteCoreMethod(); + + Assert.IsNotNull(writeCoreMethod); + var methodBody = writeCoreMethod?.BodyStatements; + Assert.IsNotNull(methodBody); + + var methodBodyString = methodBody!.ToDisplayString(); + var additionalPropertiesProps = model.Properties.Where(p => p.BackingField != null && p.Name.StartsWith("Additional")).ToList(); + + // validate each additional property is serialized + foreach (var additionalProperty in additionalPropertiesProps) + { + var expectedSerializationStatement = $"foreach (var item in {additionalProperty.Name})"; + Assert.IsTrue(methodBodyString.Contains(expectedSerializationStatement)); + } + } + + public static IEnumerable TestBuildDeserializationMethodTestCases + { + get + { + // string additional properties + yield return new TestCaseData( + InputPrimitiveType.String, + new string[] { "string" }, + new string[] { "case global::System.Text.Json.JsonValueKind.String:", "additionalProperties.Add(prop.Name, prop.Value.GetString());" }); + // bool additional properties + yield return new TestCaseData( + InputPrimitiveType.Boolean, + new string[] { "bool" }, + new string[] + { + "case (global::System.Text.Json.JsonValueKind.True || global::System.Text.Json.JsonValueKind.False):", + "additionalProperties.Add(prop.Name, prop.Value.GetBoolean());" + }); + // float additional properties + yield return new TestCaseData( + InputPrimitiveType.Float32, + new string[] { "float" }, + new string[] + { + "case global::System.Text.Json.JsonValueKind.Number:", + "if (prop.Value.TryGetSingle(out float single))", + "additionalProperties.Add(prop.Name, single);" + }); + // union additional properties + yield return new TestCaseData( + new InputUnionType("union", [InputPrimitiveType.String, InputPrimitiveType.Float64]), + new string[] { "string", "double" }, + new string[] + { + "case global::System.Text.Json.JsonValueKind.String:", + "additionalProperties.Add(prop.Name, prop.Value.GetString());", + "case global::System.Text.Json.JsonValueKind.Number:", + "if (prop.Value.TryGetDouble(out double @double))", + "additionalDoubleProperties.Add(prop.Name, @double);" + }); + } + } + + public static IEnumerable TestBuildJsonModelWriteCoreTestCases + { + get + { + // string additional properties + yield return new TestCaseData(InputPrimitiveType.String); + // bool additional properties + yield return new TestCaseData(InputPrimitiveType.Boolean); + // float additional properties + yield return new TestCaseData(InputPrimitiveType.Float32); + // union additional properties + yield return new TestCaseData(new InputUnionType("union", [InputPrimitiveType.String, InputPrimitiveType.Float64])); + } + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/DiscriminatorTests.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/DiscriminatorTests.cs index afd4fc8a8d..e17d3307e1 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/DiscriminatorTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/DiscriminatorTests.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Generator.CSharp.Input; +using Microsoft.Generator.CSharp.Primitives; using Microsoft.Generator.CSharp.Providers; using Microsoft.Generator.CSharp.Statements; using Microsoft.Generator.CSharp.Tests.Common; @@ -163,9 +164,13 @@ public void DerivedShouldPassLiteralForKindToBase() var outputLibrary = ClientModelPlugin.Instance.OutputLibrary; var catModel = outputLibrary.TypeProviders.OfType().FirstOrDefault(t => t.Name == "Cat"); Assert.IsNotNull(catModel); - Assert.IsNotNull(catModel!.FullConstructor.Signature.Initializer); - Assert.IsFalse(catModel.FullConstructor.Signature.Initializer!.Arguments.Any(a => a.ToDisplayString().Contains("kind"))); - Assert.IsTrue(catModel.FullConstructor.Signature.Initializer!.Arguments.Any(a => a.ToDisplayString() == "\"cat\"")); + var publicCtor = catModel!.Constructors.FirstOrDefault(c => c.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Public)); + Assert.IsNotNull(publicCtor); + + var initializer = publicCtor!.Signature.Initializer; + Assert.IsNotNull(initializer); + Assert.IsFalse(initializer!.Arguments.Any(a => a.ToDisplayString().Contains("kind"))); + Assert.IsTrue(initializer!.Arguments.Any(a => a.ToDisplayString() == "\"cat\"")); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/JsonModelCoreTests.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/JsonModelCoreTests.cs index 5e0021982d..acef5c2518 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/JsonModelCoreTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/JsonModelCoreTests.cs @@ -82,5 +82,17 @@ public void CamelCaseSerializedName() var file = writer.Write(); Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); } + + [Test] + public void MultipleAdditionalProperties() + { + var inputModel = InputFactory.Model("TestModel", properties: [InputFactory.Property("color", InputPrimitiveType.String, isRequired: true)], + additionalProperties: new InputUnionType("union", [InputPrimitiveType.String, InputPrimitiveType.Float64])); + + var mrwProvider = new ModelProvider(inputModel).SerializationProviders.First(); + var writer = new TypeProviderWriter(mrwProvider); + var file = writer.Write(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); + } } } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/JsonModelCoreTests/MultipleAdditionalProperties.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/JsonModelCoreTests/MultipleAdditionalProperties.cs new file mode 100644 index 0000000000..d597c2b456 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/JsonModelCoreTests/MultipleAdditionalProperties.cs @@ -0,0 +1,52 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace sample.namespace.Models +{ + /// + public partial class TestModel : global::System.ClientModel.Primitives.IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(global::System.Text.Json.Utf8JsonWriter writer, global::System.ClientModel.Primitives.ModelReaderWriterOptions options) + { + string format = (options.Format == "W") ? ((global::System.ClientModel.Primitives.IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if ((format != "J")) + { + throw new global::System.FormatException($"The model {nameof(global::sample.namespace.Models.TestModel)} does not support writing '{format}' format."); + } + writer.WritePropertyName("color"u8); + writer.WriteStringValue(Color); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + foreach (var item in AdditionalDoubleProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); + } + if (((options.Format != "W") && (_additionalBinaryDataProperties != null))) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(item.Value)) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Properties/launchSettings.json b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Properties/launchSettings.json index d0daa52c4b..7bd702e732 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Properties/launchSettings.json +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Properties/launchSettings.json @@ -115,6 +115,11 @@ "commandName": "Executable", "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.Generator.CSharp.exe" }, + "http-type-property-additional-properties": { + "commandLineArgs": "$(SolutionDir)/TestProjects/CadlRanch/http/type/property/additional-properties -p StubLibraryPlugin", + "commandName": "Executable", + "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.Generator.CSharp.exe" + }, "http-type-property-nullable": { "commandLineArgs": "$(SolutionDir)/TestProjects/CadlRanch/http/type/property/nullable -p StubLibraryPlugin", "commandName": "Executable", diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Providers/ModelFactoryProvider.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Providers/ModelFactoryProvider.cs index 0dfe698ef3..14f83c1a7a 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Providers/ModelFactoryProvider.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Providers/ModelFactoryProvider.cs @@ -84,7 +84,7 @@ protected override MethodProvider[] BuildMethods() MethodSignatureModifiers.Static | MethodSignatureModifiers.Public, modelProvider.Type, $"A new {modelProvider.Type:C} instance for mocking.", - GetParameters(modelCtor, modelProvider.SupportsBinaryDataAdditionalProperties)); + GetParameters(modelProvider)); var docs = new XmlDocProvider(); docs.Summary = modelProvider.XmlDocs?.Summary; @@ -98,7 +98,7 @@ protected override MethodProvider[] BuildMethods() [ .. GetCollectionInitialization(signature), MethodBodyStatement.EmptyLine, - Return(New.Instance(typeToInstantiate.Type, [.. GetCtorArgs(signature, modelCtor.Signature, modelProvider.SupportsBinaryDataAdditionalProperties)])) + Return(New.Instance(typeToInstantiate.Type, [.. GetCtorArgs(modelProvider, signature)])) ]); methods.Add(new MethodProvider(signature, statements, this, docs)); @@ -107,31 +107,40 @@ .. GetCollectionInitialization(signature), } private static IReadOnlyList GetCtorArgs( - MethodSignature signature, - ConstructorSignature modelCtorFullSignature, - bool supportsBinaryDataAdditionalProps) + ModelProvider modelProvider, + MethodSignature factoryMethodSignature) { - var expressions = new List(signature.Parameters.Count); - for (int i = 0; i < signature.Parameters.Count; i++) + var modelCtorFullSignature = modelProvider.FullConstructor.Signature; + var expressions = new List(modelCtorFullSignature.Parameters.Count); + + for (int i = 0; i < modelCtorFullSignature.Parameters.Count; i++) { - var factoryParam = signature.Parameters[i]; var ctorParam = modelCtorFullSignature.Parameters[i]; - if (factoryParam.Type.IsList) - { - expressions.Add(factoryParam.NullConditional().ToList()); - } - else if (IsEnumDiscriminator(ctorParam)) + var factoryParam = factoryMethodSignature.Parameters.FirstOrDefault(p => p.Name.Equals(ctorParam.Name)); + if (factoryParam == null && ctorParam.Property?.IsDiscriminator == true && modelProvider.DiscriminatorValueExpression != null) { - expressions.Add(ctorParam.Type.ToEnum(factoryParam)); + expressions.Add(modelProvider.DiscriminatorValueExpression); + continue; } - else + else if (factoryParam != null) { - expressions.Add(factoryParam); + if (factoryParam.Type.IsList) + { + expressions.Add(factoryParam.NullConditional().ToList()); + } + else if (IsEnumDiscriminator(ctorParam)) + { + expressions.Add(ctorParam.Type.ToEnum(factoryParam)); + } + else + { + expressions.Add(factoryParam); + } } } - var modelContainsAdditionalRawData = modelCtorFullSignature.Parameters.Any(p => p.Name.Equals(AdditionalBinaryDataParameterName)); - if (modelContainsAdditionalRawData && !supportsBinaryDataAdditionalProps) + if (modelCtorFullSignature.Parameters.Any(p => p.Name.Equals(AdditionalBinaryDataParameterName)) && + !modelProvider.SupportsBinaryDataAdditionalProperties) { expressions.Add(Null); } @@ -152,15 +161,16 @@ private IReadOnlyList GetCollectionInitialization(MethodSig return [.. statements]; } - private static IReadOnlyList GetParameters( - ConstructorProvider modelFullConstructor, - bool supportsBinaryDataAdditionalProps) + private static IReadOnlyList GetParameters(ModelProvider modelProvider) { - var modelCtorParams = modelFullConstructor.Signature.Parameters; + var modelCtorParams = modelProvider.FullConstructor.Signature.Parameters; var parameters = new List(modelCtorParams.Count); foreach (var param in modelCtorParams) { - if (param.Name.Equals(AdditionalBinaryDataParameterName) && !supportsBinaryDataAdditionalProps) + if (param.Name.Equals(AdditionalBinaryDataParameterName) && !modelProvider.SupportsBinaryDataAdditionalProperties) + continue; + // skip discriminator parameters if the model has a discriminator value as those shouldn't be exposed in the factory methods + if (param.Property?.IsDiscriminator == true && modelProvider.DiscriminatorValue != null) continue; parameters.Add(GetModelFactoryParam(param)); diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Providers/ModelProvider.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Providers/ModelProvider.cs index 07a6dc4f3e..6eb6113810 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Providers/ModelProvider.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Providers/ModelProvider.cs @@ -18,8 +18,6 @@ namespace Microsoft.Generator.CSharp.Providers public sealed class ModelProvider : TypeProvider { private const string AdditionalBinaryDataPropsFieldDescription = "Keeps track of any properties unknown to the library."; - private const string AdditionalBinaryDataPropsFieldName = "_additionalBinaryDataProperties"; - private const string DefaultAdditionalPropertiesPropertyName = "AdditionalProperties"; private readonly InputModelType _inputModel; protected override FormattableString Description { get; } @@ -55,7 +53,8 @@ public ModelProvider(InputModelType inputModel) private IReadOnlyList BuildDerivedModels() { - var derivedModels = new List(_inputModel.DiscriminatedSubtypes.Count); + var derivedModels = new HashSet(_inputModel.DiscriminatedSubtypes.Count + _inputModel.DerivedModels.Count); + // add discriminated subtypes foreach (var subtype in _inputModel.DiscriminatedSubtypes) { var model = CodeModelPlugin.Instance.TypeFactory.CreateModel(subtype.Value); @@ -65,10 +64,20 @@ private IReadOnlyList BuildDerivedModels() } } - return derivedModels; + // add derived models + foreach (var derivedModel in _inputModel.DerivedModels) + { + var model = CodeModelPlugin.Instance.TypeFactory.CreateModel(derivedModel); + if (model != null) + { + derivedModels.Add(model); + } + } + + return [.. derivedModels]; } - private ModelProvider? BaseModelProvider + public ModelProvider? BaseModelProvider => _baseModelProvider ??= (_baseTypeProvider?.Value is ModelProvider baseModelProvider ? baseModelProvider : null); private FieldProvider? RawDataField => _rawDataField ??= BuildRawDataField(); private List AdditionalPropertyFields => _additionalPropertyFields ??= BuildAdditionalPropertyFields(); @@ -193,12 +202,12 @@ private List BuildAdditionalPropertyFields() { foreach (var unionType in valueType.UnionItemTypes) { - AddFieldForAdditionalProperties(unionType, fields); + AddFieldForAdditionalProperties(unionType, fields, true); } } else { - AddFieldForAdditionalProperties(valueType, fields); + AddFieldForAdditionalProperties(valueType, fields, false); } } } @@ -206,19 +215,22 @@ private List BuildAdditionalPropertyFields() return fields; } - private void AddFieldForAdditionalProperties(CSharpType valueType, List fields) + private void AddFieldForAdditionalProperties(CSharpType valueType, List fields, bool isUnionType) { var originalType = new CSharpType(typeof(IDictionary<,>), typeof(string), valueType); var additionalPropsType = ReplaceUnverifiableType(originalType); - if (!additionalPropsType.Equals(_additionalBinaryDataPropsFieldType)) + if ((isUnionType && additionalPropsType.ContainsBinaryData) + || additionalPropsType.Equals(_additionalBinaryDataPropsFieldType)) { - fields.Add(new FieldProvider( - FieldModifiers.Private, - additionalPropsType, - BuildAdditionalTypePropertiesFieldName(additionalPropsType.ElementType), - this)); + return; } + + fields.Add(new( + FieldModifiers.Private, + additionalPropsType, + BuildAdditionalTypePropertiesFieldName(additionalPropsType.ElementType), + this)); } private List BuildAdditionalPropertyProperties() @@ -239,9 +251,12 @@ private List BuildAdditionalPropertyProperties() null, MethodSignatureModifiers.Public, propertyType, - i == 0 ? DefaultAdditionalPropertiesPropertyName : field.Name.ToCleanName(), + i == 0 ? AdditionalPropertiesHelper.DefaultAdditionalPropertiesPropertyName : field.Name.ToCleanName(), assignment, - this)); + this) + { + BackingField = field + }); containsAdditionalTypeProperties = true; } @@ -265,7 +280,7 @@ private List BuildAdditionalPropertyProperties() if (shouldAddPropForUnionType || (!apValueType.IsUnion && additionalPropsType.Equals(_additionalBinaryDataPropsFieldType))) { var name = !containsAdditionalTypeProperties - ? DefaultAdditionalPropertiesPropertyName + ? AdditionalPropertiesHelper.DefaultAdditionalPropertiesPropertyName : RawDataField.Name.ToCleanName(); var type = !_inputModel.Usage.HasFlag(InputModelTypeUsage.Input) ? additionalPropsType.OutputType @@ -273,14 +288,17 @@ private List BuildAdditionalPropertyProperties() var assignment = type.IsReadOnlyDictionary ? new ExpressionPropertyBody(New.ReadOnlyDictionary(type.Arguments[0], type.ElementType, RawDataField)) : new ExpressionPropertyBody(RawDataField); - - properties.Add(new( + var property = new PropertyProvider( null, MethodSignatureModifiers.Public, type, name, assignment, - this)); + this) + { + BackingField = RawDataField + }; + properties.Add(property); } return properties; @@ -470,7 +488,7 @@ private ConstructorProvider BuildFullConstructor() } // construct the initializer using the parameters from base signature - var constructorInitializer = new ConstructorInitializer(true, [.. baseParameters.Select(p => GetExpression(p, overriddenProperties))]); + var constructorInitializer = new ConstructorInitializer(true, [.. baseParameters.Select(p => GetExpressionForCtor(p, overriddenProperties, isPrimaryConstructor))]); foreach (var property in Properties) { @@ -479,7 +497,10 @@ private ConstructorProvider BuildFullConstructor() constructorParameters.AddRange(_inputModel.IsUnknownDiscriminatorModel ? baseParameters - : baseParameters.Where(p => p.Property is null || (!p.Property.IsDiscriminator && !overriddenProperties.Contains(p.Property)))); + : baseParameters.Where(p => + p.Property is null + || (p.Property.IsDiscriminator && !overriddenProperties.Contains(p.Property) && !isPrimaryConstructor) + || (!p.Property.IsDiscriminator && !overriddenProperties.Contains(p.Property)))); if (!isPrimaryConstructor) { @@ -546,9 +567,11 @@ private ConstructorProvider BuildFullConstructor() } return null; } - private ValueExpression GetExpression(ParameterProvider parameter, HashSet overriddenProperties) + + private ValueExpression GetExpressionForCtor(ParameterProvider parameter, HashSet overriddenProperties, bool isPrimaryConstructor) { - if (parameter.Property is not null && parameter.Property.IsDiscriminator && _inputModel.DiscriminatorValue != null) + if (parameter.Property is not null && parameter.Property.IsDiscriminator && _inputModel.DiscriminatorValue != null && + (isPrimaryConstructor || !isPrimaryConstructor && IsUnknownDiscriminatorModel)) { return DiscriminatorValueExpression ?? throw new InvalidOperationException($"invalid discriminator {_inputModel.DiscriminatorValue}"); } @@ -644,10 +667,7 @@ private MethodBodyStatement GetPropertyInitializers( // handle additional properties foreach (var property in AdditionalPropertyProperties) { - // find the corresponding backing field for the property - var backingField = AdditionalPropertyFields.FirstOrDefault(f => f.Type.ElementType.Equals(property.Type.ElementType)) - ?? (RawDataField != null && property.Type.ElementType.Equals(RawDataField.Type.ElementType) ? RawDataField : null); - + var backingField = property.BackingField; if (backingField != null) { var assignment = isPrimaryConstructor @@ -705,7 +725,7 @@ private ValueExpression GetConversion(PropertyProvider property) modifiers: modifiers, type: _additionalBinaryDataPropsFieldType, description: FormattableStringHelpers.FromString(AdditionalBinaryDataPropsFieldDescription), - name: AdditionalBinaryDataPropsFieldName, + name: AdditionalPropertiesHelper.AdditionalBinaryDataPropsFieldName, enclosingType: this); return rawDataField; @@ -722,7 +742,7 @@ private CSharpType ReplaceUnverifiableType(CSharpType type) return type switch { _ when type.Equals(_additionalPropsUnknownType, ignoreNullable: true) => type, - _ when type.IsFrameworkType && _verifiableAdditionalPropertyTypes.Contains(type.FrameworkType) => type, + _ when type.IsFrameworkType && AdditionalPropertiesHelper.VerifiableAdditionalPropertyTypes.Contains(type.FrameworkType) => type, _ when type.IsUnion => type, _ when type.IsList => type.MakeGenericType([ReplaceUnverifiableType(type.Arguments[0])]), _ when type.IsDictionary => type.MakeGenericType([ReplaceUnverifiableType(type.Arguments[0]), ReplaceUnverifiableType(type.Arguments[1])]), @@ -742,18 +762,5 @@ private static string BuildAdditionalTypePropertiesFieldName(CSharpType addition return $"_additional{name.ToCleanName()}Properties"; } - - /// - /// The set of known verifiable additional property value types that have value kind checks during deserialization. - /// - private static readonly HashSet _verifiableAdditionalPropertyTypes = - [ - typeof(byte), typeof(byte[]), typeof(sbyte), - typeof(DateTime), typeof(DateTimeOffset), - typeof(decimal), typeof(double), typeof(short), typeof(int), typeof(long), typeof(float), - typeof(ushort), typeof(uint), typeof(ulong), - typeof(Guid), - typeof(string), typeof(bool) - ]; } } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Shared/AdditionalPropertiesHelper.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Shared/AdditionalPropertiesHelper.cs new file mode 100644 index 0000000000..b9fb8076c8 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Shared/AdditionalPropertiesHelper.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text.Json; + +namespace Microsoft.Generator.CSharp +{ + internal static class AdditionalPropertiesHelper + { + public const string AdditionalBinaryDataPropsFieldName = "_additionalBinaryDataProperties"; + public const string DefaultAdditionalPropertiesPropertyName = "AdditionalProperties"; + /// + /// The set of known verifiable additional property value types that have checks + /// during deserialization. + /// + public static readonly HashSet VerifiableAdditionalPropertyTypes = + [ + typeof(byte), typeof(byte[]), typeof(sbyte), + typeof(DateTime), typeof(DateTimeOffset), + typeof(decimal), typeof(double), typeof(short), typeof(int), typeof(long), typeof(float), + typeof(ushort), typeof(uint), typeof(ulong), + typeof(Guid), + typeof(string), typeof(bool) + ]; + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Snippets/Snippet.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Snippets/Snippet.cs index e810354127..bbe20ee222 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Snippets/Snippet.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Snippets/Snippet.cs @@ -24,6 +24,7 @@ public static partial class Snippet public static DictionaryExpression AsDictionary(this FieldProvider field, CSharpType keyType, CSharpType valueType) => new(new KeyValuePairType(keyType, valueType), field); public static DictionaryExpression AsDictionary(this ParameterProvider parameter, CSharpType keyType, CSharpType valueType) => new(new KeyValuePairType(keyType, valueType), parameter); + public static DictionaryExpression AsDictionary(this PropertyProvider property, CSharpType keyType, CSharpType valueType) => new(new KeyValuePairType(keyType, valueType), property); public static TypeOfExpression TypeOf(CSharpType type) => new TypeOfExpression(type); diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/Providers/ModelProviders/DiscriminatorTests.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/Providers/ModelProviders/DiscriminatorTests.cs index 6050982a78..903b0c22a0 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/Providers/ModelProviders/DiscriminatorTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/Providers/ModelProviders/DiscriminatorTests.cs @@ -89,35 +89,34 @@ public void BaseConstructorShouldBePrivateProtected() } [Test] - public void DerviedCtorShouldSetDiscriminator() + public void DerivedPublicCtorShouldSetDiscriminator() { MockHelpers.LoadMockPlugin(); var catModel = CodeModelPlugin.Instance.TypeFactory.CreateModel(_catModel); Assert.IsNotNull(catModel); Assert.AreEqual(2, catModel!.Constructors.Count); - foreach (var ctor in catModel.Constructors) - { - var init = ctor.Signature.Initializer; - Assert.IsNotNull(init); - var expression = init!.Arguments[0] as ScopedApi; - Assert.IsNotNull(expression); - var original = expression!.Original as LiteralExpression; - Assert.IsNotNull(original); - Assert.AreEqual("cat", original!.Literal); - } + var publicCtor = catModel.Constructors.FirstOrDefault(c => c.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Public)); + Assert.IsNotNull(publicCtor); + + var init = publicCtor!.Signature.Initializer; + Assert.IsNotNull(init); + var expression = init!.Arguments[0] as ScopedApi; + Assert.IsNotNull(expression); + var original = expression!.Original as LiteralExpression; + Assert.IsNotNull(original); + Assert.AreEqual("cat", original!.Literal); } [Test] - public void DerivedCtorShouldNotHaveKindParam() + public void DerivedPublicCtorShouldNotHaveKindParam() { MockHelpers.LoadMockPlugin(); var dogModel = CodeModelPlugin.Instance.TypeFactory.CreateModel(_dogModel); Assert.IsNotNull(dogModel); Assert.AreEqual(2, dogModel!.Constructors.Count); - foreach (var ctor in dogModel.Constructors) - { - Assert.IsFalse(ctor.Signature.Parameters.Any(p => p.Name == "kind")); - } + var publicCtor = dogModel.Constructors.FirstOrDefault(c => c.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Public)); + Assert.IsNotNull(publicCtor); + Assert.IsFalse(publicCtor!.Signature.Parameters.Any(p => p.Name == "kind")); } [Test] diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/SingleDiscriminator/SingleDiscriminatorTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/SingleDiscriminator/SingleDiscriminatorTests.cs index 7231f8e00e..95a9d60147 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/SingleDiscriminator/SingleDiscriminatorTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/SingleDiscriminator/SingleDiscriminatorTests.cs @@ -51,7 +51,7 @@ public Task GetRecursiveModel() => Test(async (host) => [CadlRanchTest] public Task PutRecursiveModel() => Test(async (host) => { - var body = new Eagle(new[] { new SeaGull(2) }, new Dictionary { { "key3", new Sparrow(1) } }, new Goose(2), 5, null); + var body = new Eagle(new[] { new SeaGull(2) }, new Dictionary { { "key3", new Sparrow(1) } }, new Goose(2), "eagle", 5, null); var response = await new SingleDiscriminatorClient(host, null).PutRecursiveModelAsync(body); Assert.AreEqual(204, response.GetRawResponse().Status); }); diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/AdditionalPropertiesTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/AdditionalPropertiesTests.cs new file mode 100644 index 0000000000..a89756e198 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/AdditionalPropertiesTests.cs @@ -0,0 +1,895 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + + +using NUnit.Framework; +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; +using _Type.Property.AdditionalProperties; + +namespace TestProjects.CadlRanch.Tests.Http._Type.Property.AdditionalProperties +{ + internal class AdditionalPropertiesTests : CadlRanchTestBase + { + [CadlRanchTest] + public Task ExtendsFloatGet() => Test(async (host) => + { + var client = new AdditionalPropertiesClient(host, null); + var response = await client.GetExtendsFloatClient().GetAsync(); + var value = response.Value; + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual(43.125f, value.Id); + CollectionAssert.AreEquivalent(new Dictionary + { + ["prop"] = 43.125f, + }, value.AdditionalProperties); + }); + + [CadlRanchTest] + public Task ExtendsFloatPut() => Test(async (host) => + { + var value = new ExtendsFloatAdditionalProperties(43.125f) + { + AdditionalProperties = + { + ["prop"] = 43.125f + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetExtendsFloatClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task IsFloatGet() => Test(async (host) => + { + var response = await new AdditionalPropertiesClient(host, null).GetIsFloatClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + var value = response.Value; + Assert.AreEqual(43.125f, value.Id); + CollectionAssert.AreEquivalent(new Dictionary + { + ["prop"] = 43.125f, + }, value.AdditionalProperties); + }); + + [CadlRanchTest] + public Task IsFloatPut() => Test(async (host) => + { + var value = new IsFloatAdditionalProperties(43.125f) + { + AdditionalProperties = + { + ["prop"] = 43.125f + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetIsFloatClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task ExtendsModelGet() => Test(async (host) => + { + var response = await new AdditionalPropertiesClient(host, null).GetExtendsModelClient().GetAsync(); + var value = response.Value; + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual(1, value.AdditionalProperties.Count); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop")); + var model = ModelReaderWriter.Read(value.AdditionalProperties["prop"]); + Assert.AreEqual("ok", model!.State); + }); + + [CadlRanchTest] + public Task ExtendsModelPut() => Test(async (host) => + { + var value = new ExtendsModelAdditionalProperties(new ModelForRecord("ok")) + { + AdditionalProperties = + { + ["prop"] = ModelReaderWriter.Write(new ModelForRecord("ok")) + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetExtendsModelClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task IsModelGet() => Test(async (host) => + { + var response = await new AdditionalPropertiesClient(host, null).GetIsModelClient().GetAsync(); + var value = response.Value; + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual(1, value.AdditionalProperties.Count); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop")); + var model = ModelReaderWriter.Read(value.AdditionalProperties["prop"]); + Assert.AreEqual("ok", model!.State); + }); + + [CadlRanchTest] + public Task IsModelPut() => Test(async (host) => + { + var value = new IsModelAdditionalProperties(new ModelForRecord("ok")) + { + AdditionalProperties = + { + ["prop"] = ModelReaderWriter.Write(new ModelForRecord("ok")) + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetIsModelClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task ExtendsModelArrayGet() => Test(async (host) => + { + var response = await new AdditionalPropertiesClient(host, null).GetExtendsModelArrayClient().GetAsync(); + var value = response.Value; + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual(1, value.AdditionalProperties.Count); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop")); + var prop = value.AdditionalProperties["prop"].Select(item => ModelReaderWriter.Read(item)).ToList(); + Assert.AreEqual(2, prop.Count); + Assert.AreEqual("ok", prop[0]!.State); + Assert.AreEqual("ok", prop[1]!.State); + }); + + [CadlRanchTest] + public Task IsModelArrayPut() => Test(async (host) => + { + var value = new IsModelArrayAdditionalProperties(new[] { new ModelForRecord("ok"), new ModelForRecord("ok") }) + { + AdditionalProperties = + { + ["prop"] = new[] + { + ModelReaderWriter.Write(new ModelForRecord("ok")), + ModelReaderWriter.Write(new ModelForRecord("ok")) + } + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetIsModelArrayClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task ExtendsStringGet() => Test(async (host) => + { + var response = await new AdditionalPropertiesClient(host, null).GetExtendsStringClient().GetAsync(); + var value = response.Value; + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("ExtendsStringAdditionalProperties", value.Name); + CollectionAssert.AreEquivalent(new Dictionary + { + ["prop"] = "abc" + }, value.AdditionalProperties); + }); + + [CadlRanchTest] + public Task ExtendsStringPut() => Test(async (host) => + { + var value = new ExtendsStringAdditionalProperties("ExtendsStringAdditionalProperties") + { + AdditionalProperties = + { + ["prop"] = "abc" + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetExtendsStringClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task IsStringGet() => Test(async (host) => + { + var response = await new AdditionalPropertiesClient(host, null).GetIsStringClient().GetAsync(); + var value = response.Value; + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("IsStringAdditionalProperties", value.Name); + CollectionAssert.AreEquivalent(new Dictionary + { + ["prop"] = "abc" + }, value.AdditionalProperties); + }); + + [CadlRanchTest] + public Task IsStringPut() => Test(async (host) => + { + var value = new IsStringAdditionalProperties("IsStringAdditionalProperties") + { + AdditionalProperties = + { + ["prop"] = "abc" + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetIsStringClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task ExtendsUnknownGet() => Test(async (host) => + { + var response = await new AdditionalPropertiesClient(host, null).GetExtendsUnknownClient().GetAsync(); + var value = response.Value; + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("ExtendsUnknownAdditionalProperties", value.Name); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop1")); + Assert.AreEqual(32, value.AdditionalProperties["prop1"].ToObjectFromJson()); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop2")); + Assert.AreEqual(true, value.AdditionalProperties["prop2"].ToObjectFromJson()); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop3")); + Assert.AreEqual("abc", value.AdditionalProperties["prop3"].ToObjectFromJson()); + }); + + [CadlRanchTest] + public Task ExtendsUnknownPut() => Test(async (host) => + { + var value = new ExtendsUnknownAdditionalProperties("ExtendsUnknownAdditionalProperties") + { + AdditionalProperties = + { + ["prop1"] = BinaryData.FromObjectAsJson(32), + ["prop2"] = BinaryData.FromObjectAsJson(true), + ["prop3"] = BinaryData.FromObjectAsJson("abc") + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetExtendsUnknownClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task ExtendsUnknownDerivedGet() => Test(async (host) => + { + var response = await new AdditionalPropertiesClient(host, null).GetExtendsUnknownDerivedClient().GetAsync(); + var value = response.Value; + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("ExtendsUnknownAdditionalProperties", value.Name); + Assert.AreEqual(314, value.Index); + Assert.AreEqual(2.71875f, value.Age); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop1")); + Assert.AreEqual(32, value.AdditionalProperties["prop1"].ToObjectFromJson()); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop2")); + Assert.AreEqual(true, value.AdditionalProperties["prop2"].ToObjectFromJson()); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop3")); + Assert.AreEqual("abc", value.AdditionalProperties["prop3"].ToObjectFromJson()); + }); + + [CadlRanchTest] + public Task ExtendsUnknownDerivedPut() => Test(async (host) => + { + var value = new ExtendsUnknownAdditionalPropertiesDerived(314, "ExtendsUnknownAdditionalProperties") + { + Age = 2.71875f, + AdditionalProperties = + { + ["prop1"] = BinaryData.FromObjectAsJson(32), + ["prop2"] = BinaryData.FromObjectAsJson(true), + ["prop3"] = BinaryData.FromObjectAsJson("abc") + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetExtendsUnknownDerivedClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task ExtendsUnknownDiscriminatedGet() => Test(async (host) => + { + var response = await new AdditionalPropertiesClient(host, null).GetExtendsUnknownDiscriminatedClient().GetAsync(); + var value = response.Value; + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("Derived", value.Name); + Assert.AreEqual("derived", value.Kind); + var derived = value as ExtendsUnknownAdditionalPropertiesDiscriminatedDerived; + Assert.IsNotNull(derived); + Assert.AreEqual(314, derived!.Index); + Assert.AreEqual(2.71875f, derived.Age); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop1")); + Assert.AreEqual(32, value.AdditionalProperties["prop1"].ToObjectFromJson()); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop2")); + Assert.AreEqual(true, value.AdditionalProperties["prop2"].ToObjectFromJson()); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop3")); + Assert.AreEqual("abc", value.AdditionalProperties["prop3"].ToObjectFromJson()); + }); + + [CadlRanchTest] + public Task ExtendsUnknownDiscriminatedPut() => Test(async (host) => + { + var value = new ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(314, "Derived") + { + Age = 2.71875f, + AdditionalProperties = + { + ["prop1"] = BinaryData.FromObjectAsJson(32), + ["prop2"] = BinaryData.FromObjectAsJson(true), + ["prop3"] = BinaryData.FromObjectAsJson("abc") + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetExtendsUnknownDiscriminatedClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task IsUnknownGet() => Test(async (host) => + { + var response = await new AdditionalPropertiesClient(host, null).GetIsUnknownClient().GetAsync(); + var value = response.Value; + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("IsUnknownAdditionalProperties", value.Name); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop1")); + Assert.AreEqual(32, value.AdditionalProperties["prop1"].ToObjectFromJson()); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop2")); + Assert.AreEqual(true, value.AdditionalProperties["prop2"].ToObjectFromJson()); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop3")); + Assert.AreEqual("abc", value.AdditionalProperties["prop3"].ToObjectFromJson()); + }); + + [CadlRanchTest] + public Task IsUnknownPut() => Test(async (host) => + { + var value = new IsUnknownAdditionalProperties("IsUnknownAdditionalProperties") + { + AdditionalProperties = + { + ["prop1"] = BinaryData.FromObjectAsJson(32), + ["prop2"] = BinaryData.FromObjectAsJson(true), + ["prop3"] = BinaryData.FromObjectAsJson("abc") + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetIsUnknownClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task IsUnknownDerivedGet() => Test(async (host) => + { + var response = await new AdditionalPropertiesClient(host, null).GetIsUnknownDerivedClient().GetAsync(); + var value = response.Value; + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("IsUnknownAdditionalProperties", value.Name); + Assert.AreEqual(314, value.Index); + Assert.AreEqual(2.71875f, value.Age); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop1")); + Assert.AreEqual(32, value.AdditionalProperties["prop1"].ToObjectFromJson()); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop2")); + Assert.AreEqual(true, value.AdditionalProperties["prop2"].ToObjectFromJson()); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop3")); + Assert.AreEqual("abc", value.AdditionalProperties["prop3"].ToObjectFromJson()); + }); + + [CadlRanchTest] + public Task IsUnknownDerivedPut() => Test(async (host) => + { + var value = new IsUnknownAdditionalPropertiesDerived(314, "IsUnknownAdditionalProperties") + { + Age = 2.71875f, + AdditionalProperties = + { + ["prop1"] = BinaryData.FromObjectAsJson(32), + ["prop2"] = BinaryData.FromObjectAsJson(true), + ["prop3"] = BinaryData.FromObjectAsJson("abc") + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetIsUnknownDerivedClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task IsUnknownDiscriminatedGet() => Test(async (host) => + { + var response = await new AdditionalPropertiesClient(host, null).GetIsUnknownDiscriminatedClient().GetAsync(); + var value = response.Value; + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("Derived", value.Name); + Assert.AreEqual("derived", value.Kind); + var derived = value as IsUnknownAdditionalPropertiesDiscriminatedDerived; + Assert.IsNotNull(derived); + Assert.AreEqual(314, derived!.Index); + Assert.AreEqual(2.71875f, derived.Age); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop1")); + Assert.AreEqual(32, value.AdditionalProperties["prop1"].ToObjectFromJson()); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop2")); + Assert.AreEqual(true, value.AdditionalProperties["prop2"].ToObjectFromJson()); + Assert.IsTrue(value.AdditionalProperties.ContainsKey("prop3")); + Assert.AreEqual("abc", value.AdditionalProperties["prop3"].ToObjectFromJson()); + }); + + [CadlRanchTest] + public Task IsUnknownDiscriminatedPut() => Test(async (host) => + { + var value = new IsUnknownAdditionalPropertiesDiscriminatedDerived(314, "Derived") + { + Age = 2.71875f, + AdditionalProperties = + { + ["prop1"] = BinaryData.FromObjectAsJson(32), + ["prop2"] = BinaryData.FromObjectAsJson(true), + ["prop3"] = BinaryData.FromObjectAsJson("abc") + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetIsUnknownDiscriminatedClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task ExtendsDifferentSpreadFloatGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetExtendsDifferentSpreadFloatClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("abc", response.Value.Name); + Assert.AreEqual(43.125f, response.Value.DerivedProp); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + Assert.AreEqual(43.125f, response.Value.AdditionalProperties["prop"]); + }); + + [CadlRanchTest] + public Task ExtendsDifferentSpreadFloatPut() => Test(async host => + { + var value = new DifferentSpreadFloatDerived(43.125f, "abc") + { + AdditionalProperties = + { + ["prop"] = 43.125f + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetExtendsDifferentSpreadFloatClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task ExtendsDifferentSpreadModelGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetExtendsDifferentSpreadModelClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("abc", response.Value.KnownProp); + Assert.IsNotNull(response.Value.DerivedProp); + Assert.AreEqual("ok", response.Value.DerivedProp.State); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + var prop = ModelReaderWriter.Read(response.Value.AdditionalProperties["prop"]); + Assert.AreEqual("ok", prop!.State); + }); + + [CadlRanchTest] + public Task ExtendsDifferentSpreadModelPut() => Test(async host => + { + var value = new DifferentSpreadModelDerived(new ModelForRecord("ok"), "abc") + { + AdditionalProperties = + { + ["prop"] = ModelReaderWriter.Write(new ModelForRecord("ok")) + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetExtendsDifferentSpreadModelClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task ExtendsDifferentSpreadModelArrayGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetExtendsDifferentSpreadModelArrayClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("abc", response.Value.KnownProp); + Assert.AreEqual(2, response.Value.DerivedProp.Count); + Assert.AreEqual("ok", response.Value.DerivedProp[0].State); + Assert.AreEqual("ok", response.Value.DerivedProp[1].State); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + var list = response.Value.AdditionalProperties["prop"]; + Assert.AreEqual(2, list.Count); + var prop1 = ModelReaderWriter.Read(list[0]); + Assert.AreEqual("ok", prop1!.State); + var prop2 = ModelReaderWriter.Read(list[1]); + Assert.AreEqual("ok", prop2!.State); + }); + + [CadlRanchTest] + public Task ExtendsDifferentSpreadModelArrayPut() => Test(async host => + { + var value = new DifferentSpreadModelArrayDerived(new[] { new ModelForRecord("ok"), new ModelForRecord("ok") }, "abc") + { + AdditionalProperties = + { + ["prop"] = new[] { ModelReaderWriter.Write(new ModelForRecord("ok")), ModelReaderWriter.Write(new ModelForRecord("ok")) } + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetExtendsDifferentSpreadModelArrayClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task ExtendsDifferentSpreadStringGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetExtendsDifferentSpreadStringClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual(43.125f, response.Value.Id); + Assert.AreEqual("abc", response.Value.DerivedProp); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + Assert.AreEqual("abc", response.Value.AdditionalProperties["prop"]); + }); + + [CadlRanchTest] + public Task ExtendsDifferentSpreadStringPut() => Test(async host => + { + var value = new DifferentSpreadStringDerived("abc", 43.125f) + { + AdditionalProperties = + { + ["prop"] = "abc" + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetExtendsDifferentSpreadStringClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task MultipleSpreadGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetMultipleSpreadClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.IsTrue(response.Value.Flag); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + Assert.AreEqual(1, response.Value.AdditionalSingleProperties.Count); + Assert.AreEqual("abc", response.Value.AdditionalProperties["prop1"]); + Assert.AreEqual(43.125f, response.Value.AdditionalSingleProperties["prop2"]); + }); + + [CadlRanchTest] + public Task MultipleSpreadPut() => Test(async host => + { + var value = new MultipleSpreadRecord(true) + { + AdditionalProperties = + { + ["prop1"] = "abc" + }, + AdditionalSingleProperties = + { + ["prop2"] = 43.125f + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetMultipleSpreadClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task SpreadDifferentFloatGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetSpreadDifferentFloatClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("abc", response.Value.Name); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + Assert.AreEqual(43.125f, response.Value.AdditionalProperties["prop"]); + }); + + [CadlRanchTest] + public Task SpreadDifferentFloatPut() => Test(async host => + { + var value = new DifferentSpreadFloatRecord("abc") + { + AdditionalProperties = + { + ["prop"] = 43.125f + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetSpreadDifferentFloatClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task SpreadDifferentModelGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetSpreadDifferentModelClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("abc", response.Value.KnownProp); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + var model = ModelReaderWriter.Read(response.Value.AdditionalProperties["prop"]); + Assert.AreEqual("ok", model!.State); + }); + + [CadlRanchTest] + public Task SpreadDifferentModelPut() => Test(async host => + { + var value = new DifferentSpreadModelRecord("abc") + { + AdditionalProperties = + { + ["prop"] = ModelReaderWriter.Write(new ModelForRecord("ok")) + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetSpreadDifferentModelClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task SpreadDifferentModelArrayGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetSpreadDifferentModelArrayClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("abc", response.Value.KnownProp); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + var list = response.Value.AdditionalProperties["prop"]; + Assert.AreEqual(2, list.Count); + var first = ModelReaderWriter.Read(list[0]); + var second = ModelReaderWriter.Read(list[1]); + Assert.AreEqual("ok", first!.State); + Assert.AreEqual("ok", second!.State); + }); + + [CadlRanchTest] + public Task SpreadDifferentModelArrayPut() => Test(async host => + { + var value = new DifferentSpreadModelArrayRecord("abc") + { + AdditionalProperties = + { + ["prop"] = new[] + { + ModelReaderWriter.Write(new ModelForRecord("ok")), + ModelReaderWriter.Write(new ModelForRecord("ok")) + } + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetSpreadDifferentModelArrayClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task SpreadDifferentStringGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetSpreadDifferentStringClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual(43.125f, response.Value.Id); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + Assert.AreEqual("abc", response.Value.AdditionalProperties["prop"]); + }); + + [CadlRanchTest] + public Task SpreadDifferentStringPut() => Test(async host => + { + var value = new DifferentSpreadStringRecord(43.125f) + { + AdditionalProperties = + { + ["prop"] = "abc" + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetSpreadDifferentStringClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task SpreadFloatGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetSpreadFloatClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual(43.125f, response.Value.Id); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + Assert.AreEqual(43.125f, response.Value.AdditionalProperties["prop"]); + }); + + [CadlRanchTest] + public Task SpreadFloatPut() => Test(async host => + { + var value = new SpreadFloatRecord(43.125f) + { + AdditionalProperties = + { + ["prop"] = 43.125f + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetSpreadFloatClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task SpreadModelGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetSpreadModelClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("ok", response.Value.KnownProp.State); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + var model = ModelReaderWriter.Read(response.Value.AdditionalProperties["prop"]); + Assert.AreEqual("ok", model!.State); + }); + + [CadlRanchTest] + public Task SpreadModelPut() => Test(async host => + { + var value = new SpreadModelRecord(new ModelForRecord("ok")) + { + AdditionalProperties = + { + ["prop"] = ModelReaderWriter.Write(new ModelForRecord("ok")) + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetSpreadModelClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task SpreadModelArrayGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetSpreadModelArrayClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual(2, response.Value.KnownProp.Count); + Assert.AreEqual("ok", response.Value.KnownProp[0].State); + Assert.AreEqual("ok", response.Value.KnownProp[1].State); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + var list = response.Value.AdditionalProperties["prop"]; + Assert.AreEqual(2, list.Count); + var first = ModelReaderWriter.Read(list[0]); + var second = ModelReaderWriter.Read(list[1]); + Assert.AreEqual("ok", first!.State); + Assert.AreEqual("ok", second!.State); + }); + + [CadlRanchTest] + public Task SpreadModelArrayPut() => Test(async host => + { + var value = new SpreadModelArrayRecord(new[] { new ModelForRecord("ok"), new ModelForRecord("ok") }) + { + AdditionalProperties = + { + ["prop"] = new[] + { + ModelReaderWriter.Write(new ModelForRecord("ok")), + ModelReaderWriter.Write(new ModelForRecord("ok")) + } + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetSpreadModelArrayClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task SpreadRecordDiscriminatedUnionGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetSpreadRecordDiscriminatedUnionClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("abc", response.Value.Name); + Assert.AreEqual(2, response.Value.AdditionalProperties.Count); + var prop1 = ModelReaderWriter.Read(response.Value.AdditionalProperties["prop1"]); + Assert.AreEqual("abc", prop1!.FooProp); + var prop2 = ModelReaderWriter.Read(response.Value.AdditionalProperties["prop2"]); + Assert.AreEqual(new DateTimeOffset(2021, 1, 1, 0, 0, 0, TimeSpan.Zero), prop2!.Start); + Assert.AreEqual(new DateTimeOffset(2021, 1, 2, 0, 0, 0, TimeSpan.Zero), prop2.End); + }); + + [CadlRanchTest] + public Task SpreadRecordDiscriminatedUnionPut() => Test(async host => + { + var value = new SpreadRecordForDiscriminatedUnion("abc") + { + AdditionalProperties = + { + ["prop1"] = ModelReaderWriter.Write(new WidgetData0("abc")), + ["prop2"] = ModelReaderWriter.Write(new WidgetData1(new DateTimeOffset(2021, 1, 1, 0, 0, 0, TimeSpan.Zero)) + { + End = new DateTimeOffset(2021, 1, 2, 0, 0, 0, TimeSpan.Zero) + }) + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetSpreadRecordDiscriminatedUnionClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task SpreadRecordNonDiscriminatedUnionGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetSpreadRecordNonDiscriminatedUnionClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("abc", response.Value.Name); + Assert.AreEqual(2, response.Value.AdditionalProperties.Count); + var prop1 = ModelReaderWriter.Read(response.Value.AdditionalProperties["prop1"]); + Assert.AreEqual("abc", prop1!.FooProp); + var prop2 = ModelReaderWriter.Read(response.Value.AdditionalProperties["prop2"]); + Assert.AreEqual(new DateTimeOffset(2021, 1, 1, 0, 0, 0, TimeSpan.Zero), prop2!.Start); + Assert.AreEqual(new DateTimeOffset(2021, 1, 2, 0, 0, 0, TimeSpan.Zero), prop2.End); + }); + + [CadlRanchTest] + public Task SpreadRecordNonDiscriminatedUnionPut() => Test(async host => + { + var value = new SpreadRecordForNonDiscriminatedUnion("abc") + { + AdditionalProperties = + { + ["prop1"] = ModelReaderWriter.Write(new WidgetData0("abc")), + ["prop2"] = ModelReaderWriter.Write(new WidgetData1(new DateTimeOffset(2021, 1, 1, 0, 0, 0, TimeSpan.Zero)) + { + End = new DateTimeOffset(2021, 1, 2, 0, 0, 0, TimeSpan.Zero) + }) + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetSpreadRecordNonDiscriminatedUnionClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task SpreadRecordNonDiscriminatedUnion2Get() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetSpreadRecordNonDiscriminatedUnion2Client().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("abc", response.Value.Name); + Assert.AreEqual(2, response.Value.AdditionalProperties.Count); + var prop1 = ModelReaderWriter.Read(response.Value.AdditionalProperties["prop1"]); + Assert.AreEqual("2021-01-01T00:00:00Z", prop1!.Start); + var prop2 = ModelReaderWriter.Read(response.Value.AdditionalProperties["prop2"]); + Assert.AreEqual(new DateTimeOffset(2021, 1, 1, 0, 0, 0, TimeSpan.Zero), prop2!.Start); + Assert.AreEqual(new DateTimeOffset(2021, 1, 2, 0, 0, 0, TimeSpan.Zero), prop2.End); + }); + + [CadlRanchTest] + public Task SpreadRecordNonDiscriminatedUnion2Put() => Test(async host => + { + var value = new SpreadRecordForNonDiscriminatedUnion2("abc") + { + AdditionalProperties = + { + ["prop1"] = ModelReaderWriter.Write(new WidgetData2("2021-01-01T00:00:00Z")), + ["prop2"] = ModelReaderWriter.Write(new WidgetData1(new DateTimeOffset(2021, 1, 1, 0, 0, 0, TimeSpan.Zero)) + { + End = new DateTimeOffset(2021, 1, 2, 0, 0, 0, TimeSpan.Zero) + }) + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetSpreadRecordNonDiscriminatedUnion2Client().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task SpreadRecordUnionGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetSpreadRecordUnionClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.IsTrue(response.Value.Flag); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + Assert.AreEqual(1, response.Value.AdditionalSingleProperties.Count); + Assert.AreEqual("abc", response.Value.AdditionalProperties["prop1"]); + Assert.AreEqual(43.125f, response.Value.AdditionalSingleProperties["prop2"]); + }); + + [CadlRanchTest] + public Task SpreadRecordUnionPut() => Test(async host => + { + var value = new SpreadRecordForUnion(true) + { + AdditionalProperties = + { + ["prop1"] = "abc", + }, + AdditionalSingleProperties = + { + ["prop2"] = 43.125f + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetSpreadRecordUnionClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task SpreadStringGet() => Test(async host => + { + var response = await new AdditionalPropertiesClient(host, null).GetSpreadStringClient().GetAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("SpreadSpringRecord", response.Value.Name); + Assert.AreEqual(1, response.Value.AdditionalProperties.Count); + Assert.AreEqual("abc", response.Value.AdditionalProperties["prop"]); + }); + + [CadlRanchTest] + public Task SpreadStringPut() => Test(async host => + { + var value = new SpreadStringRecord("SpreadSpringRecord") + { + AdditionalProperties = + { + ["prop"] = "abc" + } + }; + var response = await new AdditionalPropertiesClient(host, null).GetSpreadStringClient().PutAsync(value); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/DifferentSpreadStringDerivedTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/DifferentSpreadStringDerivedTests.cs new file mode 100644 index 0000000000..94c570f854 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/DifferentSpreadStringDerivedTests.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel; +using System.IO; +using _Type.Property.AdditionalProperties.Models; +using Microsoft.Generator.CSharp.Tests.Common; +using NUnit.Framework; +using TestProjects.CadlRanch.Tests.Infrastructure; + +namespace TestProjects.CadlRanch.Tests.Http._Type.Property.AdditionalProperties +{ + internal class DifferentSpreadStringDerivedTests : CadlRanchModelJsonTests + { + protected override string JsonPayload => File.ReadAllText(ModelTestHelper.GetLocation("TestData/DifferentSpreadStringDerived/Derived.json")); + + protected override string WirePayload => File.ReadAllText(ModelTestHelper.GetLocation("TestData/DifferentSpreadStringDerived/DerivedWire.json")); + + protected override void CompareModels(DifferentSpreadStringDerived model, DifferentSpreadStringDerived model2, string format) + { + Assert.AreEqual(model.Id, model2.Id); + Assert.AreEqual(model.DerivedProp, model2.DerivedProp); + var modelAdditionalProperties = model.AdditionalProperties; + var model2AdditionalProperties = model2.AdditionalProperties; + Assert.AreEqual(modelAdditionalProperties.Count, model2AdditionalProperties.Count); + foreach (var key in modelAdditionalProperties.Keys) + { + Assert.AreEqual(modelAdditionalProperties[key], model2AdditionalProperties[key]); + } + } + + protected override BinaryContent ToBinaryContent(DifferentSpreadStringDerived model) => model; + + protected override DifferentSpreadStringDerived ToModel(ClientResult result) => (DifferentSpreadStringDerived)result; + + protected override void VerifyModel(DifferentSpreadStringDerived model, string format) + { + Assert.AreEqual(5.5, model.Id); + Assert.AreEqual("derived value", model.DerivedProp); + Assert.AreEqual(1, model.AdditionalProperties.Count); + Assert.AreEqual("foo", model.AdditionalProperties["extra"]); + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/MultipleSpreadRecordTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/MultipleSpreadRecordTests.cs new file mode 100644 index 0000000000..d90ec87c10 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/MultipleSpreadRecordTests.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel; +using System.IO; +using _Type.Property.AdditionalProperties.Models; +using Microsoft.Generator.CSharp.Tests.Common; +using NUnit.Framework; +using TestProjects.CadlRanch.Tests.Infrastructure; + +namespace TestProjects.CadlRanch.Tests.Http._Type.Property.AdditionalProperties +{ + internal class MultipleSpreadRecordTests : CadlRanchModelJsonTests + { + protected override string JsonPayload => File.ReadAllText(ModelTestHelper.GetLocation("TestData/MultipleSpreadRecord/MultipleSpreadRecord.json")); + + protected override string WirePayload => File.ReadAllText(ModelTestHelper.GetLocation("TestData/MultipleSpreadRecord/MultipleSpreadRecordWire.json")); + + protected override void CompareModels(MultipleSpreadRecord model, MultipleSpreadRecord model2, string format) + { + Assert.AreEqual(model.Flag, model2.Flag); + var modelAdditionalProperties = model.AdditionalProperties; + var model2AdditionalProperties = model2.AdditionalProperties; + Assert.AreEqual(modelAdditionalProperties.Count, model2AdditionalProperties.Count); + foreach (var key in modelAdditionalProperties.Keys) + { + Assert.AreEqual(modelAdditionalProperties[key], model2AdditionalProperties[key]); + } + + var modelAdditionalSingleProperties = model.AdditionalSingleProperties; + var model2AdditionalSingleProperties = model2.AdditionalSingleProperties; + Assert.AreEqual(modelAdditionalSingleProperties.Count, model2AdditionalSingleProperties.Count); + foreach (var key in modelAdditionalSingleProperties.Keys) + { + Assert.AreEqual(modelAdditionalSingleProperties[key], model2AdditionalSingleProperties[key]); + } + } + + protected override BinaryContent ToBinaryContent(MultipleSpreadRecord model) => model; + + protected override MultipleSpreadRecord ToModel(ClientResult result) => (MultipleSpreadRecord)result; + + protected override void VerifyModel(MultipleSpreadRecord model, string format) + { + Assert.AreEqual(true, model.Flag); + Assert.AreEqual(1, model.AdditionalProperties.Count); + Assert.AreEqual("foo", model.AdditionalProperties["extra"]); + Assert.AreEqual(1, model.AdditionalSingleProperties.Count); + Assert.AreEqual(42.2F, model.AdditionalSingleProperties["extraFloat"]); + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/DifferentSpreadStringDerived/Derived.json b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/DifferentSpreadStringDerived/Derived.json new file mode 100644 index 0000000000..69911aa85d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/DifferentSpreadStringDerived/Derived.json @@ -0,0 +1,5 @@ +{ + "id": 5.5, + "derivedProp": "derived value", + "extra": "foo" +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/DifferentSpreadStringDerived/DerivedWire.json b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/DifferentSpreadStringDerived/DerivedWire.json new file mode 100644 index 0000000000..69911aa85d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/DifferentSpreadStringDerived/DerivedWire.json @@ -0,0 +1,5 @@ +{ + "id": 5.5, + "derivedProp": "derived value", + "extra": "foo" +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/MultipleSpreadRecord/MultipleSpreadRecord.json b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/MultipleSpreadRecord/MultipleSpreadRecord.json new file mode 100644 index 0000000000..7aee2bb61c --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/MultipleSpreadRecord/MultipleSpreadRecord.json @@ -0,0 +1,5 @@ +{ + "flag": true, + "extra": "foo", + "extraFloat": 42.2 +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/MultipleSpreadRecord/MultipleSpreadRecordWire.json b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/MultipleSpreadRecord/MultipleSpreadRecordWire.json new file mode 100644 index 0000000000..7aee2bb61c --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/TestData/MultipleSpreadRecord/MultipleSpreadRecordWire.json @@ -0,0 +1,5 @@ +{ + "flag": true, + "extra": "foo", + "extraFloat": 42.2 +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/enum-discriminator/src/Generated/Models/Cobra.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/enum-discriminator/src/Generated/Models/Cobra.cs index 208d53b8af..b104505392 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/enum-discriminator/src/Generated/Models/Cobra.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/enum-discriminator/src/Generated/Models/Cobra.cs @@ -11,6 +11,6 @@ public partial class Cobra : Snake { public Cobra(int length) : base(SnakeKind.Cobra, length) => throw null; - internal Cobra(int length, IDictionary additionalBinaryDataProperties) : base(SnakeKind.Cobra, length, additionalBinaryDataProperties) => throw null; + internal Cobra(SnakeKind kind, int length, IDictionary additionalBinaryDataProperties) : base(kind, length, additionalBinaryDataProperties) => throw null; } } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/enum-discriminator/src/Generated/Models/Golden.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/enum-discriminator/src/Generated/Models/Golden.cs index a48744fb67..476e7ca2ca 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/enum-discriminator/src/Generated/Models/Golden.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/enum-discriminator/src/Generated/Models/Golden.cs @@ -11,6 +11,6 @@ public partial class Golden : Dog { public Golden(int weight) : base(DogKind.Golden, weight) => throw null; - internal Golden(int weight, IDictionary additionalBinaryDataProperties) : base(DogKind.Golden, weight, additionalBinaryDataProperties) => throw null; + internal Golden(DogKind kind, int weight, IDictionary additionalBinaryDataProperties) : base(kind, weight, additionalBinaryDataProperties) => throw null; } } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/Eagle.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/Eagle.cs index 18f34d05b9..01058d2f62 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/Eagle.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/Eagle.cs @@ -11,7 +11,7 @@ public partial class Eagle : Bird { public Eagle(int wingspan) : base("eagle", wingspan) => throw null; - internal Eagle(IList friends, IDictionary hate, Bird partner, int wingspan, IDictionary additionalBinaryDataProperties) : base("eagle", wingspan, additionalBinaryDataProperties) => throw null; + internal Eagle(IList friends, IDictionary hate, Bird partner, string kind, int wingspan, IDictionary additionalBinaryDataProperties) : base(kind, wingspan, additionalBinaryDataProperties) => throw null; public IList Friends => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/Goose.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/Goose.cs index be30950ea1..b7566c1c5a 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/Goose.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/Goose.cs @@ -11,6 +11,6 @@ public partial class Goose : Bird { public Goose(int wingspan) : base("goose", wingspan) => throw null; - internal Goose(int wingspan, IDictionary additionalBinaryDataProperties) : base("goose", wingspan, additionalBinaryDataProperties) => throw null; + internal Goose(string kind, int wingspan, IDictionary additionalBinaryDataProperties) : base(kind, wingspan, additionalBinaryDataProperties) => throw null; } } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/SeaGull.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/SeaGull.cs index b6a21dbe3a..e1ea514da5 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/SeaGull.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/SeaGull.cs @@ -11,6 +11,6 @@ public partial class SeaGull : Bird { public SeaGull(int wingspan) : base("seagull", wingspan) => throw null; - internal SeaGull(int wingspan, IDictionary additionalBinaryDataProperties) : base("seagull", wingspan, additionalBinaryDataProperties) => throw null; + internal SeaGull(string kind, int wingspan, IDictionary additionalBinaryDataProperties) : base(kind, wingspan, additionalBinaryDataProperties) => throw null; } } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/Sparrow.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/Sparrow.cs index 54aadfefbc..d390daf44e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/Sparrow.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/Sparrow.cs @@ -11,6 +11,6 @@ public partial class Sparrow : Bird { public Sparrow(int wingspan) : base("sparrow", wingspan) => throw null; - internal Sparrow(int wingspan, IDictionary additionalBinaryDataProperties) : base("sparrow", wingspan, additionalBinaryDataProperties) => throw null; + internal Sparrow(string kind, int wingspan, IDictionary additionalBinaryDataProperties) : base(kind, wingspan, additionalBinaryDataProperties) => throw null; } } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.cs index 9637050a9a..d3c45304c4 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.cs @@ -11,6 +11,6 @@ public partial class TRex : Dinosaur { internal TRex(int size) : base("t-rex", size) => throw null; - internal TRex(int size, IDictionary additionalBinaryDataProperties) : base("t-rex", size, additionalBinaryDataProperties) => throw null; + internal TRex(string kind, int size, IDictionary additionalBinaryDataProperties) : base(kind, size, additionalBinaryDataProperties) => throw null; } } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/Configuration.json b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/Configuration.json new file mode 100644 index 0000000000..9ec21104a4 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/Configuration.json @@ -0,0 +1,6 @@ +{ + "output-folder": ".", + "namespace": "Type.Property.AdditionalProperties", + "library-name": "Type.Property.AdditionalProperties", + "use-model-reader-writer": true +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/_Type.Property.AdditionalProperties.sln b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/_Type.Property.AdditionalProperties.sln new file mode 100644 index 0000000000..fd3a463cf0 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/_Type.Property.AdditionalProperties.sln @@ -0,0 +1,48 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "_Type.Property.AdditionalProperties", "src\_Type.Property.AdditionalProperties.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/AdditionalPropertiesClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/AdditionalPropertiesClient.cs new file mode 100644 index 0000000000..7173a08366 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/AdditionalPropertiesClient.cs @@ -0,0 +1,82 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; + +namespace _Type.Property.AdditionalProperties +{ + public partial class AdditionalPropertiesClient + { + public AdditionalPropertiesClient() : this(new Uri("http://localhost:3000"), new AdditionalPropertiesClientOptions()) => throw null; + + public AdditionalPropertiesClient(Uri endpoint, AdditionalPropertiesClientOptions options) => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ExtendsUnknown GetExtendsUnknownClient() => throw null; + + public virtual ExtendsUnknownDerived GetExtendsUnknownDerivedClient() => throw null; + + public virtual ExtendsUnknownDiscriminated GetExtendsUnknownDiscriminatedClient() => throw null; + + public virtual IsUnknown GetIsUnknownClient() => throw null; + + public virtual IsUnknownDerived GetIsUnknownDerivedClient() => throw null; + + public virtual IsUnknownDiscriminated GetIsUnknownDiscriminatedClient() => throw null; + + public virtual ExtendsString GetExtendsStringClient() => throw null; + + public virtual IsString GetIsStringClient() => throw null; + + public virtual SpreadString GetSpreadStringClient() => throw null; + + public virtual ExtendsFloat GetExtendsFloatClient() => throw null; + + public virtual IsFloat GetIsFloatClient() => throw null; + + public virtual SpreadFloat GetSpreadFloatClient() => throw null; + + public virtual ExtendsModel GetExtendsModelClient() => throw null; + + public virtual IsModel GetIsModelClient() => throw null; + + public virtual SpreadModel GetSpreadModelClient() => throw null; + + public virtual ExtendsModelArray GetExtendsModelArrayClient() => throw null; + + public virtual IsModelArray GetIsModelArrayClient() => throw null; + + public virtual SpreadModelArray GetSpreadModelArrayClient() => throw null; + + public virtual SpreadDifferentString GetSpreadDifferentStringClient() => throw null; + + public virtual SpreadDifferentFloat GetSpreadDifferentFloatClient() => throw null; + + public virtual SpreadDifferentModel GetSpreadDifferentModelClient() => throw null; + + public virtual SpreadDifferentModelArray GetSpreadDifferentModelArrayClient() => throw null; + + public virtual ExtendsDifferentSpreadString GetExtendsDifferentSpreadStringClient() => throw null; + + public virtual ExtendsDifferentSpreadFloat GetExtendsDifferentSpreadFloatClient() => throw null; + + public virtual ExtendsDifferentSpreadModel GetExtendsDifferentSpreadModelClient() => throw null; + + public virtual ExtendsDifferentSpreadModelArray GetExtendsDifferentSpreadModelArrayClient() => throw null; + + public virtual MultipleSpread GetMultipleSpreadClient() => throw null; + + public virtual SpreadRecordUnion GetSpreadRecordUnionClient() => throw null; + + public virtual SpreadRecordDiscriminatedUnion GetSpreadRecordDiscriminatedUnionClient() => throw null; + + public virtual SpreadRecordNonDiscriminatedUnion GetSpreadRecordNonDiscriminatedUnionClient() => throw null; + + public virtual SpreadRecordNonDiscriminatedUnion2 GetSpreadRecordNonDiscriminatedUnion2Client() => throw null; + + public virtual SpreadRecordNonDiscriminatedUnion3 GetSpreadRecordNonDiscriminatedUnion3Client() => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/AdditionalPropertiesClientOptions.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/AdditionalPropertiesClientOptions.cs new file mode 100644 index 0000000000..131277df71 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/AdditionalPropertiesClientOptions.cs @@ -0,0 +1,12 @@ +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace _Type.Property.AdditionalProperties +{ + public partial class AdditionalPropertiesClientOptions : ClientPipelineOptions + { + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadFloat.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadFloat.cs new file mode 100644 index 0000000000..3bbb1b8747 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadFloat.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class ExtendsDifferentSpreadFloat + { + protected ExtendsDifferentSpreadFloat() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(DifferentSpreadFloatDerived body) => throw null; + + public virtual Task PutAsync(DifferentSpreadFloatDerived body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModel.cs new file mode 100644 index 0000000000..c99a829e9c --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModel.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class ExtendsDifferentSpreadModel + { + protected ExtendsDifferentSpreadModel() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(DifferentSpreadModelDerived body) => throw null; + + public virtual Task PutAsync(DifferentSpreadModelDerived body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModelArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModelArray.cs new file mode 100644 index 0000000000..68832b6b7f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModelArray.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class ExtendsDifferentSpreadModelArray + { + protected ExtendsDifferentSpreadModelArray() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(DifferentSpreadModelArrayDerived body) => throw null; + + public virtual Task PutAsync(DifferentSpreadModelArrayDerived body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadString.cs new file mode 100644 index 0000000000..77a59bf710 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadString.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class ExtendsDifferentSpreadString + { + protected ExtendsDifferentSpreadString() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(DifferentSpreadStringDerived body) => throw null; + + public virtual Task PutAsync(DifferentSpreadStringDerived body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsFloat.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsFloat.cs new file mode 100644 index 0000000000..7f94497c46 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsFloat.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class ExtendsFloat + { + protected ExtendsFloat() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(ExtendsFloatAdditionalProperties body) => throw null; + + public virtual Task PutAsync(ExtendsFloatAdditionalProperties body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModel.cs new file mode 100644 index 0000000000..5f6edd9589 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModel.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class ExtendsModel + { + protected ExtendsModel() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(ExtendsModelAdditionalProperties body) => throw null; + + public virtual Task PutAsync(ExtendsModelAdditionalProperties body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModelArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModelArray.cs new file mode 100644 index 0000000000..05891b22df --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModelArray.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class ExtendsModelArray + { + protected ExtendsModelArray() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(ExtendsModelArrayAdditionalProperties body) => throw null; + + public virtual Task PutAsync(ExtendsModelArrayAdditionalProperties body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsString.cs new file mode 100644 index 0000000000..6dba88de47 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsString.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class ExtendsString + { + protected ExtendsString() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(ExtendsStringAdditionalProperties body) => throw null; + + public virtual Task PutAsync(ExtendsStringAdditionalProperties body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknown.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknown.cs new file mode 100644 index 0000000000..ff09f3fb42 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknown.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class ExtendsUnknown + { + protected ExtendsUnknown() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(ExtendsUnknownAdditionalProperties body) => throw null; + + public virtual Task PutAsync(ExtendsUnknownAdditionalProperties body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDerived.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDerived.cs new file mode 100644 index 0000000000..c0ebfd689f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDerived.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class ExtendsUnknownDerived + { + protected ExtendsUnknownDerived() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(ExtendsUnknownAdditionalPropertiesDerived body) => throw null; + + public virtual Task PutAsync(ExtendsUnknownAdditionalPropertiesDerived body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDiscriminated.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDiscriminated.cs new file mode 100644 index 0000000000..c50a68ca38 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDiscriminated.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class ExtendsUnknownDiscriminated + { + protected ExtendsUnknownDiscriminated() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(ExtendsUnknownAdditionalPropertiesDiscriminated body) => throw null; + + public virtual Task PutAsync(ExtendsUnknownAdditionalPropertiesDiscriminated body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsFloat.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsFloat.cs new file mode 100644 index 0000000000..4744b34dc2 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsFloat.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class IsFloat + { + protected IsFloat() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(IsFloatAdditionalProperties body) => throw null; + + public virtual Task PutAsync(IsFloatAdditionalProperties body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModel.cs new file mode 100644 index 0000000000..4e66e71f7f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModel.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class IsModel + { + protected IsModel() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(IsModelAdditionalProperties body) => throw null; + + public virtual Task PutAsync(IsModelAdditionalProperties body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModelArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModelArray.cs new file mode 100644 index 0000000000..434a303dc0 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModelArray.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class IsModelArray + { + protected IsModelArray() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(IsModelArrayAdditionalProperties body) => throw null; + + public virtual Task PutAsync(IsModelArrayAdditionalProperties body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsString.cs new file mode 100644 index 0000000000..5d7e7931f6 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsString.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class IsString + { + protected IsString() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(IsStringAdditionalProperties body) => throw null; + + public virtual Task PutAsync(IsStringAdditionalProperties body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknown.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknown.cs new file mode 100644 index 0000000000..d3a4469e39 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknown.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class IsUnknown + { + protected IsUnknown() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(IsUnknownAdditionalProperties body) => throw null; + + public virtual Task PutAsync(IsUnknownAdditionalProperties body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDerived.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDerived.cs new file mode 100644 index 0000000000..2dffe41a1f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDerived.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class IsUnknownDerived + { + protected IsUnknownDerived() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(IsUnknownAdditionalPropertiesDerived body) => throw null; + + public virtual Task PutAsync(IsUnknownAdditionalPropertiesDerived body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDiscriminated.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDiscriminated.cs new file mode 100644 index 0000000000..b3a8bc0b1e --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDiscriminated.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class IsUnknownDiscriminated + { + protected IsUnknownDiscriminated() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(IsUnknownAdditionalPropertiesDiscriminated body) => throw null; + + public virtual Task PutAsync(IsUnknownAdditionalPropertiesDiscriminated body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.Serialization.cs new file mode 100644 index 0000000000..b0a49fa9ed --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadFloatDerived : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + DifferentSpreadFloatDerived IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected override DifferentSpreadFloatRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + DifferentSpreadFloatDerived IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected override DifferentSpreadFloatRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(DifferentSpreadFloatDerived differentSpreadFloatDerived) => throw null; + + public static explicit operator DifferentSpreadFloatDerived(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.cs new file mode 100644 index 0000000000..4eac77c6d0 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.cs @@ -0,0 +1,22 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadFloatDerived : DifferentSpreadFloatRecord + { + public DifferentSpreadFloatDerived(float derivedProp, string name) : base(name) => throw null; + + internal DifferentSpreadFloatDerived(float derivedProp, string name, IDictionary additionalProperties, IDictionary additionalBinaryDataProperties) : base(name, additionalProperties, additionalBinaryDataProperties) => throw null; + + public float DerivedProp + { + get => throw null; + set => throw null; + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.Serialization.cs new file mode 100644 index 0000000000..827fd45861 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadFloatRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + DifferentSpreadFloatRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual DifferentSpreadFloatRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + DifferentSpreadFloatRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual DifferentSpreadFloatRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(DifferentSpreadFloatRecord differentSpreadFloatRecord) => throw null; + + public static explicit operator DifferentSpreadFloatRecord(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.cs new file mode 100644 index 0000000000..3f04980eb8 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadFloatRecord + { + public DifferentSpreadFloatRecord(string name) => throw null; + + internal DifferentSpreadFloatRecord(string name, IDictionary additionalProperties, IDictionary additionalBinaryDataProperties) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.Serialization.cs new file mode 100644 index 0000000000..eba846fcd7 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadModelArrayDerived : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + DifferentSpreadModelArrayDerived IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected override DifferentSpreadModelArrayRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + DifferentSpreadModelArrayDerived IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected override DifferentSpreadModelArrayRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(DifferentSpreadModelArrayDerived differentSpreadModelArrayDerived) => throw null; + + public static explicit operator DifferentSpreadModelArrayDerived(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.cs new file mode 100644 index 0000000000..02d5e194c8 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadModelArrayDerived : DifferentSpreadModelArrayRecord + { + public DifferentSpreadModelArrayDerived(IEnumerable derivedProp, string knownProp) : base(knownProp) => throw null; + + internal DifferentSpreadModelArrayDerived(IList derivedProp, string knownProp, IDictionary> additionalProperties, IDictionary additionalBinaryDataProperties) : base(knownProp, additionalProperties, additionalBinaryDataProperties) => throw null; + + public IList DerivedProp => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.Serialization.cs new file mode 100644 index 0000000000..4e8fe7dbbb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadModelArrayRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + DifferentSpreadModelArrayRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual DifferentSpreadModelArrayRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + DifferentSpreadModelArrayRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual DifferentSpreadModelArrayRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(DifferentSpreadModelArrayRecord differentSpreadModelArrayRecord) => throw null; + + public static explicit operator DifferentSpreadModelArrayRecord(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.cs new file mode 100644 index 0000000000..82e51a5a4e --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadModelArrayRecord + { + public DifferentSpreadModelArrayRecord(string knownProp) => throw null; + + internal DifferentSpreadModelArrayRecord(string knownProp, IDictionary> additionalProperties, IDictionary additionalBinaryDataProperties) => throw null; + + public string KnownProp + { + get => throw null; + set => throw null; + } + + public IDictionary> AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.Serialization.cs new file mode 100644 index 0000000000..d095072e35 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadModelDerived : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + DifferentSpreadModelDerived IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected override DifferentSpreadModelRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + DifferentSpreadModelDerived IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected override DifferentSpreadModelRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(DifferentSpreadModelDerived differentSpreadModelDerived) => throw null; + + public static explicit operator DifferentSpreadModelDerived(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.cs new file mode 100644 index 0000000000..2e8ee1c191 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.cs @@ -0,0 +1,22 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadModelDerived : DifferentSpreadModelRecord + { + public DifferentSpreadModelDerived(ModelForRecord derivedProp, string knownProp) : base(knownProp) => throw null; + + internal DifferentSpreadModelDerived(ModelForRecord derivedProp, string knownProp, IDictionary additionalProperties) : base(knownProp, additionalProperties) => throw null; + + public ModelForRecord DerivedProp + { + get => throw null; + set => throw null; + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.Serialization.cs new file mode 100644 index 0000000000..07710bb747 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadModelRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + DifferentSpreadModelRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual DifferentSpreadModelRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + DifferentSpreadModelRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual DifferentSpreadModelRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(DifferentSpreadModelRecord differentSpreadModelRecord) => throw null; + + public static explicit operator DifferentSpreadModelRecord(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.cs new file mode 100644 index 0000000000..d61c6f9057 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadModelRecord + { + public DifferentSpreadModelRecord(string knownProp) => throw null; + + internal DifferentSpreadModelRecord(string knownProp, IDictionary additionalProperties) => throw null; + + public string KnownProp + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.Serialization.cs new file mode 100644 index 0000000000..23e0aadbd6 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadStringDerived : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + DifferentSpreadStringDerived IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected override DifferentSpreadStringRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + DifferentSpreadStringDerived IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected override DifferentSpreadStringRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(DifferentSpreadStringDerived differentSpreadStringDerived) => throw null; + + public static explicit operator DifferentSpreadStringDerived(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.cs new file mode 100644 index 0000000000..3e9fdcd2cb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.cs @@ -0,0 +1,22 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadStringDerived : DifferentSpreadStringRecord + { + public DifferentSpreadStringDerived(string derivedProp, float id) : base(id) => throw null; + + internal DifferentSpreadStringDerived(string derivedProp, float id, IDictionary additionalProperties, IDictionary additionalBinaryDataProperties) : base(id, additionalProperties, additionalBinaryDataProperties) => throw null; + + public string DerivedProp + { + get => throw null; + set => throw null; + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.Serialization.cs new file mode 100644 index 0000000000..36e97e31f8 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadStringRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + DifferentSpreadStringRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual DifferentSpreadStringRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + DifferentSpreadStringRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual DifferentSpreadStringRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(DifferentSpreadStringRecord differentSpreadStringRecord) => throw null; + + public static explicit operator DifferentSpreadStringRecord(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.cs new file mode 100644 index 0000000000..b52445c0e4 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadStringRecord + { + public DifferentSpreadStringRecord(float id) => throw null; + + internal DifferentSpreadStringRecord(float id, IDictionary additionalProperties, IDictionary additionalBinaryDataProperties) => throw null; + + public float Id + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.Serialization.cs new file mode 100644 index 0000000000..1312932b11 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsFloatAdditionalProperties : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ExtendsFloatAdditionalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual ExtendsFloatAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + ExtendsFloatAdditionalProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual ExtendsFloatAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(ExtendsFloatAdditionalProperties extendsFloatAdditionalProperties) => throw null; + + public static explicit operator ExtendsFloatAdditionalProperties(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.cs new file mode 100644 index 0000000000..b42219b1b8 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.cs @@ -0,0 +1,21 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsFloatAdditionalProperties + { + public ExtendsFloatAdditionalProperties(float id) => throw null; + + public float Id + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.Serialization.cs new file mode 100644 index 0000000000..311d17e1f4 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsModelAdditionalProperties : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ExtendsModelAdditionalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual ExtendsModelAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + ExtendsModelAdditionalProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual ExtendsModelAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(ExtendsModelAdditionalProperties extendsModelAdditionalProperties) => throw null; + + public static explicit operator ExtendsModelAdditionalProperties(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.cs new file mode 100644 index 0000000000..ba5112cf14 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.cs @@ -0,0 +1,22 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsModelAdditionalProperties + { + public ExtendsModelAdditionalProperties(ModelForRecord knownProp) => throw null; + + public ModelForRecord KnownProp + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.Serialization.cs new file mode 100644 index 0000000000..2e699e2935 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsModelArrayAdditionalProperties : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ExtendsModelArrayAdditionalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual ExtendsModelArrayAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + ExtendsModelArrayAdditionalProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual ExtendsModelArrayAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(ExtendsModelArrayAdditionalProperties extendsModelArrayAdditionalProperties) => throw null; + + public static explicit operator ExtendsModelArrayAdditionalProperties(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.cs new file mode 100644 index 0000000000..c3a4ba46d0 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsModelArrayAdditionalProperties + { + public ExtendsModelArrayAdditionalProperties(IEnumerable knownProp) => throw null; + + public IList KnownProp => throw null; + + public IDictionary> AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.Serialization.cs new file mode 100644 index 0000000000..a5b0549642 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsStringAdditionalProperties : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ExtendsStringAdditionalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual ExtendsStringAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + ExtendsStringAdditionalProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual ExtendsStringAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(ExtendsStringAdditionalProperties extendsStringAdditionalProperties) => throw null; + + public static explicit operator ExtendsStringAdditionalProperties(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.cs new file mode 100644 index 0000000000..7a2c738679 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.cs @@ -0,0 +1,21 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsStringAdditionalProperties + { + public ExtendsStringAdditionalProperties(string name) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.Serialization.cs new file mode 100644 index 0000000000..f897b97859 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsUnknownAdditionalProperties : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ExtendsUnknownAdditionalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual ExtendsUnknownAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + ExtendsUnknownAdditionalProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual ExtendsUnknownAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(ExtendsUnknownAdditionalProperties extendsUnknownAdditionalProperties) => throw null; + + public static explicit operator ExtendsUnknownAdditionalProperties(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.cs new file mode 100644 index 0000000000..b64d01125c --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsUnknownAdditionalProperties + { + public ExtendsUnknownAdditionalProperties(string name) => throw null; + + internal ExtendsUnknownAdditionalProperties(string name, IDictionary additionalProperties) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.Serialization.cs new file mode 100644 index 0000000000..e016fb0212 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsUnknownAdditionalPropertiesDerived : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ExtendsUnknownAdditionalPropertiesDerived IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected override ExtendsUnknownAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + ExtendsUnknownAdditionalPropertiesDerived IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected override ExtendsUnknownAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(ExtendsUnknownAdditionalPropertiesDerived extendsUnknownAdditionalPropertiesDerived) => throw null; + + public static explicit operator ExtendsUnknownAdditionalPropertiesDerived(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.cs new file mode 100644 index 0000000000..4516eb1531 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.cs @@ -0,0 +1,28 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsUnknownAdditionalPropertiesDerived : ExtendsUnknownAdditionalProperties + { + public ExtendsUnknownAdditionalPropertiesDerived(int index, string name) : base(name) => throw null; + + internal ExtendsUnknownAdditionalPropertiesDerived(int index, float? age, string name, IDictionary additionalProperties) : base(name, additionalProperties) => throw null; + + public int Index + { + get => throw null; + set => throw null; + } + + public float? Age + { + get => throw null; + set => throw null; + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs new file mode 100644 index 0000000000..797a92f247 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -0,0 +1,37 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + [PersistableModelProxy(typeof(UnknownExtendsUnknownAdditionalPropertiesDiscriminated))] + public abstract partial class ExtendsUnknownAdditionalPropertiesDiscriminated : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ExtendsUnknownAdditionalPropertiesDiscriminated IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual ExtendsUnknownAdditionalPropertiesDiscriminated JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + ExtendsUnknownAdditionalPropertiesDiscriminated IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual ExtendsUnknownAdditionalPropertiesDiscriminated PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(ExtendsUnknownAdditionalPropertiesDiscriminated extendsUnknownAdditionalPropertiesDiscriminated) => throw null; + + public static explicit operator ExtendsUnknownAdditionalPropertiesDiscriminated(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs new file mode 100644 index 0000000000..14fdde794c --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs @@ -0,0 +1,30 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public abstract partial class ExtendsUnknownAdditionalPropertiesDiscriminated + { + private protected ExtendsUnknownAdditionalPropertiesDiscriminated(string name, string kind) => throw null; + + internal ExtendsUnknownAdditionalPropertiesDiscriminated(string name, string kind, IDictionary additionalProperties) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + internal string Kind + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs new file mode 100644 index 0000000000..c7183b340b --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsUnknownAdditionalPropertiesDiscriminatedDerived : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ExtendsUnknownAdditionalPropertiesDiscriminatedDerived IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected override ExtendsUnknownAdditionalPropertiesDiscriminated JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + ExtendsUnknownAdditionalPropertiesDiscriminatedDerived IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected override ExtendsUnknownAdditionalPropertiesDiscriminated PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(ExtendsUnknownAdditionalPropertiesDiscriminatedDerived extendsUnknownAdditionalPropertiesDiscriminatedDerived) => throw null; + + public static explicit operator ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs new file mode 100644 index 0000000000..3431d47b8e --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs @@ -0,0 +1,28 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ExtendsUnknownAdditionalPropertiesDiscriminatedDerived : ExtendsUnknownAdditionalPropertiesDiscriminated + { + public ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(int index, string name) : base(name, "derived") => throw null; + + internal ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(int index, float? age, string name, string kind, IDictionary additionalProperties) : base(name, kind, additionalProperties) => throw null; + + public int Index + { + get => throw null; + set => throw null; + } + + public float? Age + { + get => throw null; + set => throw null; + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.Serialization.cs new file mode 100644 index 0000000000..2741707965 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsFloatAdditionalProperties : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + IsFloatAdditionalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual IsFloatAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + IsFloatAdditionalProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual IsFloatAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(IsFloatAdditionalProperties isFloatAdditionalProperties) => throw null; + + public static explicit operator IsFloatAdditionalProperties(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.cs new file mode 100644 index 0000000000..36da6b1718 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.cs @@ -0,0 +1,21 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsFloatAdditionalProperties + { + public IsFloatAdditionalProperties(float id) => throw null; + + public float Id + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.Serialization.cs new file mode 100644 index 0000000000..0c379dd6d4 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsModelAdditionalProperties : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + IsModelAdditionalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual IsModelAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + IsModelAdditionalProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual IsModelAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(IsModelAdditionalProperties isModelAdditionalProperties) => throw null; + + public static explicit operator IsModelAdditionalProperties(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.cs new file mode 100644 index 0000000000..29c5d59cdc --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.cs @@ -0,0 +1,22 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsModelAdditionalProperties + { + public IsModelAdditionalProperties(ModelForRecord knownProp) => throw null; + + public ModelForRecord KnownProp + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.Serialization.cs new file mode 100644 index 0000000000..307cb3446b --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsModelArrayAdditionalProperties : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + IsModelArrayAdditionalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual IsModelArrayAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + IsModelArrayAdditionalProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual IsModelArrayAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(IsModelArrayAdditionalProperties isModelArrayAdditionalProperties) => throw null; + + public static explicit operator IsModelArrayAdditionalProperties(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.cs new file mode 100644 index 0000000000..47501816cb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsModelArrayAdditionalProperties + { + public IsModelArrayAdditionalProperties(IEnumerable knownProp) => throw null; + + public IList KnownProp => throw null; + + public IDictionary> AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.Serialization.cs new file mode 100644 index 0000000000..8e294b6616 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsStringAdditionalProperties : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + IsStringAdditionalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual IsStringAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + IsStringAdditionalProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual IsStringAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(IsStringAdditionalProperties isStringAdditionalProperties) => throw null; + + public static explicit operator IsStringAdditionalProperties(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.cs new file mode 100644 index 0000000000..f03cd721fa --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.cs @@ -0,0 +1,21 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsStringAdditionalProperties + { + public IsStringAdditionalProperties(string name) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.Serialization.cs new file mode 100644 index 0000000000..aaf4bbea46 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsUnknownAdditionalProperties : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + IsUnknownAdditionalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual IsUnknownAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + IsUnknownAdditionalProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual IsUnknownAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(IsUnknownAdditionalProperties isUnknownAdditionalProperties) => throw null; + + public static explicit operator IsUnknownAdditionalProperties(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.cs new file mode 100644 index 0000000000..0c3cd03574 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsUnknownAdditionalProperties + { + public IsUnknownAdditionalProperties(string name) => throw null; + + internal IsUnknownAdditionalProperties(string name, IDictionary additionalProperties) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.Serialization.cs new file mode 100644 index 0000000000..bb6628a9a1 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsUnknownAdditionalPropertiesDerived : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + IsUnknownAdditionalPropertiesDerived IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected override IsUnknownAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + IsUnknownAdditionalPropertiesDerived IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected override IsUnknownAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(IsUnknownAdditionalPropertiesDerived isUnknownAdditionalPropertiesDerived) => throw null; + + public static explicit operator IsUnknownAdditionalPropertiesDerived(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.cs new file mode 100644 index 0000000000..3fbbf10472 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.cs @@ -0,0 +1,28 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsUnknownAdditionalPropertiesDerived : IsUnknownAdditionalProperties + { + public IsUnknownAdditionalPropertiesDerived(int index, string name) : base(name) => throw null; + + internal IsUnknownAdditionalPropertiesDerived(int index, float? age, string name, IDictionary additionalProperties) : base(name, additionalProperties) => throw null; + + public int Index + { + get => throw null; + set => throw null; + } + + public float? Age + { + get => throw null; + set => throw null; + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs new file mode 100644 index 0000000000..c778c1d8dd --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -0,0 +1,37 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + [PersistableModelProxy(typeof(UnknownIsUnknownAdditionalPropertiesDiscriminated))] + public abstract partial class IsUnknownAdditionalPropertiesDiscriminated : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + IsUnknownAdditionalPropertiesDiscriminated IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual IsUnknownAdditionalPropertiesDiscriminated JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + IsUnknownAdditionalPropertiesDiscriminated IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual IsUnknownAdditionalPropertiesDiscriminated PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(IsUnknownAdditionalPropertiesDiscriminated isUnknownAdditionalPropertiesDiscriminated) => throw null; + + public static explicit operator IsUnknownAdditionalPropertiesDiscriminated(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs new file mode 100644 index 0000000000..45bdbf9816 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs @@ -0,0 +1,30 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public abstract partial class IsUnknownAdditionalPropertiesDiscriminated + { + private protected IsUnknownAdditionalPropertiesDiscriminated(string name, string kind) => throw null; + + internal IsUnknownAdditionalPropertiesDiscriminated(string name, string kind, IDictionary additionalProperties) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + internal string Kind + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs new file mode 100644 index 0000000000..c7b1ffafdc --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsUnknownAdditionalPropertiesDiscriminatedDerived : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + IsUnknownAdditionalPropertiesDiscriminatedDerived IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected override IsUnknownAdditionalPropertiesDiscriminated JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + IsUnknownAdditionalPropertiesDiscriminatedDerived IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected override IsUnknownAdditionalPropertiesDiscriminated PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(IsUnknownAdditionalPropertiesDiscriminatedDerived isUnknownAdditionalPropertiesDiscriminatedDerived) => throw null; + + public static explicit operator IsUnknownAdditionalPropertiesDiscriminatedDerived(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs new file mode 100644 index 0000000000..b4942903d1 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs @@ -0,0 +1,28 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class IsUnknownAdditionalPropertiesDiscriminatedDerived : IsUnknownAdditionalPropertiesDiscriminated + { + public IsUnknownAdditionalPropertiesDiscriminatedDerived(int index, string name) : base(name, "derived") => throw null; + + internal IsUnknownAdditionalPropertiesDiscriminatedDerived(int index, float? age, string name, string kind, IDictionary additionalProperties) : base(name, kind, additionalProperties) => throw null; + + public int Index + { + get => throw null; + set => throw null; + } + + public float? Age + { + get => throw null; + set => throw null; + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ModelForRecord.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ModelForRecord.Serialization.cs new file mode 100644 index 0000000000..06a4dff678 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ModelForRecord.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ModelForRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ModelForRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual ModelForRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + ModelForRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual ModelForRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(ModelForRecord modelForRecord) => throw null; + + public static explicit operator ModelForRecord(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ModelForRecord.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ModelForRecord.cs new file mode 100644 index 0000000000..9087e404da --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/ModelForRecord.cs @@ -0,0 +1,17 @@ +// + +#nullable disable + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ModelForRecord + { + public ModelForRecord(string state) => throw null; + + public string State + { + get => throw null; + set => throw null; + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/MultipleSpreadRecord.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/MultipleSpreadRecord.Serialization.cs new file mode 100644 index 0000000000..e66f35a02c --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/MultipleSpreadRecord.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class MultipleSpreadRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + MultipleSpreadRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual MultipleSpreadRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + MultipleSpreadRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual MultipleSpreadRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(MultipleSpreadRecord multipleSpreadRecord) => throw null; + + public static explicit operator MultipleSpreadRecord(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/MultipleSpreadRecord.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/MultipleSpreadRecord.cs new file mode 100644 index 0000000000..4045183c01 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/MultipleSpreadRecord.cs @@ -0,0 +1,23 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class MultipleSpreadRecord + { + public MultipleSpreadRecord(bool flag) => throw null; + + public bool Flag + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + + public IDictionary AdditionalSingleProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadFloatRecord.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadFloatRecord.Serialization.cs new file mode 100644 index 0000000000..19d4a9e0e3 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadFloatRecord.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadFloatRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + SpreadFloatRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadFloatRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + SpreadFloatRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadFloatRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(SpreadFloatRecord spreadFloatRecord) => throw null; + + public static explicit operator SpreadFloatRecord(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadFloatRecord.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadFloatRecord.cs new file mode 100644 index 0000000000..a39b74546a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadFloatRecord.cs @@ -0,0 +1,21 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadFloatRecord + { + public SpreadFloatRecord(float id) => throw null; + + public float Id + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelArrayRecord.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelArrayRecord.Serialization.cs new file mode 100644 index 0000000000..2d2799ba83 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelArrayRecord.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadModelArrayRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + SpreadModelArrayRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadModelArrayRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + SpreadModelArrayRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadModelArrayRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(SpreadModelArrayRecord spreadModelArrayRecord) => throw null; + + public static explicit operator SpreadModelArrayRecord(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelArrayRecord.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelArrayRecord.cs new file mode 100644 index 0000000000..813ae40494 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelArrayRecord.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadModelArrayRecord + { + public SpreadModelArrayRecord(IEnumerable knownProp) => throw null; + + public IList KnownProp => throw null; + + public IDictionary> AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelRecord.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelRecord.Serialization.cs new file mode 100644 index 0000000000..527d7bfc2c --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelRecord.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadModelRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + SpreadModelRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadModelRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + SpreadModelRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadModelRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(SpreadModelRecord spreadModelRecord) => throw null; + + public static explicit operator SpreadModelRecord(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelRecord.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelRecord.cs new file mode 100644 index 0000000000..b41f0734ac --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadModelRecord.cs @@ -0,0 +1,22 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadModelRecord + { + public SpreadModelRecord(ModelForRecord knownProp) => throw null; + + public ModelForRecord KnownProp + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForDiscriminatedUnion.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForDiscriminatedUnion.Serialization.cs new file mode 100644 index 0000000000..9f28ca29ab --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForDiscriminatedUnion.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadRecordForDiscriminatedUnion : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + SpreadRecordForDiscriminatedUnion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadRecordForDiscriminatedUnion JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + SpreadRecordForDiscriminatedUnion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadRecordForDiscriminatedUnion PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(SpreadRecordForDiscriminatedUnion spreadRecordForDiscriminatedUnion) => throw null; + + public static explicit operator SpreadRecordForDiscriminatedUnion(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForDiscriminatedUnion.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForDiscriminatedUnion.cs new file mode 100644 index 0000000000..6a12d4671a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForDiscriminatedUnion.cs @@ -0,0 +1,22 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadRecordForDiscriminatedUnion + { + public SpreadRecordForDiscriminatedUnion(string name) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion.Serialization.cs new file mode 100644 index 0000000000..a684397a80 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadRecordForNonDiscriminatedUnion : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + SpreadRecordForNonDiscriminatedUnion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadRecordForNonDiscriminatedUnion JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + SpreadRecordForNonDiscriminatedUnion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadRecordForNonDiscriminatedUnion PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(SpreadRecordForNonDiscriminatedUnion spreadRecordForNonDiscriminatedUnion) => throw null; + + public static explicit operator SpreadRecordForNonDiscriminatedUnion(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion.cs new file mode 100644 index 0000000000..ed32dfcf55 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion.cs @@ -0,0 +1,22 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadRecordForNonDiscriminatedUnion + { + public SpreadRecordForNonDiscriminatedUnion(string name) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion2.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion2.Serialization.cs new file mode 100644 index 0000000000..7de388fb9a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion2.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadRecordForNonDiscriminatedUnion2 : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + SpreadRecordForNonDiscriminatedUnion2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadRecordForNonDiscriminatedUnion2 JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + SpreadRecordForNonDiscriminatedUnion2 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadRecordForNonDiscriminatedUnion2 PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(SpreadRecordForNonDiscriminatedUnion2 spreadRecordForNonDiscriminatedUnion2) => throw null; + + public static explicit operator SpreadRecordForNonDiscriminatedUnion2(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion2.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion2.cs new file mode 100644 index 0000000000..883e086114 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion2.cs @@ -0,0 +1,22 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadRecordForNonDiscriminatedUnion2 + { + public SpreadRecordForNonDiscriminatedUnion2(string name) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion3.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion3.Serialization.cs new file mode 100644 index 0000000000..b9317e493a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion3.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadRecordForNonDiscriminatedUnion3 : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + SpreadRecordForNonDiscriminatedUnion3 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadRecordForNonDiscriminatedUnion3 JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + SpreadRecordForNonDiscriminatedUnion3 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadRecordForNonDiscriminatedUnion3 PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(SpreadRecordForNonDiscriminatedUnion3 spreadRecordForNonDiscriminatedUnion3) => throw null; + + public static explicit operator SpreadRecordForNonDiscriminatedUnion3(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion3.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion3.cs new file mode 100644 index 0000000000..81c3e4e698 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForNonDiscriminatedUnion3.cs @@ -0,0 +1,22 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadRecordForNonDiscriminatedUnion3 + { + public SpreadRecordForNonDiscriminatedUnion3(string name) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForUnion.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForUnion.Serialization.cs new file mode 100644 index 0000000000..1517540390 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForUnion.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadRecordForUnion : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + SpreadRecordForUnion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadRecordForUnion JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + SpreadRecordForUnion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadRecordForUnion PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(SpreadRecordForUnion spreadRecordForUnion) => throw null; + + public static explicit operator SpreadRecordForUnion(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForUnion.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForUnion.cs new file mode 100644 index 0000000000..1c09d0aba2 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadRecordForUnion.cs @@ -0,0 +1,23 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadRecordForUnion + { + public SpreadRecordForUnion(bool flag) => throw null; + + public bool Flag + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + + public IDictionary AdditionalSingleProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadStringRecord.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadStringRecord.Serialization.cs new file mode 100644 index 0000000000..8faabcfab0 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadStringRecord.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadStringRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + SpreadStringRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadStringRecord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + SpreadStringRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual SpreadStringRecord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(SpreadStringRecord spreadStringRecord) => throw null; + + public static explicit operator SpreadStringRecord(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadStringRecord.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadStringRecord.cs new file mode 100644 index 0000000000..6303c105d5 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/SpreadStringRecord.cs @@ -0,0 +1,21 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class SpreadStringRecord + { + public SpreadStringRecord(string name) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + public IDictionary AdditionalProperties => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs new file mode 100644 index 0000000000..b040f20f56 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + internal partial class UnknownExtendsUnknownAdditionalPropertiesDiscriminated : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ExtendsUnknownAdditionalPropertiesDiscriminated IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected override ExtendsUnknownAdditionalPropertiesDiscriminated JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + ExtendsUnknownAdditionalPropertiesDiscriminated IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected override ExtendsUnknownAdditionalPropertiesDiscriminated PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs new file mode 100644 index 0000000000..016ce89325 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs @@ -0,0 +1,14 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + internal partial class UnknownExtendsUnknownAdditionalPropertiesDiscriminated : ExtendsUnknownAdditionalPropertiesDiscriminated + { + internal UnknownExtendsUnknownAdditionalPropertiesDiscriminated(string name, string kind, IDictionary additionalProperties) : base(name, kind ?? "unknown", additionalProperties) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs new file mode 100644 index 0000000000..5fa7ee9751 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + internal partial class UnknownIsUnknownAdditionalPropertiesDiscriminated : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + IsUnknownAdditionalPropertiesDiscriminated IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected override IsUnknownAdditionalPropertiesDiscriminated JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + IsUnknownAdditionalPropertiesDiscriminated IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected override IsUnknownAdditionalPropertiesDiscriminated PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs new file mode 100644 index 0000000000..6f03c7dc8d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs @@ -0,0 +1,14 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + internal partial class UnknownIsUnknownAdditionalPropertiesDiscriminated : IsUnknownAdditionalPropertiesDiscriminated + { + internal UnknownIsUnknownAdditionalPropertiesDiscriminated(string name, string kind, IDictionary additionalProperties) : base(name, kind ?? "unknown", additionalProperties) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData0.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData0.Serialization.cs new file mode 100644 index 0000000000..e421113357 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData0.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class WidgetData0 : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + WidgetData0 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual WidgetData0 JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + WidgetData0 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual WidgetData0 PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(WidgetData0 widgetData0) => throw null; + + public static explicit operator WidgetData0(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData0.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData0.cs new file mode 100644 index 0000000000..9b6c6e19d4 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData0.cs @@ -0,0 +1,19 @@ +// + +#nullable disable + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class WidgetData0 + { + public WidgetData0(string fooProp) => throw null; + + public WidgetData0Kind Kind => throw null; + + public string FooProp + { + get => throw null; + set => throw null; + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData0Kind.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData0Kind.cs new file mode 100644 index 0000000000..edbcf903a1 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData0Kind.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace _Type.Property.AdditionalProperties.Models +{ + public readonly partial struct WidgetData0Kind : IEquatable + { + public WidgetData0Kind(string value) => throw null; + + public static WidgetData0Kind Kind0 => throw null; + + public static bool operator ==(WidgetData0Kind left, WidgetData0Kind right) => throw null; + + public static bool operator !=(WidgetData0Kind left, WidgetData0Kind right) => throw null; + + public static implicit operator WidgetData0Kind(string value) => throw null; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => throw null; + + public bool Equals(WidgetData0Kind other) => throw null; + + public override int GetHashCode() => throw null; + + public override string ToString() => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData1.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData1.Serialization.cs new file mode 100644 index 0000000000..8237422e93 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData1.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class WidgetData1 : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + WidgetData1 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual WidgetData1 JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + WidgetData1 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual WidgetData1 PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(WidgetData1 widgetData1) => throw null; + + public static explicit operator WidgetData1(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData1.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData1.cs new file mode 100644 index 0000000000..688adec218 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData1.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class WidgetData1 + { + public WidgetData1(DateTimeOffset start) => throw null; + + public WidgetData1Kind Kind => throw null; + + public DateTimeOffset Start + { + get => throw null; + set => throw null; + } + + public DateTimeOffset? End + { + get => throw null; + set => throw null; + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData1Kind.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData1Kind.cs new file mode 100644 index 0000000000..289f6e0e44 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData1Kind.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace _Type.Property.AdditionalProperties.Models +{ + public readonly partial struct WidgetData1Kind : IEquatable + { + public WidgetData1Kind(string value) => throw null; + + public static WidgetData1Kind Kind1 => throw null; + + public static bool operator ==(WidgetData1Kind left, WidgetData1Kind right) => throw null; + + public static bool operator !=(WidgetData1Kind left, WidgetData1Kind right) => throw null; + + public static implicit operator WidgetData1Kind(string value) => throw null; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => throw null; + + public bool Equals(WidgetData1Kind other) => throw null; + + public override int GetHashCode() => throw null; + + public override string ToString() => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData2.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData2.Serialization.cs new file mode 100644 index 0000000000..cfd5bb5eda --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData2.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class WidgetData2 : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + WidgetData2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual WidgetData2 JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + WidgetData2 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual WidgetData2 PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(WidgetData2 widgetData2) => throw null; + + public static explicit operator WidgetData2(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData2.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData2.cs new file mode 100644 index 0000000000..1867e87891 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData2.cs @@ -0,0 +1,19 @@ +// + +#nullable disable + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class WidgetData2 + { + public WidgetData2(string start) => throw null; + + public WidgetData2Kind Kind => throw null; + + public string Start + { + get => throw null; + set => throw null; + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData2Kind.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData2Kind.cs new file mode 100644 index 0000000000..170007fc9a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/Models/WidgetData2Kind.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace _Type.Property.AdditionalProperties.Models +{ + public readonly partial struct WidgetData2Kind : IEquatable + { + public WidgetData2Kind(string value) => throw null; + + public static WidgetData2Kind Kind1 => throw null; + + public static bool operator ==(WidgetData2Kind left, WidgetData2Kind right) => throw null; + + public static bool operator !=(WidgetData2Kind left, WidgetData2Kind right) => throw null; + + public static implicit operator WidgetData2Kind(string value) => throw null; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => throw null; + + public bool Equals(WidgetData2Kind other) => throw null; + + public override int GetHashCode() => throw null; + + public override string ToString() => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/MultipleSpread.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/MultipleSpread.cs new file mode 100644 index 0000000000..d6ffece696 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/MultipleSpread.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class MultipleSpread + { + protected MultipleSpread() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(MultipleSpreadRecord body) => throw null; + + public virtual Task PutAsync(MultipleSpreadRecord body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentFloat.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentFloat.cs new file mode 100644 index 0000000000..60b1fc445a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentFloat.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadDifferentFloat + { + protected SpreadDifferentFloat() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(DifferentSpreadFloatRecord body) => throw null; + + public virtual Task PutAsync(DifferentSpreadFloatRecord body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModel.cs new file mode 100644 index 0000000000..23287141e9 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModel.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadDifferentModel + { + protected SpreadDifferentModel() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(DifferentSpreadModelRecord body) => throw null; + + public virtual Task PutAsync(DifferentSpreadModelRecord body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModelArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModelArray.cs new file mode 100644 index 0000000000..644a72c7a8 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModelArray.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadDifferentModelArray + { + protected SpreadDifferentModelArray() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(DifferentSpreadModelArrayRecord body) => throw null; + + public virtual Task PutAsync(DifferentSpreadModelArrayRecord body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentString.cs new file mode 100644 index 0000000000..a40c850a14 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentString.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadDifferentString + { + protected SpreadDifferentString() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(DifferentSpreadStringRecord body) => throw null; + + public virtual Task PutAsync(DifferentSpreadStringRecord body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadFloat.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadFloat.cs new file mode 100644 index 0000000000..623b05c25e --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadFloat.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadFloat + { + protected SpreadFloat() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(SpreadFloatRecord body) => throw null; + + public virtual Task PutAsync(SpreadFloatRecord body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModel.cs new file mode 100644 index 0000000000..dacef6a0e7 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModel.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadModel + { + protected SpreadModel() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(SpreadModelRecord body) => throw null; + + public virtual Task PutAsync(SpreadModelRecord body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModelArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModelArray.cs new file mode 100644 index 0000000000..2c53d5a92d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModelArray.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadModelArray + { + protected SpreadModelArray() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(SpreadModelArrayRecord body) => throw null; + + public virtual Task PutAsync(SpreadModelArrayRecord body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordDiscriminatedUnion.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordDiscriminatedUnion.cs new file mode 100644 index 0000000000..d7642b8bbb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordDiscriminatedUnion.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadRecordDiscriminatedUnion + { + protected SpreadRecordDiscriminatedUnion() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(SpreadRecordForDiscriminatedUnion body) => throw null; + + public virtual Task PutAsync(SpreadRecordForDiscriminatedUnion body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion.cs new file mode 100644 index 0000000000..07b9b93e2b --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadRecordNonDiscriminatedUnion + { + protected SpreadRecordNonDiscriminatedUnion() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(SpreadRecordForNonDiscriminatedUnion body) => throw null; + + public virtual Task PutAsync(SpreadRecordForNonDiscriminatedUnion body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion2.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion2.cs new file mode 100644 index 0000000000..2d3b75f64f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion2.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadRecordNonDiscriminatedUnion2 + { + protected SpreadRecordNonDiscriminatedUnion2() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(SpreadRecordForNonDiscriminatedUnion2 body) => throw null; + + public virtual Task PutAsync(SpreadRecordForNonDiscriminatedUnion2 body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion3.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion3.cs new file mode 100644 index 0000000000..bcca824907 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion3.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadRecordNonDiscriminatedUnion3 + { + protected SpreadRecordNonDiscriminatedUnion3() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(SpreadRecordForNonDiscriminatedUnion3 body) => throw null; + + public virtual Task PutAsync(SpreadRecordForNonDiscriminatedUnion3 body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordUnion.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordUnion.cs new file mode 100644 index 0000000000..a6951fe412 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordUnion.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadRecordUnion + { + protected SpreadRecordUnion() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(SpreadRecordForUnion body) => throw null; + + public virtual Task PutAsync(SpreadRecordForUnion body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadString.cs new file mode 100644 index 0000000000..2b95b3a97c --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadString.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.AdditionalProperties.Models; + +namespace _Type.Property.AdditionalProperties +{ + public partial class SpreadString + { + protected SpreadString() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult Get(RequestOptions options) => throw null; + + public virtual Task GetAsync(RequestOptions options) => throw null; + + public virtual ClientResult Get() => throw null; + + public virtual Task> GetAsync() => throw null; + + public virtual ClientResult Put(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult Put(SpreadStringRecord body) => throw null; + + public virtual Task PutAsync(SpreadStringRecord body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/TypePropertyAdditionalPropertiesModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/TypePropertyAdditionalPropertiesModelFactory.cs new file mode 100644 index 0000000000..1600cc699d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/TypePropertyAdditionalPropertiesModelFactory.cs @@ -0,0 +1,88 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.AdditionalProperties.Models +{ + public static partial class TypePropertyAdditionalPropertiesModelFactory + { + public static SpreadRecordForNonDiscriminatedUnion3 SpreadRecordForNonDiscriminatedUnion3(string name = default, IDictionary additionalProperties = default) => throw null; + + public static WidgetData2 WidgetData2(WidgetData2Kind kind = default, string start = default) => throw null; + + public static WidgetData1 WidgetData1(WidgetData1Kind kind = default, DateTimeOffset start = default, DateTimeOffset? end = default) => throw null; + + public static SpreadRecordForNonDiscriminatedUnion2 SpreadRecordForNonDiscriminatedUnion2(string name = default, IDictionary additionalProperties = default) => throw null; + + public static SpreadRecordForNonDiscriminatedUnion SpreadRecordForNonDiscriminatedUnion(string name = default, IDictionary additionalProperties = default) => throw null; + + public static WidgetData0 WidgetData0(WidgetData0Kind kind = default, string fooProp = default) => throw null; + + public static SpreadRecordForDiscriminatedUnion SpreadRecordForDiscriminatedUnion(string name = default, IDictionary additionalProperties = default) => throw null; + + public static SpreadRecordForUnion SpreadRecordForUnion(bool flag = default, IDictionary additionalProperties = default, IDictionary additionalSingleProperties = default) => throw null; + + public static MultipleSpreadRecord MultipleSpreadRecord(bool flag = default, IDictionary additionalProperties = default, IDictionary additionalSingleProperties = default) => throw null; + + public static DifferentSpreadModelArrayDerived DifferentSpreadModelArrayDerived(IEnumerable derivedProp = default, string knownProp = default, IDictionary> additionalProperties = default) => throw null; + + public static ModelForRecord ModelForRecord(string state = default) => throw null; + + public static DifferentSpreadModelArrayRecord DifferentSpreadModelArrayRecord(string knownProp = default, IDictionary> additionalProperties = default) => throw null; + + public static DifferentSpreadModelDerived DifferentSpreadModelDerived(ModelForRecord derivedProp = default, string knownProp = default, IDictionary additionalProperties = default) => throw null; + + public static DifferentSpreadModelRecord DifferentSpreadModelRecord(string knownProp = default, IDictionary additionalProperties = default) => throw null; + + public static DifferentSpreadFloatDerived DifferentSpreadFloatDerived(float derivedProp = default, string name = default, IDictionary additionalProperties = default) => throw null; + + public static DifferentSpreadFloatRecord DifferentSpreadFloatRecord(string name = default, IDictionary additionalProperties = default) => throw null; + + public static DifferentSpreadStringDerived DifferentSpreadStringDerived(string derivedProp = default, float id = default, IDictionary additionalProperties = default) => throw null; + + public static DifferentSpreadStringRecord DifferentSpreadStringRecord(float id = default, IDictionary additionalProperties = default) => throw null; + + public static SpreadModelArrayRecord SpreadModelArrayRecord(IEnumerable knownProp = default, IDictionary> additionalProperties = default) => throw null; + + public static IsModelArrayAdditionalProperties IsModelArrayAdditionalProperties(IEnumerable knownProp = default, IDictionary> additionalProperties = default) => throw null; + + public static ExtendsModelArrayAdditionalProperties ExtendsModelArrayAdditionalProperties(IEnumerable knownProp = default, IDictionary> additionalProperties = default) => throw null; + + public static SpreadModelRecord SpreadModelRecord(ModelForRecord knownProp = default, IDictionary additionalProperties = default) => throw null; + + public static IsModelAdditionalProperties IsModelAdditionalProperties(ModelForRecord knownProp = default, IDictionary additionalProperties = default) => throw null; + + public static ExtendsModelAdditionalProperties ExtendsModelAdditionalProperties(ModelForRecord knownProp = default, IDictionary additionalProperties = default) => throw null; + + public static SpreadFloatRecord SpreadFloatRecord(float id = default, IDictionary additionalProperties = default) => throw null; + + public static IsFloatAdditionalProperties IsFloatAdditionalProperties(float id = default, IDictionary additionalProperties = default) => throw null; + + public static ExtendsFloatAdditionalProperties ExtendsFloatAdditionalProperties(float id = default, IDictionary additionalProperties = default) => throw null; + + public static SpreadStringRecord SpreadStringRecord(string name = default, IDictionary additionalProperties = default) => throw null; + + public static IsStringAdditionalProperties IsStringAdditionalProperties(string name = default, IDictionary additionalProperties = default) => throw null; + + public static ExtendsStringAdditionalProperties ExtendsStringAdditionalProperties(string name = default, IDictionary additionalProperties = default) => throw null; + + public static IsUnknownAdditionalPropertiesDiscriminated IsUnknownAdditionalPropertiesDiscriminated(string name = default, string kind = default, IDictionary additionalProperties = default) => throw null; + + public static IsUnknownAdditionalPropertiesDiscriminatedDerived IsUnknownAdditionalPropertiesDiscriminatedDerived(int index = default, float? age = default, string name = default, IDictionary additionalProperties = default) => throw null; + + public static IsUnknownAdditionalPropertiesDerived IsUnknownAdditionalPropertiesDerived(int index = default, float? age = default, string name = default, IDictionary additionalProperties = default) => throw null; + + public static IsUnknownAdditionalProperties IsUnknownAdditionalProperties(string name = default, IDictionary additionalProperties = default) => throw null; + + public static ExtendsUnknownAdditionalPropertiesDiscriminated ExtendsUnknownAdditionalPropertiesDiscriminated(string name = default, string kind = default, IDictionary additionalProperties = default) => throw null; + + public static ExtendsUnknownAdditionalPropertiesDiscriminatedDerived ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(int index = default, float? age = default, string name = default, IDictionary additionalProperties = default) => throw null; + + public static ExtendsUnknownAdditionalPropertiesDerived ExtendsUnknownAdditionalPropertiesDerived(int index = default, float? age = default, string name = default, IDictionary additionalProperties = default) => throw null; + + public static ExtendsUnknownAdditionalProperties ExtendsUnknownAdditionalProperties(string name = default, IDictionary additionalProperties = default) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/_Type.Property.AdditionalProperties.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/_Type.Property.AdditionalProperties.csproj new file mode 100644 index 0000000000..fdab703fed --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/_Type.Property.AdditionalProperties.csproj @@ -0,0 +1,16 @@ + + + This is the _Type.Property.AdditionalProperties client library for developing .NET applications with rich experience. + SDK Code Generation _Type.Property.AdditionalProperties + 1.0.0-beta.1 + _Type.Property.AdditionalProperties + netstandard2.0 + latest + true + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/tspCodeModel.json new file mode 100644 index 0000000000..fd5b4825c7 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/tspCodeModel.json @@ -0,0 +1,7864 @@ +{ + "$id": "1", + "Name": "Type.Property.AdditionalProperties", + "ApiVersions": [], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "WidgetData2_kind", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "kind1", + "value": "kind1", + "description": "kind1", + "valueType": { + "$ref": "3" + }, + "enumType": { + "$ref": "2" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The WidgetData2_kind", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "5", + "kind": "enum", + "name": "WidgetData1_kind", + "valueType": { + "$id": "6", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "7", + "kind": "enumvalue", + "name": "kind1", + "value": "kind1", + "description": "kind1", + "valueType": { + "$ref": "6" + }, + "enumType": { + "$ref": "5" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The WidgetData1_kind", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "8", + "kind": "enum", + "name": "WidgetData0_kind", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "10", + "kind": "enumvalue", + "name": "kind0", + "value": "kind0", + "description": "kind0", + "valueType": { + "$ref": "9" + }, + "enumType": { + "$ref": "8" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The WidgetData0_kind", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + } + ], + "Models": [ + { + "$id": "11", + "kind": "model", + "name": "SpreadRecordForNonDiscriminatedUnion3", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForNonDiscriminatedUnion3", + "usage": "Input,Output,Json", + "description": "The model spread Record", + "decorators": [], + "additionalProperties": { + "$id": "12", + "kind": "union", + "name": "SpreadRecordForNonDiscriminatedUnion3AdditionalProperty", + "variantTypes": [ + { + "$id": "13", + "kind": "array", + "name": "ArrayWidgetData2", + "valueType": { + "$id": "14", + "kind": "model", + "name": "WidgetData2", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData2", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "15", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "type": { + "$id": "16", + "kind": "constant", + "valueType": { + "$ref": "2" + }, + "value": "kind1", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData2.kind" + }, + { + "$id": "17", + "kind": "property", + "name": "start", + "serializedName": "start", + "type": { + "$id": "18", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData2.start" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "19", + "kind": "model", + "name": "WidgetData1", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData1", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "20", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "type": { + "$id": "21", + "kind": "constant", + "valueType": { + "$ref": "5" + }, + "value": "kind1", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData1.kind" + }, + { + "$id": "22", + "kind": "property", + "name": "start", + "serializedName": "start", + "type": { + "$id": "23", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "24", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData1.start" + }, + { + "$id": "25", + "kind": "property", + "name": "end", + "serializedName": "end", + "type": { + "$id": "26", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData1.end" + } + ] + } + ], + "decorators": [] + }, + "properties": [ + { + "$id": "28", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name property", + "type": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForNonDiscriminatedUnion3.name" + } + ] + }, + { + "$ref": "14" + }, + { + "$ref": "19" + }, + { + "$id": "30", + "kind": "model", + "name": "SpreadRecordForNonDiscriminatedUnion2", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForNonDiscriminatedUnion2", + "usage": "Input,Output,Json", + "description": "The model spread Record", + "decorators": [], + "additionalProperties": { + "$id": "31", + "kind": "union", + "name": "SpreadRecordForNonDiscriminatedUnion2AdditionalProperty", + "variantTypes": [ + { + "$ref": "14" + }, + { + "$ref": "19" + } + ], + "decorators": [] + }, + "properties": [ + { + "$id": "32", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name property", + "type": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForNonDiscriminatedUnion2.name" + } + ] + }, + { + "$id": "34", + "kind": "model", + "name": "SpreadRecordForNonDiscriminatedUnion", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForNonDiscriminatedUnion", + "usage": "Input,Output,Json", + "description": "The model spread Record", + "decorators": [], + "additionalProperties": { + "$id": "35", + "kind": "union", + "name": "SpreadRecordForNonDiscriminatedUnionAdditionalProperty", + "variantTypes": [ + { + "$id": "36", + "kind": "model", + "name": "WidgetData0", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData0", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "37", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "type": { + "$id": "38", + "kind": "constant", + "valueType": { + "$ref": "8" + }, + "value": "kind0", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData0.kind" + }, + { + "$id": "39", + "kind": "property", + "name": "fooProp", + "serializedName": "fooProp", + "type": { + "$id": "40", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData0.fooProp" + } + ] + }, + { + "$ref": "19" + } + ], + "decorators": [] + }, + "properties": [ + { + "$id": "41", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name property", + "type": { + "$id": "42", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForNonDiscriminatedUnion.name" + } + ] + }, + { + "$ref": "36" + }, + { + "$id": "43", + "kind": "model", + "name": "SpreadRecordForDiscriminatedUnion", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForDiscriminatedUnion", + "usage": "Input,Output,Json", + "description": "The model spread Record", + "decorators": [], + "additionalProperties": { + "$id": "44", + "kind": "union", + "name": "WidgetData", + "variantTypes": [ + { + "$ref": "36" + }, + { + "$ref": "19" + } + ], + "decorators": [] + }, + "properties": [ + { + "$id": "45", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name property", + "type": { + "$id": "46", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForDiscriminatedUnion.name" + } + ] + }, + { + "$id": "47", + "kind": "model", + "name": "SpreadRecordForUnion", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForUnion", + "usage": "Input,Output,Json", + "description": "The model spread Record", + "decorators": [], + "additionalProperties": { + "$id": "48", + "kind": "union", + "name": "SpreadRecordForUnionAdditionalProperty", + "variantTypes": [ + { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "50", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + ], + "decorators": [] + }, + "properties": [ + { + "$id": "51", + "kind": "property", + "name": "flag", + "serializedName": "flag", + "description": "The name property", + "type": { + "$id": "52", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForUnion.flag" + } + ] + }, + { + "$id": "53", + "kind": "model", + "name": "MultipleSpreadRecord", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.MultipleSpreadRecord", + "usage": "Input,Output,Json", + "description": "The model spread Record and Record", + "decorators": [], + "additionalProperties": { + "$id": "54", + "kind": "union", + "name": "MultipleSpreadRecordAdditionalProperty", + "variantTypes": [ + { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "56", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + ], + "decorators": [] + }, + "properties": [ + { + "$id": "57", + "kind": "property", + "name": "flag", + "serializedName": "flag", + "description": "The name property", + "type": { + "$id": "58", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.MultipleSpreadRecord.flag" + } + ] + }, + { + "$id": "59", + "kind": "model", + "name": "DifferentSpreadModelArrayDerived", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadModelArrayDerived", + "usage": "Input,Output,Json", + "description": "The model extends from a model that spread Record with the different known property type", + "decorators": [], + "baseModel": { + "$id": "60", + "kind": "model", + "name": "DifferentSpreadModelArrayRecord", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadModelArrayRecord", + "usage": "Input,Output,Json", + "description": "The model spread Record with the different known property type", + "decorators": [], + "additionalProperties": { + "$id": "61", + "kind": "array", + "name": "ArrayModelForRecord", + "valueType": { + "$id": "62", + "kind": "model", + "name": "ModelForRecord", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ModelForRecord", + "usage": "Input,Output,Json", + "description": "model for record", + "decorators": [], + "properties": [ + { + "$id": "63", + "kind": "property", + "name": "state", + "serializedName": "state", + "description": "The state property", + "type": { + "$id": "64", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ModelForRecord.state" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "properties": [ + { + "$id": "65", + "kind": "property", + "name": "knownProp", + "serializedName": "knownProp", + "type": { + "$id": "66", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadModelArrayRecord.knownProp" + } + ] + }, + "properties": [ + { + "$id": "67", + "kind": "property", + "name": "derivedProp", + "serializedName": "derivedProp", + "description": "The index property", + "type": { + "$id": "68", + "kind": "array", + "name": "ArrayModelForRecord", + "valueType": { + "$ref": "62" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadModelArrayDerived.derivedProp" + } + ] + }, + { + "$ref": "62" + }, + { + "$ref": "60" + }, + { + "$id": "69", + "kind": "model", + "name": "DifferentSpreadModelDerived", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadModelDerived", + "usage": "Input,Output,Json", + "description": "The model extends from a model that spread Record with the different known property type", + "decorators": [], + "baseModel": { + "$id": "70", + "kind": "model", + "name": "DifferentSpreadModelRecord", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadModelRecord", + "usage": "Input,Output,Json", + "description": "The model spread Record with the different known property type", + "decorators": [], + "additionalProperties": { + "$ref": "62" + }, + "properties": [ + { + "$id": "71", + "kind": "property", + "name": "knownProp", + "serializedName": "knownProp", + "type": { + "$id": "72", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadModelRecord.knownProp" + } + ] + }, + "properties": [ + { + "$id": "73", + "kind": "property", + "name": "derivedProp", + "serializedName": "derivedProp", + "description": "The index property", + "type": { + "$ref": "62" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadModelDerived.derivedProp" + } + ] + }, + { + "$ref": "70" + }, + { + "$id": "74", + "kind": "model", + "name": "DifferentSpreadFloatDerived", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadFloatDerived", + "usage": "Input,Output,Json", + "description": "The model extends from a model that spread Record with the different known property type", + "decorators": [], + "baseModel": { + "$id": "75", + "kind": "model", + "name": "DifferentSpreadFloatRecord", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadFloatRecord", + "usage": "Input,Output,Json", + "description": "The model spread Record with the different known property type", + "decorators": [], + "additionalProperties": { + "$id": "76", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "properties": [ + { + "$id": "77", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The id property", + "type": { + "$id": "78", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadFloatRecord.name" + } + ] + }, + "properties": [ + { + "$id": "79", + "kind": "property", + "name": "derivedProp", + "serializedName": "derivedProp", + "description": "The index property", + "type": { + "$id": "80", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadFloatDerived.derivedProp" + } + ] + }, + { + "$ref": "75" + }, + { + "$id": "81", + "kind": "model", + "name": "DifferentSpreadStringDerived", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadStringDerived", + "usage": "Input,Output,Json", + "description": "The model extends from a model that spread Record with the different known property type", + "decorators": [], + "baseModel": { + "$id": "82", + "kind": "model", + "name": "DifferentSpreadStringRecord", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadStringRecord", + "usage": "Input,Output,Json", + "description": "The model spread Record with the different known property type", + "decorators": [], + "additionalProperties": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "properties": [ + { + "$id": "84", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The name property", + "type": { + "$id": "85", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadStringRecord.id" + } + ] + }, + "properties": [ + { + "$id": "86", + "kind": "property", + "name": "derivedProp", + "serializedName": "derivedProp", + "description": "The index property", + "type": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadStringDerived.derivedProp" + } + ] + }, + { + "$ref": "82" + }, + { + "$id": "88", + "kind": "model", + "name": "SpreadModelArrayRecord", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModelArrayRecord", + "usage": "Input,Output,Json", + "decorators": [], + "additionalProperties": { + "$id": "89", + "kind": "array", + "name": "ArrayModelForRecord", + "valueType": { + "$ref": "62" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "properties": [ + { + "$id": "90", + "kind": "property", + "name": "knownProp", + "serializedName": "knownProp", + "type": { + "$id": "91", + "kind": "array", + "name": "ArrayModelForRecord", + "valueType": { + "$ref": "62" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModelArrayRecord.knownProp" + } + ] + }, + { + "$id": "92", + "kind": "model", + "name": "IsModelArrayAdditionalProperties", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModelArrayAdditionalProperties", + "usage": "Input,Output,Json", + "description": "The model is from Record type.", + "decorators": [], + "additionalProperties": { + "$id": "93", + "kind": "array", + "name": "ArrayModelForRecord", + "valueType": { + "$ref": "62" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "properties": [ + { + "$id": "94", + "kind": "property", + "name": "knownProp", + "serializedName": "knownProp", + "type": { + "$id": "95", + "kind": "array", + "name": "ArrayModelForRecord", + "valueType": { + "$ref": "62" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModelArrayAdditionalProperties.knownProp" + } + ] + }, + { + "$id": "96", + "kind": "model", + "name": "ExtendsModelArrayAdditionalProperties", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModelArrayAdditionalProperties", + "usage": "Input,Output,Json", + "description": "The model extends from Record type.", + "decorators": [], + "additionalProperties": { + "$id": "97", + "kind": "array", + "name": "ArrayModelForRecord", + "valueType": { + "$ref": "62" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "properties": [ + { + "$id": "98", + "kind": "property", + "name": "knownProp", + "serializedName": "knownProp", + "type": { + "$id": "99", + "kind": "array", + "name": "ArrayModelForRecord", + "valueType": { + "$ref": "62" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModelArrayAdditionalProperties.knownProp" + } + ] + }, + { + "$id": "100", + "kind": "model", + "name": "SpreadModelRecord", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModelRecord", + "usage": "Input,Output,Json", + "description": "The model spread Record with the same known property type", + "decorators": [], + "additionalProperties": { + "$ref": "62" + }, + "properties": [ + { + "$id": "101", + "kind": "property", + "name": "knownProp", + "serializedName": "knownProp", + "type": { + "$ref": "62" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModelRecord.knownProp" + } + ] + }, + { + "$id": "102", + "kind": "model", + "name": "IsModelAdditionalProperties", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModelAdditionalProperties", + "usage": "Input,Output,Json", + "description": "The model is from Record type.", + "decorators": [], + "additionalProperties": { + "$ref": "62" + }, + "properties": [ + { + "$id": "103", + "kind": "property", + "name": "knownProp", + "serializedName": "knownProp", + "type": { + "$ref": "62" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModelAdditionalProperties.knownProp" + } + ] + }, + { + "$id": "104", + "kind": "model", + "name": "ExtendsModelAdditionalProperties", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModelAdditionalProperties", + "usage": "Input,Output,Json", + "description": "The model extends from Record type.", + "decorators": [], + "additionalProperties": { + "$ref": "62" + }, + "properties": [ + { + "$id": "105", + "kind": "property", + "name": "knownProp", + "serializedName": "knownProp", + "type": { + "$ref": "62" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModelAdditionalProperties.knownProp" + } + ] + }, + { + "$id": "106", + "kind": "model", + "name": "SpreadFloatRecord", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadFloatRecord", + "usage": "Input,Output,Json", + "description": "The model spread Record with the same known property type", + "decorators": [], + "additionalProperties": { + "$id": "107", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "properties": [ + { + "$id": "108", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The id property", + "type": { + "$id": "109", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadFloatRecord.id" + } + ] + }, + { + "$id": "110", + "kind": "model", + "name": "IsFloatAdditionalProperties", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsFloatAdditionalProperties", + "usage": "Input,Output,Json", + "description": "The model is from Record type.", + "decorators": [], + "additionalProperties": { + "$id": "111", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "properties": [ + { + "$id": "112", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The id property", + "type": { + "$id": "113", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsFloatAdditionalProperties.id" + } + ] + }, + { + "$id": "114", + "kind": "model", + "name": "ExtendsFloatAdditionalProperties", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsFloatAdditionalProperties", + "usage": "Input,Output,Json", + "description": "The model extends from Record type.", + "decorators": [], + "additionalProperties": { + "$id": "115", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "properties": [ + { + "$id": "116", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The id property", + "type": { + "$id": "117", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsFloatAdditionalProperties.id" + } + ] + }, + { + "$id": "118", + "kind": "model", + "name": "SpreadStringRecord", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadStringRecord", + "usage": "Input,Output,Json", + "description": "The model spread Record with the same known property type", + "decorators": [], + "additionalProperties": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "properties": [ + { + "$id": "120", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name property", + "type": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadStringRecord.name" + } + ] + }, + { + "$id": "122", + "kind": "model", + "name": "IsStringAdditionalProperties", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsStringAdditionalProperties", + "usage": "Input,Output,Json", + "description": "The model is from Record type.", + "decorators": [], + "additionalProperties": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "properties": [ + { + "$id": "124", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name property", + "type": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsStringAdditionalProperties.name" + } + ] + }, + { + "$id": "126", + "kind": "model", + "name": "ExtendsStringAdditionalProperties", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsStringAdditionalProperties", + "usage": "Input,Output,Json", + "description": "The model extends from Record type.", + "decorators": [], + "additionalProperties": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "properties": [ + { + "$id": "128", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name property", + "type": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsStringAdditionalProperties.name" + } + ] + }, + { + "$id": "130", + "kind": "model", + "name": "IsUnknownAdditionalPropertiesDiscriminated", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDiscriminated", + "usage": "Input,Output,Json", + "description": "The model is Record with a discriminator.", + "decorators": [], + "additionalProperties": { + "$id": "131", + "kind": "any", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "discriminatorProperty": { + "$id": "132", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "The discriminator", + "type": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDiscriminated.kind" + }, + "properties": [ + { + "$id": "134", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name property", + "type": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDiscriminated.name" + }, + { + "$ref": "132" + } + ], + "discriminatedSubtypes": { + "$id": "136", + "derived": { + "$id": "137", + "kind": "model", + "name": "IsUnknownAdditionalPropertiesDiscriminatedDerived", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDiscriminatedDerived", + "usage": "Input,Output,Json", + "description": "The derived discriminated type", + "discriminatorValue": "derived", + "decorators": [], + "baseModel": { + "$ref": "130" + }, + "properties": [ + { + "$id": "138", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "type": { + "$id": "139", + "kind": "constant", + "valueType": { + "$id": "140", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "derived", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDiscriminatedDerived.kind" + }, + { + "$id": "141", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index property", + "type": { + "$id": "142", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDiscriminatedDerived.index" + }, + { + "$id": "143", + "kind": "property", + "name": "age", + "serializedName": "age", + "description": "The age property", + "type": { + "$id": "144", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDiscriminatedDerived.age" + } + ] + } + } + }, + { + "$ref": "137" + }, + { + "$id": "145", + "kind": "model", + "name": "IsUnknownAdditionalPropertiesDerived", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDerived", + "usage": "Input,Output,Json", + "description": "The model extends from a type that is Record type", + "decorators": [], + "baseModel": { + "$id": "146", + "kind": "model", + "name": "IsUnknownAdditionalProperties", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalProperties", + "usage": "Input,Output,Json", + "description": "The model is from Record type.", + "decorators": [], + "additionalProperties": { + "$id": "147", + "kind": "any", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "properties": [ + { + "$id": "148", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name property", + "type": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalProperties.name" + } + ] + }, + "properties": [ + { + "$id": "150", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index property", + "type": { + "$id": "151", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDerived.index" + }, + { + "$id": "152", + "kind": "property", + "name": "age", + "serializedName": "age", + "description": "The age property", + "type": { + "$id": "153", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDerived.age" + } + ] + }, + { + "$ref": "146" + }, + { + "$id": "154", + "kind": "model", + "name": "ExtendsUnknownAdditionalPropertiesDiscriminated", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDiscriminated", + "usage": "Input,Output,Json", + "description": "The model extends from Record with a discriminator.", + "decorators": [], + "additionalProperties": { + "$id": "155", + "kind": "any", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "discriminatorProperty": { + "$id": "156", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "The discriminator", + "type": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDiscriminated.kind" + }, + "properties": [ + { + "$id": "158", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name property", + "type": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDiscriminated.name" + }, + { + "$ref": "156" + } + ], + "discriminatedSubtypes": { + "$id": "160", + "derived": { + "$id": "161", + "kind": "model", + "name": "ExtendsUnknownAdditionalPropertiesDiscriminatedDerived", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDiscriminatedDerived", + "usage": "Input,Output,Json", + "description": "The derived discriminated type", + "discriminatorValue": "derived", + "decorators": [], + "baseModel": { + "$ref": "154" + }, + "properties": [ + { + "$id": "162", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "type": { + "$id": "163", + "kind": "constant", + "valueType": { + "$id": "164", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "derived", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.kind" + }, + { + "$id": "165", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index property", + "type": { + "$id": "166", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.index" + }, + { + "$id": "167", + "kind": "property", + "name": "age", + "serializedName": "age", + "description": "The age property", + "type": { + "$id": "168", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.age" + } + ] + } + } + }, + { + "$ref": "161" + }, + { + "$id": "169", + "kind": "model", + "name": "ExtendsUnknownAdditionalPropertiesDerived", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDerived", + "usage": "Input,Output,Json", + "description": "The model extends from a type that extends from Record.", + "decorators": [], + "baseModel": { + "$id": "170", + "kind": "model", + "name": "ExtendsUnknownAdditionalProperties", + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalProperties", + "usage": "Input,Output,Json", + "description": "The model extends from Record type.", + "decorators": [], + "additionalProperties": { + "$id": "171", + "kind": "any", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "properties": [ + { + "$id": "172", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name property", + "type": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalProperties.name" + } + ] + }, + "properties": [ + { + "$id": "174", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index property", + "type": { + "$id": "175", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDerived.index" + }, + { + "$id": "176", + "kind": "property", + "name": "age", + "serializedName": "age", + "description": "The age property", + "type": { + "$id": "177", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDerived.age" + } + ] + }, + { + "$ref": "170" + } + ], + "Clients": [ + { + "$id": "178", + "Name": "AdditionalPropertiesClient", + "Description": "Tests for additional properties of models", + "Operations": [], + "Protocol": { + "$id": "179" + }, + "Parameters": [ + { + "$id": "180", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "181", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "182", + "Type": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + } + ], + "Decorators": [] + }, + { + "$id": "184", + "Name": "ExtendsUnknown", + "Operations": [ + { + "$id": "185", + "Name": "get", + "ResourceName": "ExtendsUnknown", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "186", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "187", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "188", + "Type": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "190", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "191", + "kind": "constant", + "valueType": { + "$id": "192", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "193", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "170" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsRecordUnknown", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknown.get", + "Decorators": [] + }, + { + "$id": "194", + "Name": "put", + "ResourceName": "ExtendsUnknown", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "186" + }, + { + "$id": "195", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "196", + "kind": "constant", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "198", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "170" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "199", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsRecordUnknown", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknown.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "200" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "186" + } + ], + "Decorators": [] + }, + { + "$id": "201", + "Name": "ExtendsUnknownDerived", + "Operations": [ + { + "$id": "202", + "Name": "get", + "ResourceName": "ExtendsUnknownDerived", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "203", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "204", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "205", + "Type": { + "$id": "206", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "207", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "208", + "kind": "constant", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "210", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "169" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsRecordUnknownDerived", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownDerived.get", + "Decorators": [] + }, + { + "$id": "211", + "Name": "put", + "ResourceName": "ExtendsUnknownDerived", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "203" + }, + { + "$id": "212", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "213", + "kind": "constant", + "valueType": { + "$id": "214", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "215", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "169" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "216", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsRecordUnknownDerived", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownDerived.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "217" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "203" + } + ], + "Decorators": [] + }, + { + "$id": "218", + "Name": "ExtendsUnknownDiscriminated", + "Operations": [ + { + "$id": "219", + "Name": "get", + "ResourceName": "ExtendsUnknownDiscriminated", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "220", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "221", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "222", + "Type": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "224", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "225", + "kind": "constant", + "valueType": { + "$id": "226", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "227", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "154" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsUnknownDiscriminated", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated.get", + "Decorators": [] + }, + { + "$id": "228", + "Name": "put", + "ResourceName": "ExtendsUnknownDiscriminated", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "220" + }, + { + "$id": "229", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "230", + "kind": "constant", + "valueType": { + "$id": "231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "232", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "154" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "233", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsUnknownDiscriminated", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "234" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "220" + } + ], + "Decorators": [] + }, + { + "$id": "235", + "Name": "IsUnknown", + "Operations": [ + { + "$id": "236", + "Name": "get", + "ResourceName": "IsUnknown", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "237", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "238", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "239", + "Type": { + "$id": "240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "241", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "242", + "kind": "constant", + "valueType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "244", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "146" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isRecordUnknown", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknown.get", + "Decorators": [] + }, + { + "$id": "245", + "Name": "put", + "ResourceName": "IsUnknown", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "237" + }, + { + "$id": "246", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "247", + "kind": "constant", + "valueType": { + "$id": "248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "249", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "146" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "250", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isRecordUnknown", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknown.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "251" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "237" + } + ], + "Decorators": [] + }, + { + "$id": "252", + "Name": "IsUnknownDerived", + "Operations": [ + { + "$id": "253", + "Name": "get", + "ResourceName": "IsUnknownDerived", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "254", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "255", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "256", + "Type": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "258", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "259", + "kind": "constant", + "valueType": { + "$id": "260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "261", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "145" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isRecordUnknownDerived", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownDerived.get", + "Decorators": [] + }, + { + "$id": "262", + "Name": "put", + "ResourceName": "IsUnknownDerived", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "254" + }, + { + "$id": "263", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "264", + "kind": "constant", + "valueType": { + "$id": "265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "266", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "145" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "267", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isRecordUnknownDerived", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownDerived.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "268" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "254" + } + ], + "Decorators": [] + }, + { + "$id": "269", + "Name": "IsUnknownDiscriminated", + "Operations": [ + { + "$id": "270", + "Name": "get", + "ResourceName": "IsUnknownDiscriminated", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "271", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "272", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "273", + "Type": { + "$id": "274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "275", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "276", + "kind": "constant", + "valueType": { + "$id": "277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "278", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "130" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isUnknownDiscriminated", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownDiscriminated.get", + "Decorators": [] + }, + { + "$id": "279", + "Name": "put", + "ResourceName": "IsUnknownDiscriminated", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "271" + }, + { + "$id": "280", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "281", + "kind": "constant", + "valueType": { + "$id": "282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "283", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "130" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "284", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isUnknownDiscriminated", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownDiscriminated.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "285" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "271" + } + ], + "Decorators": [] + }, + { + "$id": "286", + "Name": "ExtendsString", + "Operations": [ + { + "$id": "287", + "Name": "get", + "ResourceName": "ExtendsString", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "288", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "289", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "290", + "Type": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "292", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "293", + "kind": "constant", + "valueType": { + "$id": "294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "295", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "126" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsRecordString", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsString.get", + "Decorators": [] + }, + { + "$id": "296", + "Name": "put", + "ResourceName": "ExtendsString", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "288" + }, + { + "$id": "297", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "298", + "kind": "constant", + "valueType": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "300", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "126" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "301", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsRecordString", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsString.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "302" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "288" + } + ], + "Decorators": [] + }, + { + "$id": "303", + "Name": "IsString", + "Operations": [ + { + "$id": "304", + "Name": "get", + "ResourceName": "IsString", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "305", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "306", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "307", + "Type": { + "$id": "308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "309", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "310", + "kind": "constant", + "valueType": { + "$id": "311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "312", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "122" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isRecordstring", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsString.get", + "Decorators": [] + }, + { + "$id": "313", + "Name": "put", + "ResourceName": "IsString", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "305" + }, + { + "$id": "314", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "315", + "kind": "constant", + "valueType": { + "$id": "316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "317", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "122" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "318", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isRecordstring", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsString.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "319" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "305" + } + ], + "Decorators": [] + }, + { + "$id": "320", + "Name": "SpreadString", + "Operations": [ + { + "$id": "321", + "Name": "get", + "ResourceName": "SpreadString", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "322", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "323", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "324", + "Type": { + "$id": "325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "326", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "327", + "kind": "constant", + "valueType": { + "$id": "328", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "329", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "118" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordString", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadString.get", + "Decorators": [] + }, + { + "$id": "330", + "Name": "put", + "ResourceName": "SpreadString", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "322" + }, + { + "$id": "331", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "332", + "kind": "constant", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "334", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "118" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "335", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordString", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadString.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "336" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "322" + } + ], + "Decorators": [] + }, + { + "$id": "337", + "Name": "ExtendsFloat", + "Operations": [ + { + "$id": "338", + "Name": "get", + "ResourceName": "ExtendsFloat", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "339", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "340", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "341", + "Type": { + "$id": "342", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "343", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "344", + "kind": "constant", + "valueType": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "346", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "114" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsRecordFloat", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsFloat.get", + "Decorators": [] + }, + { + "$id": "347", + "Name": "put", + "ResourceName": "ExtendsFloat", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "339" + }, + { + "$id": "348", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "349", + "kind": "constant", + "valueType": { + "$id": "350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "351", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "114" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "352", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsRecordFloat", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsFloat.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "353" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "339" + } + ], + "Decorators": [] + }, + { + "$id": "354", + "Name": "IsFloat", + "Operations": [ + { + "$id": "355", + "Name": "get", + "ResourceName": "IsFloat", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "356", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "357", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "358", + "Type": { + "$id": "359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "360", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "361", + "kind": "constant", + "valueType": { + "$id": "362", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "363", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "110" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isRecordFloat", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsFloat.get", + "Decorators": [] + }, + { + "$id": "364", + "Name": "put", + "ResourceName": "IsFloat", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "356" + }, + { + "$id": "365", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "366", + "kind": "constant", + "valueType": { + "$id": "367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "368", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "110" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "369", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isRecordFloat", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsFloat.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "370" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "356" + } + ], + "Decorators": [] + }, + { + "$id": "371", + "Name": "SpreadFloat", + "Operations": [ + { + "$id": "372", + "Name": "get", + "ResourceName": "SpreadFloat", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "373", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "374", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "375", + "Type": { + "$id": "376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "377", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "378", + "kind": "constant", + "valueType": { + "$id": "379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "380", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "106" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordFloat", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadFloat.get", + "Decorators": [] + }, + { + "$id": "381", + "Name": "put", + "ResourceName": "SpreadFloat", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "373" + }, + { + "$id": "382", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "383", + "kind": "constant", + "valueType": { + "$id": "384", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "385", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "106" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "386", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordFloat", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadFloat.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "387" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "373" + } + ], + "Decorators": [] + }, + { + "$id": "388", + "Name": "ExtendsModel", + "Operations": [ + { + "$id": "389", + "Name": "get", + "ResourceName": "ExtendsModel", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "390", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "391", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "392", + "Type": { + "$id": "393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "394", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "395", + "kind": "constant", + "valueType": { + "$id": "396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "397", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "104" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsRecordModel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModel.get", + "Decorators": [] + }, + { + "$id": "398", + "Name": "put", + "ResourceName": "ExtendsModel", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "390" + }, + { + "$id": "399", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "400", + "kind": "constant", + "valueType": { + "$id": "401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "402", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "104" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "403", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsRecordModel", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModel.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "404" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "390" + } + ], + "Decorators": [] + }, + { + "$id": "405", + "Name": "IsModel", + "Operations": [ + { + "$id": "406", + "Name": "get", + "ResourceName": "IsModel", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "407", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "408", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "409", + "Type": { + "$id": "410", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "411", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "412", + "kind": "constant", + "valueType": { + "$id": "413", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "414", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "102" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isRecordModel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModel.get", + "Decorators": [] + }, + { + "$id": "415", + "Name": "put", + "ResourceName": "IsModel", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "407" + }, + { + "$id": "416", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "417", + "kind": "constant", + "valueType": { + "$id": "418", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "419", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "102" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "420", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isRecordModel", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModel.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "421" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "407" + } + ], + "Decorators": [] + }, + { + "$id": "422", + "Name": "SpreadModel", + "Operations": [ + { + "$id": "423", + "Name": "get", + "ResourceName": "SpreadModel", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "424", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "425", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "426", + "Type": { + "$id": "427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "428", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "429", + "kind": "constant", + "valueType": { + "$id": "430", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "431", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "100" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordModel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModel.get", + "Decorators": [] + }, + { + "$id": "432", + "Name": "put", + "ResourceName": "SpreadModel", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "424" + }, + { + "$id": "433", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "434", + "kind": "constant", + "valueType": { + "$id": "435", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "436", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "100" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "437", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordModel", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModel.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "438" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "424" + } + ], + "Decorators": [] + }, + { + "$id": "439", + "Name": "ExtendsModelArray", + "Operations": [ + { + "$id": "440", + "Name": "get", + "ResourceName": "ExtendsModelArray", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "441", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "442", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "443", + "Type": { + "$id": "444", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "445", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "446", + "kind": "constant", + "valueType": { + "$id": "447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "448", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "96" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsRecordModelArray", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModelArray.get", + "Decorators": [] + }, + { + "$id": "449", + "Name": "put", + "ResourceName": "ExtendsModelArray", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "441" + }, + { + "$id": "450", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "451", + "kind": "constant", + "valueType": { + "$id": "452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "453", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "96" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "454", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsRecordModelArray", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModelArray.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "455" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "441" + } + ], + "Decorators": [] + }, + { + "$id": "456", + "Name": "IsModelArray", + "Operations": [ + { + "$id": "457", + "Name": "get", + "ResourceName": "IsModelArray", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "458", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "459", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "460", + "Type": { + "$id": "461", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "462", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "463", + "kind": "constant", + "valueType": { + "$id": "464", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "465", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "92" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isRecordModelArray", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModelArray.get", + "Decorators": [] + }, + { + "$id": "466", + "Name": "put", + "ResourceName": "IsModelArray", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "458" + }, + { + "$id": "467", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "468", + "kind": "constant", + "valueType": { + "$id": "469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "470", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "92" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "471", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/isRecordModelArray", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModelArray.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "472" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "458" + } + ], + "Decorators": [] + }, + { + "$id": "473", + "Name": "SpreadModelArray", + "Operations": [ + { + "$id": "474", + "Name": "get", + "ResourceName": "SpreadModelArray", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "475", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "476", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "477", + "Type": { + "$id": "478", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "479", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "480", + "kind": "constant", + "valueType": { + "$id": "481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "482", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "88" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordModelArray", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModelArray.get", + "Decorators": [] + }, + { + "$id": "483", + "Name": "put", + "ResourceName": "SpreadModelArray", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "475" + }, + { + "$id": "484", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "485", + "kind": "constant", + "valueType": { + "$id": "486", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "487", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "88" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "488", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordModelArray", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModelArray.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "489" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "475" + } + ], + "Decorators": [] + }, + { + "$id": "490", + "Name": "SpreadDifferentString", + "Operations": [ + { + "$id": "491", + "Name": "get", + "ResourceName": "SpreadDifferentString", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "492", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "493", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "494", + "Type": { + "$id": "495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "496", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "497", + "kind": "constant", + "valueType": { + "$id": "498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "499", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "82" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadDifferentRecordString", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentString.get", + "Decorators": [] + }, + { + "$id": "500", + "Name": "put", + "ResourceName": "SpreadDifferentString", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "492" + }, + { + "$id": "501", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "502", + "kind": "constant", + "valueType": { + "$id": "503", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "504", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "82" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "505", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadDifferentRecordString", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentString.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "506" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "492" + } + ], + "Decorators": [] + }, + { + "$id": "507", + "Name": "SpreadDifferentFloat", + "Operations": [ + { + "$id": "508", + "Name": "get", + "ResourceName": "SpreadDifferentFloat", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "509", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "510", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "511", + "Type": { + "$id": "512", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "513", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "514", + "kind": "constant", + "valueType": { + "$id": "515", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "516", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "75" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadDifferentRecordFloat", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentFloat.get", + "Decorators": [] + }, + { + "$id": "517", + "Name": "put", + "ResourceName": "SpreadDifferentFloat", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "509" + }, + { + "$id": "518", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "519", + "kind": "constant", + "valueType": { + "$id": "520", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "521", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "75" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "522", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadDifferentRecordFloat", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentFloat.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "523" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "509" + } + ], + "Decorators": [] + }, + { + "$id": "524", + "Name": "SpreadDifferentModel", + "Operations": [ + { + "$id": "525", + "Name": "get", + "ResourceName": "SpreadDifferentModel", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "526", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "527", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "528", + "Type": { + "$id": "529", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "530", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "531", + "kind": "constant", + "valueType": { + "$id": "532", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "533", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "70" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadDifferentRecordModel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentModel.get", + "Decorators": [] + }, + { + "$id": "534", + "Name": "put", + "ResourceName": "SpreadDifferentModel", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "526" + }, + { + "$id": "535", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "536", + "kind": "constant", + "valueType": { + "$id": "537", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "538", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "70" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "539", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadDifferentRecordModel", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentModel.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "540" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "526" + } + ], + "Decorators": [] + }, + { + "$id": "541", + "Name": "SpreadDifferentModelArray", + "Operations": [ + { + "$id": "542", + "Name": "get", + "ResourceName": "SpreadDifferentModelArray", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "543", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "544", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "545", + "Type": { + "$id": "546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "547", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "548", + "kind": "constant", + "valueType": { + "$id": "549", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "550", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "60" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadDifferentRecordModelArray", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentModelArray.get", + "Decorators": [] + }, + { + "$id": "551", + "Name": "put", + "ResourceName": "SpreadDifferentModelArray", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "543" + }, + { + "$id": "552", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "553", + "kind": "constant", + "valueType": { + "$id": "554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "555", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "60" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "556", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadDifferentRecordModelArray", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentModelArray.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "557" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "543" + } + ], + "Decorators": [] + }, + { + "$id": "558", + "Name": "ExtendsDifferentSpreadString", + "Operations": [ + { + "$id": "559", + "Name": "get", + "ResourceName": "ExtendsDifferentSpreadString", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "560", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "561", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "562", + "Type": { + "$id": "563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "564", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "565", + "kind": "constant", + "valueType": { + "$id": "566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "567", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "81" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsDifferentSpreadString", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString.get", + "Decorators": [] + }, + { + "$id": "568", + "Name": "put", + "ResourceName": "ExtendsDifferentSpreadString", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "560" + }, + { + "$id": "569", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "570", + "kind": "constant", + "valueType": { + "$id": "571", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "572", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "81" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "573", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsDifferentSpreadString", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "574" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "560" + } + ], + "Decorators": [] + }, + { + "$id": "575", + "Name": "ExtendsDifferentSpreadFloat", + "Operations": [ + { + "$id": "576", + "Name": "get", + "ResourceName": "ExtendsDifferentSpreadFloat", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "577", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "578", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "579", + "Type": { + "$id": "580", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "581", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "582", + "kind": "constant", + "valueType": { + "$id": "583", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "584", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "74" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsDifferentSpreadFloat", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat.get", + "Decorators": [] + }, + { + "$id": "585", + "Name": "put", + "ResourceName": "ExtendsDifferentSpreadFloat", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "577" + }, + { + "$id": "586", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "587", + "kind": "constant", + "valueType": { + "$id": "588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "589", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "74" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "590", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsDifferentSpreadFloat", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "591" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "577" + } + ], + "Decorators": [] + }, + { + "$id": "592", + "Name": "ExtendsDifferentSpreadModel", + "Operations": [ + { + "$id": "593", + "Name": "get", + "ResourceName": "ExtendsDifferentSpreadModel", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "594", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "595", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "596", + "Type": { + "$id": "597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "598", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "599", + "kind": "constant", + "valueType": { + "$id": "600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "601", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "69" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsDifferentSpreadModel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel.get", + "Decorators": [] + }, + { + "$id": "602", + "Name": "put", + "ResourceName": "ExtendsDifferentSpreadModel", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "594" + }, + { + "$id": "603", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "604", + "kind": "constant", + "valueType": { + "$id": "605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "606", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "69" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "607", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsDifferentSpreadModel", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "608" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "594" + } + ], + "Decorators": [] + }, + { + "$id": "609", + "Name": "ExtendsDifferentSpreadModelArray", + "Operations": [ + { + "$id": "610", + "Name": "get", + "ResourceName": "ExtendsDifferentSpreadModelArray", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "611", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "612", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "613", + "Type": { + "$id": "614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "615", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "616", + "kind": "constant", + "valueType": { + "$id": "617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "618", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "59" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsDifferentSpreadModelArray", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray.get", + "Decorators": [] + }, + { + "$id": "619", + "Name": "put", + "ResourceName": "ExtendsDifferentSpreadModelArray", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "611" + }, + { + "$id": "620", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "621", + "kind": "constant", + "valueType": { + "$id": "622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "623", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "59" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "624", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/extendsDifferentSpreadModelArray", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "625" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "611" + } + ], + "Decorators": [] + }, + { + "$id": "626", + "Name": "MultipleSpread", + "Operations": [ + { + "$id": "627", + "Name": "get", + "ResourceName": "MultipleSpread", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "628", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "629", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "630", + "Type": { + "$id": "631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "632", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "633", + "kind": "constant", + "valueType": { + "$id": "634", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "635", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "53" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/multipleSpreadRecord", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.MultipleSpread.get", + "Decorators": [] + }, + { + "$id": "636", + "Name": "put", + "ResourceName": "MultipleSpread", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "628" + }, + { + "$id": "637", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "638", + "kind": "constant", + "valueType": { + "$id": "639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "640", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "53" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "641", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/multipleSpreadRecord", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.MultipleSpread.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "642" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "628" + } + ], + "Decorators": [] + }, + { + "$id": "643", + "Name": "SpreadRecordUnion", + "Operations": [ + { + "$id": "644", + "Name": "get", + "ResourceName": "SpreadRecordUnion", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "645", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "646", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "647", + "Type": { + "$id": "648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "649", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "650", + "kind": "constant", + "valueType": { + "$id": "651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "652", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "47" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordUnion", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordUnion.get", + "Decorators": [] + }, + { + "$id": "653", + "Name": "put", + "ResourceName": "SpreadRecordUnion", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "645" + }, + { + "$id": "654", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "655", + "kind": "constant", + "valueType": { + "$id": "656", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "657", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "47" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "658", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordUnion", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordUnion.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "659" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "645" + } + ], + "Decorators": [] + }, + { + "$id": "660", + "Name": "SpreadRecordDiscriminatedUnion", + "Operations": [ + { + "$id": "661", + "Name": "get", + "ResourceName": "SpreadRecordDiscriminatedUnion", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "662", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "663", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "664", + "Type": { + "$id": "665", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "666", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "667", + "kind": "constant", + "valueType": { + "$id": "668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "669", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "43" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordDiscriminatedUnion", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordDiscriminatedUnion.get", + "Decorators": [] + }, + { + "$id": "670", + "Name": "put", + "ResourceName": "SpreadRecordDiscriminatedUnion", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "662" + }, + { + "$id": "671", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "672", + "kind": "constant", + "valueType": { + "$id": "673", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "674", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "43" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "675", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordDiscriminatedUnion", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordDiscriminatedUnion.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "676" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "662" + } + ], + "Decorators": [] + }, + { + "$id": "677", + "Name": "SpreadRecordNonDiscriminatedUnion", + "Operations": [ + { + "$id": "678", + "Name": "get", + "ResourceName": "SpreadRecordNonDiscriminatedUnion", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "679", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "680", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "681", + "Type": { + "$id": "682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "683", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "684", + "kind": "constant", + "valueType": { + "$id": "685", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "686", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "34" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordNonDiscriminatedUnion", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion.get", + "Decorators": [] + }, + { + "$id": "687", + "Name": "put", + "ResourceName": "SpreadRecordNonDiscriminatedUnion", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "679" + }, + { + "$id": "688", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "689", + "kind": "constant", + "valueType": { + "$id": "690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "691", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "34" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "692", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordNonDiscriminatedUnion", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "693" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "679" + } + ], + "Decorators": [] + }, + { + "$id": "694", + "Name": "SpreadRecordNonDiscriminatedUnion2", + "Operations": [ + { + "$id": "695", + "Name": "get", + "ResourceName": "SpreadRecordNonDiscriminatedUnion2", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "696", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "697", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "698", + "Type": { + "$id": "699", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "700", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "701", + "kind": "constant", + "valueType": { + "$id": "702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "703", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "30" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordNonDiscriminatedUnion2", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion2.get", + "Decorators": [] + }, + { + "$id": "704", + "Name": "put", + "ResourceName": "SpreadRecordNonDiscriminatedUnion2", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "696" + }, + { + "$id": "705", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "706", + "kind": "constant", + "valueType": { + "$id": "707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "708", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "30" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "709", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordNonDiscriminatedUnion2", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion2.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "710" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "696" + } + ], + "Decorators": [] + }, + { + "$id": "711", + "Name": "SpreadRecordNonDiscriminatedUnion3", + "Operations": [ + { + "$id": "712", + "Name": "get", + "ResourceName": "SpreadRecordNonDiscriminatedUnion3", + "Description": "Get call", + "Accessibility": "public", + "Parameters": [ + { + "$id": "713", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "714", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "715", + "Type": { + "$id": "716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "717", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "718", + "kind": "constant", + "valueType": { + "$id": "719", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "720", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "11" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordNonDiscriminatedUnion3", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3.get", + "Decorators": [] + }, + { + "$id": "721", + "Name": "put", + "ResourceName": "SpreadRecordNonDiscriminatedUnion3", + "Description": "Put operation", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "713" + }, + { + "$id": "722", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "723", + "kind": "constant", + "valueType": { + "$id": "724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "725", + "Name": "body", + "NameInRequest": "body", + "Description": "body", + "Type": { + "$ref": "11" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "726", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/additionalProperties/spreadRecordNonDiscriminatedUnion3", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3.put", + "Decorators": [] + } + ], + "Protocol": { + "$id": "727" + }, + "Parent": "AdditionalPropertiesClient", + "Parameters": [ + { + "$ref": "713" + } + ], + "Decorators": [] + } + ] +}