From b4005cdcbb179e5a3f97535d7abfeff82ce0abe0 Mon Sep 17 00:00:00 2001 From: m-nash <64171366+m-nash@users.noreply.github.com> Date: Sun, 25 Aug 2024 22:06:43 -0700 Subject: [PATCH] adopt http/type/property/optionality (#4267) Fixes https://github.com/microsoft/typespec/issues/4009 --- .../eng/scripts/Generate.ps1 | 1 - .../src/Properties/launchSettings.json | 5 + .../Http/Encode/Bytes/EncodeBytesTests.cs | 1 - .../_Type/Property/Nullable/NullableTests.cs | 1 - .../Property/Optionality/OptionalityTests.cs | 544 ++ .../Http/_Type/Union/UnionTests.cs | 1 - .../Infrastructure/BinaryDataAssert.cs | 2 +- .../property/optionality/Configuration.json | 6 + .../optionality/_Type.Property.Optional.sln | 48 + .../src/Generated/BooleanLiteral.cs | 50 + .../optionality/src/Generated/Bytes.cs | 50 + .../src/Generated/CollectionsByte.cs | 50 + .../src/Generated/CollectionsModel.cs | 50 + .../optionality/src/Generated/Datetime.cs | 50 + .../optionality/src/Generated/Duration.cs | 50 + .../optionality/src/Generated/FloatLiteral.cs | 50 + .../optionality/src/Generated/IntLiteral.cs | 50 + .../BooleanLiteralProperty.Serialization.cs | 36 + .../Models/BooleanLiteralProperty.cs | 18 + .../Models/BytesProperty.Serialization.cs | 36 + .../src/Generated/Models/BytesProperty.cs | 20 + .../CollectionsByteProperty.Serialization.cs | 36 + .../Models/CollectionsByteProperty.cs | 16 + .../CollectionsModelProperty.Serialization.cs | 36 + .../Models/CollectionsModelProperty.cs | 15 + .../Models/DatetimeProperty.Serialization.cs | 36 + .../src/Generated/Models/DatetimeProperty.cs | 20 + .../Models/DurationProperty.Serialization.cs | 36 + .../src/Generated/Models/DurationProperty.cs | 20 + .../FloatLiteralProperty.Serialization.cs | 36 + .../Generated/Models/FloatLiteralProperty.cs | 18 + ...atLiteralPropertyProperty.Serialization.cs | 10 + .../Models/FloatLiteralPropertyProperty.cs | 31 + .../IntLiteralProperty.Serialization.cs | 36 + .../Generated/Models/IntLiteralProperty.cs | 18 + ...ntLiteralPropertyProperty.Serialization.cs | 10 + .../Models/IntLiteralPropertyProperty.cs | 31 + .../Models/PlainDateProperty.Serialization.cs | 36 + .../src/Generated/Models/PlainDateProperty.cs | 20 + .../Models/PlainTimeProperty.Serialization.cs | 36 + .../src/Generated/Models/PlainTimeProperty.cs | 20 + ...quiredAndOptionalProperty.Serialization.cs | 36 + .../Models/RequiredAndOptionalProperty.cs | 25 + .../StringLiteralProperty.Serialization.cs | 36 + .../Generated/Models/StringLiteralProperty.cs | 18 + .../Models/StringLiteralPropertyProperty.cs | 31 + .../Models/StringProperty.Serialization.cs | 36 + .../src/Generated/Models/StringProperty.cs | 18 + ...UnionFloatLiteralProperty.Serialization.cs | 36 + .../Models/UnionFloatLiteralProperty.cs | 18 + .../UnionFloatLiteralPropertyProperty.cs | 14 + .../UnionIntLiteralProperty.Serialization.cs | 36 + .../Models/UnionIntLiteralProperty.cs | 18 + .../Models/UnionIntLiteralPropertyProperty.cs | 14 + ...nionStringLiteralProperty.Serialization.cs | 36 + .../Models/UnionStringLiteralProperty.cs | 18 + .../UnionStringLiteralPropertyProperty.cs | 14 + .../src/Generated/OptionalClient.cs | 50 + .../src/Generated/OptionalClientOptions.cs | 12 + .../optionality/src/Generated/PlainDate.cs | 50 + .../optionality/src/Generated/PlainTime.cs | 50 + .../src/Generated/RequiredAndOptional.cs | 50 + .../optionality/src/Generated/String.cs | 50 + .../src/Generated/StringLiteral.cs | 50 + .../TypePropertyOptionalModelFactory.cs | 44 + .../src/Generated/UnionFloatLiteral.cs | 50 + .../src/Generated/UnionIntLiteral.cs | 50 + .../src/Generated/UnionStringLiteral.cs | 50 + .../src/_Type.Property.Optional.csproj | 16 + .../property/optionality/tspCodeModel.json | 5927 +++++++++++++++++ 70 files changed, 8484 insertions(+), 5 deletions(-) create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Optionality/OptionalityTests.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/Configuration.json create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/_Type.Property.Optional.sln create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/BooleanLiteral.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Bytes.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsByte.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsModel.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Datetime.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Duration.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/FloatLiteral.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/IntLiteral.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BooleanLiteralProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BooleanLiteralProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BytesProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BytesProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsByteProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsByteProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsModelProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsModelProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DatetimeProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DatetimeProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DurationProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DurationProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainDateProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainDateProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainTimeProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainTimeProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/RequiredAndOptionalProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/RequiredAndOptionalProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringLiteralProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringLiteralProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringLiteralPropertyProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionFloatLiteralPropertyProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionIntLiteralPropertyProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionStringLiteralProperty.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionStringLiteralProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionStringLiteralPropertyProperty.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/OptionalClient.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/OptionalClientOptions.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainDate.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainTime.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/RequiredAndOptional.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/String.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/StringLiteral.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/TypePropertyOptionalModelFactory.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionFloatLiteral.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionIntLiteral.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionStringLiteral.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/_Type.Property.Optional.csproj create mode 100644 packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/tspCodeModel.json diff --git a/packages/http-client-csharp/eng/scripts/Generate.ps1 b/packages/http-client-csharp/eng/scripts/Generate.ps1 index cc09a300b..93687095a 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' 'property' 'additional-properties' - Join-Path 'http' 'type' 'property' 'optionality' Join-Path 'http' 'type' 'property' 'value-types' ) 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 b22b8fb29..772249dfb 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 @@ -110,6 +110,11 @@ "commandName": "Executable", "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.Generator.CSharp.exe" }, + "http-type-property-optionality": { + "commandLineArgs": "$(SolutionDir)/TestProjects/CadlRanch/http/type/property/optionality -p StubLibraryPlugin", + "commandName": "Executable", + "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.Generator.CSharp.exe" + }, "http-type-scalar": { "commandLineArgs": "$(SolutionDir)/TestProjects/CadlRanch/http/type/scalar -p StubLibraryPlugin", "commandName": "Executable", diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Encode/Bytes/EncodeBytesTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Encode/Bytes/EncodeBytesTests.cs index b87889ead..673f26404 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Encode/Bytes/EncodeBytesTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Encode/Bytes/EncodeBytesTests.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.IO; using System.Threading.Tasks; -using AutoRest.TestServer.Tests.Infrastructure; using Encode.Bytes; using Encode.Bytes.Models; using NUnit.Framework; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Nullable/NullableTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Nullable/NullableTests.cs index fdab8886e..ea91310b0 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Nullable/NullableTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Nullable/NullableTests.cs @@ -7,7 +7,6 @@ using System.Linq; using System.Threading.Tasks; using System.Xml; using _Type.Property.Nullable; -using AutoRest.TestServer.Tests.Infrastructure; using NUnit.Framework; namespace TestProjects.CadlRanch.Tests.Http._Type.Property.Nullable diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Optionality/OptionalityTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Optionality/OptionalityTests.cs new file mode 100644 index 000000000..6c0b89961 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Optionality/OptionalityTests.cs @@ -0,0 +1,544 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; +using System.Xml; +using _Type.Property.Optional; +using _Type.Property.Optional.Models; +using NUnit.Framework; + +namespace TestProjects.CadlRanch.Tests.Http._Type.Property.Optionality +{ + internal class OptionalityTests : CadlRanchTestBase + { + [CadlRanchTest] + public Task BooleanLiteralGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetBooleanLiteralClient().GetAllAsync(); + Assert.AreEqual(true, response.Value.Property); + }); + + [CadlRanchTest] + public Task BooleanLiteralGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetBooleanLiteralClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task BooleanLiteralPutAll() => Test(async (host) => + { + BooleanLiteralProperty data = new() + { + Property = true + }; + var response = await new OptionalClient(host, null).GetBooleanLiteralClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task BooleanLiteralPutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetBooleanLiteralClient().PutDefaultAsync(new BooleanLiteralProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task StringGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetStringClient().GetAllAsync(); + Assert.AreEqual("hello", response.Value.Property); + }); + + [CadlRanchTest] + public Task StringGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetStringClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task StringPutAll() => Test(async (host) => + { + StringProperty data = new() + { + Property = "hello" + }; + var response = await new OptionalClient(host, null).GetStringClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task StringPutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetStringClient().PutDefaultAsync(new StringProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task BytesGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetBytesClient().GetAllAsync(); + BinaryDataAssert.AreEqual(BinaryData.FromString("hello, world!"), response.Value.Property); + }); + + [CadlRanchTest] + public Task BytesGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetBytesClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task BytesPutAll() => Test(async (host) => + { + BytesProperty data = new() + { + Property = BinaryData.FromString("hello, world!") + }; + var response = await new OptionalClient(host, null).GetBytesClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task BytesPutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetBytesClient().PutDefaultAsync(new BytesProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task DatetimeGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetDatetimeClient().GetAllAsync(); + Assert.AreEqual(DateTimeOffset.Parse("2022-08-26T18:38:00Z"), response.Value.Property); + }); + + [CadlRanchTest] + public Task DatetimeGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetDatetimeClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task DatetimePutAll() => Test(async (host) => + { + DatetimeProperty data = new() + { + Property = DateTimeOffset.Parse("2022-08-26T18:38:00Z") + }; + var response = await new OptionalClient(host, null).GetDatetimeClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task DatetimePutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetDatetimeClient().PutDefaultAsync(new DatetimeProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task PlaindateGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetPlainDateClient().GetAllAsync(); + var expectedDate = new DateTimeOffset(2022, 12, 12, 8, 0, 0, TimeSpan.FromHours(8)); + Assert.AreEqual(expectedDate, response.Value.Property!.Value.ToOffset(TimeSpan.FromHours(8))); + }); + + [CadlRanchTest] + public Task PlaindateGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetPlainDateClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task PlaindatePutAll() => Test(async (host) => + { + PlainDateProperty data = new() + { + Property = DateTimeOffset.Parse("2022-12-12") + }; + var response = await new OptionalClient(host, null).GetPlainDateClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task PlaindatePutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetPlainDateClient().PutDefaultAsync(new PlainDateProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task PlaintimeGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetPlainTimeClient().GetAllAsync(); + Assert.AreEqual(TimeSpan.Parse("13:06:12"), response.Value.Property); + }); + + [CadlRanchTest] + public Task PlaintimeGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetPlainTimeClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task PlaintimePutAll() => Test(async (host) => + { + PlainTimeProperty data = new() + { + Property = TimeSpan.Parse("13:06:12") + }; + var response = await new OptionalClient(host, null).GetPlainTimeClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task PlaintimePutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetPlainTimeClient().PutDefaultAsync(new PlainTimeProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task DurationGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetDurationClient().GetAllAsync(); + Assert.AreEqual(XmlConvert.ToTimeSpan("P123DT22H14M12.011S"), response.Value.Property); + }); + + [CadlRanchTest] + public Task DurationGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetDurationClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task DurationPutAll() => Test(async (host) => + { + DurationProperty data = new() + { + Property = XmlConvert.ToTimeSpan("P123DT22H14M12.011S") + }; + var response = await new OptionalClient(host, null).GetDurationClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task DurationPutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetDurationClient().PutDefaultAsync(new DurationProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task CollectionsByteGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetCollectionsByteClient().GetAllAsync(); + BinaryDataAssert.AreEqual(BinaryData.FromString("hello, world!"), response.Value.Property[0]); + BinaryDataAssert.AreEqual(BinaryData.FromString("hello, world!"), response.Value.Property[1]); + }); + + [CadlRanchTest] + public Task CollectionsByteGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetCollectionsByteClient().GetDefaultAsync(); + Assert.AreEqual(0, response.Value.Property.Count); + }); + + [CadlRanchTest] + public Task CollectionsBytePutAll() => Test(async (host) => + { + CollectionsByteProperty data = new(); + data.Property.Add(BinaryData.FromString("hello, world!")); + data.Property.Add(BinaryData.FromString("hello, world!")); + + var response = await new OptionalClient(host, null).GetCollectionsByteClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task CollectionsBytePutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetCollectionsByteClient().PutDefaultAsync(new CollectionsByteProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + + [CadlRanchTest] + public Task CollectionsModelGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetCollectionsModelClient().GetAllAsync(); + var result = response.Value; + Assert.AreEqual("hello", result.Property[0].Property); + Assert.AreEqual("world", result.Property[1].Property); + Assert.AreEqual(2, result.Property.Count); + }); + + [CadlRanchTest] + public Task CollectionsModelGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetCollectionsModelClient().GetDefaultAsync(); + Assert.AreEqual(0, response.Value.Property.Count); + }); + + [CadlRanchTest] + public Task CollectionsModelPutAll() => Test(async (host) => + { + CollectionsModelProperty data = new(); + data.Property.Add(new StringProperty() + { + Property = "hello" + }); + data.Property.Add(new StringProperty() + { + Property = "world" + }); + + var response = await new OptionalClient(host, null).GetCollectionsModelClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task CollectionsModelPutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetCollectionsModelClient().PutDefaultAsync(new CollectionsModelProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task RequiredAndOptionalGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetRequiredAndOptionalClient().GetAllAsync(); + var result = response.Value; + Assert.AreEqual("hello", result.OptionalProperty); + Assert.AreEqual(42, result.RequiredProperty); + }); + + [CadlRanchTest] + public Task RequiredAndOptionalGetRequiredOnly() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetRequiredAndOptionalClient().GetRequiredOnlyAsync(); + var result = response.Value; + Assert.AreEqual(null, result.OptionalProperty); + Assert.AreEqual(42, result.RequiredProperty); + }); + + [CadlRanchTest] + public Task RequiredAndOptionalPutAll() => Test(async (host) => + { + var content = new RequiredAndOptionalProperty(42) + { + OptionalProperty = "hello" + }; + + var response = await new OptionalClient(host, null).GetRequiredAndOptionalClient().PutAllAsync(content); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task RequiredAndOptionalPutRequiredOnly() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetRequiredAndOptionalClient().PutRequiredOnlyAsync(new RequiredAndOptionalProperty(42)); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task FloatLiteralGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetFloatLiteralClient().GetAllAsync(); + Assert.AreEqual(FloatLiteralPropertyProperty._125, response.Value.Property); + }); + + [CadlRanchTest] + public Task FloatLiteralGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetFloatLiteralClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task FloatLiteralPutAll() => Test(async (host) => + { + FloatLiteralProperty data = new() + { + Property = new FloatLiteralPropertyProperty(1.25f) + }; + var response = await new OptionalClient(host, null).GetFloatLiteralClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task FloatLiteralPutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetFloatLiteralClient().PutDefaultAsync(new FloatLiteralProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task IntLiteralGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetIntLiteralClient().GetAllAsync(); + Assert.AreEqual(IntLiteralPropertyProperty._1, response.Value.Property); + }); + + [CadlRanchTest] + public Task IntLiteralGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetIntLiteralClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task IntLiteralPutAll() => Test(async (host) => + { + IntLiteralProperty data = new() + { + Property = 1 + }; + var response = await new OptionalClient(host, null).GetIntLiteralClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task IntLiteralPutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetIntLiteralClient().PutDefaultAsync(new IntLiteralProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task StringLiteralGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetStringLiteralClient().GetAllAsync(); + Assert.AreEqual(StringLiteralPropertyProperty.Hello, response.Value.Property); + }); + + [CadlRanchTest] + public Task StringLiteralGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetStringLiteralClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task StringLiteralPutAll() => Test(async (host) => + { + StringLiteralProperty data = new() + { + Property = "hello" + }; + var response = await new OptionalClient(host, null).GetStringLiteralClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task StringLiteralPutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetStringLiteralClient().PutDefaultAsync(new StringLiteralProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task UnionFloatLiteralGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetUnionFloatLiteralClient().GetAllAsync(); + Assert.AreEqual(UnionFloatLiteralPropertyProperty._2375, response.Value.Property); + }); + + [CadlRanchTest] + public Task UnionFloatLiteralGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetUnionFloatLiteralClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task UnionFloatLiteralPutAll() => Test(async (host) => + { + UnionFloatLiteralProperty data = new() + { + Property = UnionFloatLiteralPropertyProperty._2375 + }; + var response = await new OptionalClient(host, null).GetUnionFloatLiteralClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task UnionFloatLiteralPutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetUnionFloatLiteralClient().PutDefaultAsync(new UnionFloatLiteralProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task UnionIntLiteralGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetUnionIntLiteralClient().GetAllAsync(); + Assert.AreEqual(UnionIntLiteralPropertyProperty._2, response.Value.Property); + }); + + [CadlRanchTest] + public Task UnionIntLiteralGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetUnionIntLiteralClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task UnionIntLiteralGutAll() => Test(async (host) => + { + UnionIntLiteralProperty data = new() + { + Property = UnionIntLiteralPropertyProperty._2 + }; + var response = await new OptionalClient(host, null).GetUnionIntLiteralClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task UnionIntLiteralPutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetUnionIntLiteralClient().PutDefaultAsync(new UnionIntLiteralProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task UnionStringLiteralGetAll() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetUnionStringLiteralClient().GetAllAsync(); + Assert.AreEqual(UnionStringLiteralPropertyProperty.World, response.Value.Property); + }); + + [CadlRanchTest] + public Task UnionStringLiteralGetDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetUnionStringLiteralClient().GetDefaultAsync(); + Assert.AreEqual(null, response.Value.Property); + }); + + [CadlRanchTest] + public Task UnionStringLiteralPutAll() => Test(async (host) => + { + UnionStringLiteralProperty data = new() + { + Property = UnionStringLiteralPropertyProperty.World, + }; + var response = await new OptionalClient(host, null).GetUnionStringLiteralClient().PutAllAsync(data); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task UnionStringLiteralPutDefault() => Test(async (host) => + { + var response = await new OptionalClient(host, null).GetUnionStringLiteralClient().PutDefaultAsync(new UnionStringLiteralProperty()); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Union/UnionTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Union/UnionTests.cs index a1c9dee3a..69db503e0 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Union/UnionTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Union/UnionTests.cs @@ -7,7 +7,6 @@ using System.Collections.Generic; using System.Threading.Tasks; using _Type.Union; using _Type.Union.Models; -using AutoRest.TestServer.Tests.Infrastructure; using NUnit.Framework; namespace TestProjects.CadlRanch.Tests.Http._Type.Union diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Infrastructure/BinaryDataAssert.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Infrastructure/BinaryDataAssert.cs index f16821e41..ddddc89ad 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Infrastructure/BinaryDataAssert.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Infrastructure/BinaryDataAssert.cs @@ -4,7 +4,7 @@ using System; using NUnit.Framework; -namespace AutoRest.TestServer.Tests.Infrastructure +namespace TestProjects.CadlRanch.Tests { public static class BinaryDataAssert { diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/Configuration.json b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/Configuration.json new file mode 100644 index 000000000..745555c8c --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/Configuration.json @@ -0,0 +1,6 @@ +{ + "output-folder": ".", + "namespace": "Type.Property.Optional", + "library-name": "Type.Property.Optional", + "use-model-reader-writer": true +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/_Type.Property.Optional.sln b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/_Type.Property.Optional.sln new file mode 100644 index 000000000..b3130430d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/_Type.Property.Optional.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.Optional", "src\_Type.Property.Optional.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/optionality/src/Generated/BooleanLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/BooleanLiteral.cs new file mode 100644 index 000000000..ed940ad96 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/BooleanLiteral.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class BooleanLiteral + { + protected BooleanLiteral() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(BooleanLiteralProperty body) => throw null; + + public virtual Task PutAllAsync(BooleanLiteralProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(BooleanLiteralProperty body) => throw null; + + public virtual Task PutDefaultAsync(BooleanLiteralProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Bytes.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Bytes.cs new file mode 100644 index 000000000..d1c9c09ea --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Bytes.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class Bytes + { + protected Bytes() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(BytesProperty body) => throw null; + + public virtual Task PutAllAsync(BytesProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(BytesProperty body) => throw null; + + public virtual Task PutDefaultAsync(BytesProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsByte.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsByte.cs new file mode 100644 index 000000000..4cbd1f8cb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsByte.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class CollectionsByte + { + protected CollectionsByte() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(CollectionsByteProperty body) => throw null; + + public virtual Task PutAllAsync(CollectionsByteProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(CollectionsByteProperty body) => throw null; + + public virtual Task PutDefaultAsync(CollectionsByteProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsModel.cs new file mode 100644 index 000000000..6b3cbef1b --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsModel.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class CollectionsModel + { + protected CollectionsModel() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(CollectionsModelProperty body) => throw null; + + public virtual Task PutAllAsync(CollectionsModelProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(CollectionsModelProperty body) => throw null; + + public virtual Task PutDefaultAsync(CollectionsModelProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Datetime.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Datetime.cs new file mode 100644 index 000000000..89b236ff2 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Datetime.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class Datetime + { + protected Datetime() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(DatetimeProperty body) => throw null; + + public virtual Task PutAllAsync(DatetimeProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(DatetimeProperty body) => throw null; + + public virtual Task PutDefaultAsync(DatetimeProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Duration.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Duration.cs new file mode 100644 index 000000000..8d82dffa2 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Duration.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class Duration + { + protected Duration() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(DurationProperty body) => throw null; + + public virtual Task PutAllAsync(DurationProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(DurationProperty body) => throw null; + + public virtual Task PutDefaultAsync(DurationProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/FloatLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/FloatLiteral.cs new file mode 100644 index 000000000..9ed91b036 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/FloatLiteral.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class FloatLiteral + { + protected FloatLiteral() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(FloatLiteralProperty body) => throw null; + + public virtual Task PutAllAsync(FloatLiteralProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(FloatLiteralProperty body) => throw null; + + public virtual Task PutDefaultAsync(FloatLiteralProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/IntLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/IntLiteral.cs new file mode 100644 index 000000000..d9ffb6712 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/IntLiteral.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class IntLiteral + { + protected IntLiteral() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(IntLiteralProperty body) => throw null; + + public virtual Task PutAllAsync(IntLiteralProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(IntLiteralProperty body) => throw null; + + public virtual Task PutDefaultAsync(IntLiteralProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BooleanLiteralProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BooleanLiteralProperty.Serialization.cs new file mode 100644 index 000000000..599f0591b --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BooleanLiteralProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class BooleanLiteralProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + BooleanLiteralProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual BooleanLiteralProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BooleanLiteralProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BooleanLiteralProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(BooleanLiteralProperty booleanLiteralProperty) => throw null; + + public static explicit operator BooleanLiteralProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BooleanLiteralProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BooleanLiteralProperty.cs new file mode 100644 index 000000000..06426c497 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BooleanLiteralProperty.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public partial class BooleanLiteralProperty + { + public BooleanLiteralProperty() => throw null; + + public bool? Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BytesProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BytesProperty.Serialization.cs new file mode 100644 index 000000000..7cd9bb680 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BytesProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class BytesProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + BytesProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual BytesProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BytesProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BytesProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(BytesProperty bytesProperty) => throw null; + + public static explicit operator BytesProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BytesProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BytesProperty.cs new file mode 100644 index 000000000..b049ec177 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/BytesProperty.cs @@ -0,0 +1,20 @@ +// + +#nullable disable + +using System; + +namespace _Type.Property.Optional.Models +{ + public partial class BytesProperty + { + public BytesProperty() => throw null; + + public BinaryData Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsByteProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsByteProperty.Serialization.cs new file mode 100644 index 000000000..009bc213f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsByteProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class CollectionsByteProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + CollectionsByteProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual CollectionsByteProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + CollectionsByteProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual CollectionsByteProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(CollectionsByteProperty collectionsByteProperty) => throw null; + + public static explicit operator CollectionsByteProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsByteProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsByteProperty.cs new file mode 100644 index 000000000..c8a0ceb2e --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsByteProperty.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.Optional.Models +{ + public partial class CollectionsByteProperty + { + public CollectionsByteProperty() => throw null; + + public IList Property => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsModelProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsModelProperty.Serialization.cs new file mode 100644 index 000000000..10d5fb0a5 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsModelProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class CollectionsModelProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + CollectionsModelProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual CollectionsModelProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + CollectionsModelProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual CollectionsModelProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(CollectionsModelProperty collectionsModelProperty) => throw null; + + public static explicit operator CollectionsModelProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsModelProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsModelProperty.cs new file mode 100644 index 000000000..cbd52c6be --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/CollectionsModelProperty.cs @@ -0,0 +1,15 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace _Type.Property.Optional.Models +{ + public partial class CollectionsModelProperty + { + public CollectionsModelProperty() => throw null; + + public IList Property => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DatetimeProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DatetimeProperty.Serialization.cs new file mode 100644 index 000000000..2c6955ddd --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DatetimeProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class DatetimeProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + DatetimeProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual DatetimeProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + DatetimeProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual DatetimeProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(DatetimeProperty datetimeProperty) => throw null; + + public static explicit operator DatetimeProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DatetimeProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DatetimeProperty.cs new file mode 100644 index 000000000..fc31217fb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DatetimeProperty.cs @@ -0,0 +1,20 @@ +// + +#nullable disable + +using System; + +namespace _Type.Property.Optional.Models +{ + public partial class DatetimeProperty + { + public DatetimeProperty() => throw null; + + public DateTimeOffset? Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DurationProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DurationProperty.Serialization.cs new file mode 100644 index 000000000..bc52b8167 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DurationProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class DurationProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + DurationProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual DurationProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + DurationProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual DurationProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(DurationProperty durationProperty) => throw null; + + public static explicit operator DurationProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DurationProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DurationProperty.cs new file mode 100644 index 000000000..d6ed344aa --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/DurationProperty.cs @@ -0,0 +1,20 @@ +// + +#nullable disable + +using System; + +namespace _Type.Property.Optional.Models +{ + public partial class DurationProperty + { + public DurationProperty() => throw null; + + public TimeSpan? Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralProperty.Serialization.cs new file mode 100644 index 000000000..74daa15e4 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class FloatLiteralProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + FloatLiteralProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual FloatLiteralProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + FloatLiteralProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual FloatLiteralProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(FloatLiteralProperty floatLiteralProperty) => throw null; + + public static explicit operator FloatLiteralProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralProperty.cs new file mode 100644 index 000000000..378b5d0a4 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralProperty.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public partial class FloatLiteralProperty + { + public FloatLiteralProperty() => throw null; + + public FloatLiteralPropertyProperty? Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.Serialization.cs new file mode 100644 index 000000000..835345a28 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.Serialization.cs @@ -0,0 +1,10 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public readonly partial struct FloatLiteralPropertyProperty + { + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.cs new file mode 100644 index 000000000..2cd0ab6fe --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace _Type.Property.Optional.Models +{ + public readonly partial struct FloatLiteralPropertyProperty : IEquatable + { + public FloatLiteralPropertyProperty(float value) => throw null; + + public static FloatLiteralPropertyProperty _125 => throw null; + + public static bool operator ==(FloatLiteralPropertyProperty left, FloatLiteralPropertyProperty right) => throw null; + + public static bool operator !=(FloatLiteralPropertyProperty left, FloatLiteralPropertyProperty right) => throw null; + + public static implicit operator FloatLiteralPropertyProperty(float value) => throw null; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => throw null; + + public bool Equals(FloatLiteralPropertyProperty 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/optionality/src/Generated/Models/IntLiteralProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralProperty.Serialization.cs new file mode 100644 index 000000000..5b68e8a49 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class IntLiteralProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + IntLiteralProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual IntLiteralProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + IntLiteralProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual IntLiteralProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(IntLiteralProperty intLiteralProperty) => throw null; + + public static explicit operator IntLiteralProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralProperty.cs new file mode 100644 index 000000000..d55cf030f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralProperty.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public partial class IntLiteralProperty + { + public IntLiteralProperty() => throw null; + + public IntLiteralPropertyProperty? Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.Serialization.cs new file mode 100644 index 000000000..143706669 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.Serialization.cs @@ -0,0 +1,10 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public readonly partial struct IntLiteralPropertyProperty + { + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.cs new file mode 100644 index 000000000..4dc8ec4c6 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace _Type.Property.Optional.Models +{ + public readonly partial struct IntLiteralPropertyProperty : IEquatable + { + public IntLiteralPropertyProperty(int value) => throw null; + + public static IntLiteralPropertyProperty _1 => throw null; + + public static bool operator ==(IntLiteralPropertyProperty left, IntLiteralPropertyProperty right) => throw null; + + public static bool operator !=(IntLiteralPropertyProperty left, IntLiteralPropertyProperty right) => throw null; + + public static implicit operator IntLiteralPropertyProperty(int value) => throw null; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => throw null; + + public bool Equals(IntLiteralPropertyProperty 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/optionality/src/Generated/Models/PlainDateProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainDateProperty.Serialization.cs new file mode 100644 index 000000000..d9344cbc6 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainDateProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class PlainDateProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + PlainDateProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual PlainDateProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + PlainDateProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual PlainDateProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(PlainDateProperty plainDateProperty) => throw null; + + public static explicit operator PlainDateProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainDateProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainDateProperty.cs new file mode 100644 index 000000000..f89f2ec3b --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainDateProperty.cs @@ -0,0 +1,20 @@ +// + +#nullable disable + +using System; + +namespace _Type.Property.Optional.Models +{ + public partial class PlainDateProperty + { + public PlainDateProperty() => throw null; + + public DateTimeOffset? Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainTimeProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainTimeProperty.Serialization.cs new file mode 100644 index 000000000..76d6cd72f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainTimeProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class PlainTimeProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + PlainTimeProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual PlainTimeProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + PlainTimeProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual PlainTimeProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(PlainTimeProperty plainTimeProperty) => throw null; + + public static explicit operator PlainTimeProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainTimeProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainTimeProperty.cs new file mode 100644 index 000000000..b074f737a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/PlainTimeProperty.cs @@ -0,0 +1,20 @@ +// + +#nullable disable + +using System; + +namespace _Type.Property.Optional.Models +{ + public partial class PlainTimeProperty + { + public PlainTimeProperty() => throw null; + + public TimeSpan? Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/RequiredAndOptionalProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/RequiredAndOptionalProperty.Serialization.cs new file mode 100644 index 000000000..60821360a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/RequiredAndOptionalProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class RequiredAndOptionalProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + RequiredAndOptionalProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual RequiredAndOptionalProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + RequiredAndOptionalProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual RequiredAndOptionalProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(RequiredAndOptionalProperty requiredAndOptionalProperty) => throw null; + + public static explicit operator RequiredAndOptionalProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/RequiredAndOptionalProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/RequiredAndOptionalProperty.cs new file mode 100644 index 000000000..cf2e60633 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/RequiredAndOptionalProperty.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public partial class RequiredAndOptionalProperty + { + public RequiredAndOptionalProperty(int requiredProperty) => throw null; + + public string OptionalProperty + { + get => throw null; + set => throw null; + } + + + public int RequiredProperty + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringLiteralProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringLiteralProperty.Serialization.cs new file mode 100644 index 000000000..763365bcc --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringLiteralProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class StringLiteralProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + StringLiteralProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual StringLiteralProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + StringLiteralProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual StringLiteralProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(StringLiteralProperty stringLiteralProperty) => throw null; + + public static explicit operator StringLiteralProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringLiteralProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringLiteralProperty.cs new file mode 100644 index 000000000..bcd3f4d62 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringLiteralProperty.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public partial class StringLiteralProperty + { + public StringLiteralProperty() => throw null; + + public StringLiteralPropertyProperty? Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringLiteralPropertyProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringLiteralPropertyProperty.cs new file mode 100644 index 000000000..0abcb186e --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringLiteralPropertyProperty.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace _Type.Property.Optional.Models +{ + public readonly partial struct StringLiteralPropertyProperty : IEquatable + { + public StringLiteralPropertyProperty(string value) => throw null; + + public static StringLiteralPropertyProperty Hello => throw null; + + public static bool operator ==(StringLiteralPropertyProperty left, StringLiteralPropertyProperty right) => throw null; + + public static bool operator !=(StringLiteralPropertyProperty left, StringLiteralPropertyProperty right) => throw null; + + public static implicit operator StringLiteralPropertyProperty(string value) => throw null; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => throw null; + + public bool Equals(StringLiteralPropertyProperty 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/optionality/src/Generated/Models/StringProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringProperty.Serialization.cs new file mode 100644 index 000000000..666a9e756 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class StringProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + StringProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual StringProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + StringProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual StringProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(StringProperty stringProperty) => throw null; + + public static explicit operator StringProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringProperty.cs new file mode 100644 index 000000000..187df5c64 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/StringProperty.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public partial class StringProperty + { + public StringProperty() => throw null; + + public string Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs new file mode 100644 index 000000000..4c817a314 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class UnionFloatLiteralProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + UnionFloatLiteralProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual UnionFloatLiteralProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + UnionFloatLiteralProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual UnionFloatLiteralProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(UnionFloatLiteralProperty unionFloatLiteralProperty) => throw null; + + public static explicit operator UnionFloatLiteralProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.cs new file mode 100644 index 000000000..fb36530d1 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public partial class UnionFloatLiteralProperty + { + public UnionFloatLiteralProperty() => throw null; + + public UnionFloatLiteralPropertyProperty? Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionFloatLiteralPropertyProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionFloatLiteralPropertyProperty.cs new file mode 100644 index 000000000..1cc8f5512 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionFloatLiteralPropertyProperty.cs @@ -0,0 +1,14 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public enum UnionFloatLiteralPropertyProperty + { + /// _125. + _125, + /// _2375. + _2375 + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.Serialization.cs new file mode 100644 index 000000000..6da8fcea6 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class UnionIntLiteralProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + UnionIntLiteralProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual UnionIntLiteralProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + UnionIntLiteralProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual UnionIntLiteralProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(UnionIntLiteralProperty unionIntLiteralProperty) => throw null; + + public static explicit operator UnionIntLiteralProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.cs new file mode 100644 index 000000000..b21fbc95a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public partial class UnionIntLiteralProperty + { + public UnionIntLiteralProperty() => throw null; + + public UnionIntLiteralPropertyProperty? Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionIntLiteralPropertyProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionIntLiteralPropertyProperty.cs new file mode 100644 index 000000000..3f52e7f44 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionIntLiteralPropertyProperty.cs @@ -0,0 +1,14 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public enum UnionIntLiteralPropertyProperty + { + /// _1. + _1 = 1, + /// _2. + _2 = 2 + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionStringLiteralProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionStringLiteralProperty.Serialization.cs new file mode 100644 index 000000000..fc4394b18 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionStringLiteralProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Optional.Models +{ + public partial class UnionStringLiteralProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + UnionStringLiteralProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual UnionStringLiteralProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + UnionStringLiteralProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual UnionStringLiteralProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(UnionStringLiteralProperty unionStringLiteralProperty) => throw null; + + public static explicit operator UnionStringLiteralProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionStringLiteralProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionStringLiteralProperty.cs new file mode 100644 index 000000000..2a1475a6a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionStringLiteralProperty.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public partial class UnionStringLiteralProperty + { + public UnionStringLiteralProperty() => throw null; + + public UnionStringLiteralPropertyProperty? Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionStringLiteralPropertyProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionStringLiteralPropertyProperty.cs new file mode 100644 index 000000000..1b91f2b3e --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Models/UnionStringLiteralPropertyProperty.cs @@ -0,0 +1,14 @@ +// + +#nullable disable + +namespace _Type.Property.Optional.Models +{ + public enum UnionStringLiteralPropertyProperty + { + /// Hello. + Hello, + /// World. + World + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/OptionalClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/OptionalClient.cs new file mode 100644 index 000000000..6f67bdc1b --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/OptionalClient.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; + +namespace _Type.Property.Optional +{ + public partial class OptionalClient + { + public OptionalClient() : this(new Uri("http://localhost:3000"), new OptionalClientOptions()) => throw null; + + public OptionalClient(Uri endpoint, OptionalClientOptions options) => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual String GetStringClient() => throw null; + + public virtual Bytes GetBytesClient() => throw null; + + public virtual Datetime GetDatetimeClient() => throw null; + + public virtual Duration GetDurationClient() => throw null; + + public virtual PlainDate GetPlainDateClient() => throw null; + + public virtual PlainTime GetPlainTimeClient() => throw null; + + public virtual CollectionsByte GetCollectionsByteClient() => throw null; + + public virtual CollectionsModel GetCollectionsModelClient() => throw null; + + public virtual StringLiteral GetStringLiteralClient() => throw null; + + public virtual IntLiteral GetIntLiteralClient() => throw null; + + public virtual FloatLiteral GetFloatLiteralClient() => throw null; + + public virtual BooleanLiteral GetBooleanLiteralClient() => throw null; + + public virtual UnionStringLiteral GetUnionStringLiteralClient() => throw null; + + public virtual UnionIntLiteral GetUnionIntLiteralClient() => throw null; + + public virtual UnionFloatLiteral GetUnionFloatLiteralClient() => throw null; + + public virtual RequiredAndOptional GetRequiredAndOptionalClient() => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/OptionalClientOptions.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/OptionalClientOptions.cs new file mode 100644 index 000000000..a9ffaadfe --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/OptionalClientOptions.cs @@ -0,0 +1,12 @@ +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace _Type.Property.Optional +{ + public partial class OptionalClientOptions : ClientPipelineOptions + { + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainDate.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainDate.cs new file mode 100644 index 000000000..0a685dce5 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainDate.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class PlainDate + { + protected PlainDate() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(PlainDateProperty body) => throw null; + + public virtual Task PutAllAsync(PlainDateProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(PlainDateProperty body) => throw null; + + public virtual Task PutDefaultAsync(PlainDateProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainTime.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainTime.cs new file mode 100644 index 000000000..2eb66b62a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainTime.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class PlainTime + { + protected PlainTime() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(PlainTimeProperty body) => throw null; + + public virtual Task PutAllAsync(PlainTimeProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(PlainTimeProperty body) => throw null; + + public virtual Task PutDefaultAsync(PlainTimeProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/RequiredAndOptional.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/RequiredAndOptional.cs new file mode 100644 index 000000000..91e5fd158 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/RequiredAndOptional.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class RequiredAndOptional + { + protected RequiredAndOptional() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetRequiredOnly(RequestOptions options) => throw null; + + public virtual Task GetRequiredOnlyAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetRequiredOnly() => throw null; + + public virtual Task> GetRequiredOnlyAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(RequiredAndOptionalProperty body) => throw null; + + public virtual Task PutAllAsync(RequiredAndOptionalProperty body) => throw null; + + public virtual ClientResult PutRequiredOnly(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutRequiredOnlyAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutRequiredOnly(RequiredAndOptionalProperty body) => throw null; + + public virtual Task PutRequiredOnlyAsync(RequiredAndOptionalProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/String.cs new file mode 100644 index 000000000..d62a726a8 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/String.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class String + { + protected String() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(StringProperty body) => throw null; + + public virtual Task PutAllAsync(StringProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(StringProperty body) => throw null; + + public virtual Task PutDefaultAsync(StringProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/StringLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/StringLiteral.cs new file mode 100644 index 000000000..d829db3da --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/StringLiteral.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class StringLiteral + { + protected StringLiteral() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(StringLiteralProperty body) => throw null; + + public virtual Task PutAllAsync(StringLiteralProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(StringLiteralProperty body) => throw null; + + public virtual Task PutDefaultAsync(StringLiteralProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/TypePropertyOptionalModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/TypePropertyOptionalModelFactory.cs new file mode 100644 index 000000000..10e459179 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/TypePropertyOptionalModelFactory.cs @@ -0,0 +1,44 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.Optional.Models +{ + public static partial class TypePropertyOptionalModelFactory + { + public static RequiredAndOptionalProperty RequiredAndOptionalProperty(string optionalProperty = default, int requiredProperty = default) => throw null; + + public static UnionFloatLiteralProperty UnionFloatLiteralProperty(UnionFloatLiteralPropertyProperty? @property = default) => throw null; + + public static UnionIntLiteralProperty UnionIntLiteralProperty(UnionIntLiteralPropertyProperty? @property = default) => throw null; + + public static UnionStringLiteralProperty UnionStringLiteralProperty(UnionStringLiteralPropertyProperty? @property = default) => throw null; + + public static BooleanLiteralProperty BooleanLiteralProperty(bool? @property = default) => throw null; + + public static FloatLiteralProperty FloatLiteralProperty(FloatLiteralPropertyProperty? @property = default) => throw null; + + public static IntLiteralProperty IntLiteralProperty(IntLiteralPropertyProperty? @property = default) => throw null; + + public static StringLiteralProperty StringLiteralProperty(StringLiteralPropertyProperty? @property = default) => throw null; + + public static CollectionsModelProperty CollectionsModelProperty(IEnumerable @property = default) => throw null; + + public static StringProperty StringProperty(string @property = default) => throw null; + + public static CollectionsByteProperty CollectionsByteProperty(IEnumerable @property = default) => throw null; + + public static PlainTimeProperty PlainTimeProperty(TimeSpan? @property = default) => throw null; + + public static PlainDateProperty PlainDateProperty(DateTimeOffset? @property = default) => throw null; + + public static DurationProperty DurationProperty(TimeSpan? @property = default) => throw null; + + public static DatetimeProperty DatetimeProperty(DateTimeOffset? @property = default) => throw null; + + public static BytesProperty BytesProperty(BinaryData @property = default) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionFloatLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionFloatLiteral.cs new file mode 100644 index 000000000..0ce9d65d5 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionFloatLiteral.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class UnionFloatLiteral + { + protected UnionFloatLiteral() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(UnionFloatLiteralProperty body) => throw null; + + public virtual Task PutAllAsync(UnionFloatLiteralProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(UnionFloatLiteralProperty body) => throw null; + + public virtual Task PutDefaultAsync(UnionFloatLiteralProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionIntLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionIntLiteral.cs new file mode 100644 index 000000000..c20252ba2 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionIntLiteral.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class UnionIntLiteral + { + protected UnionIntLiteral() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(UnionIntLiteralProperty body) => throw null; + + public virtual Task PutAllAsync(UnionIntLiteralProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(UnionIntLiteralProperty body) => throw null; + + public virtual Task PutDefaultAsync(UnionIntLiteralProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionStringLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionStringLiteral.cs new file mode 100644 index 000000000..e4daa5d56 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionStringLiteral.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Optional.Models; + +namespace _Type.Property.Optional +{ + public partial class UnionStringLiteral + { + protected UnionStringLiteral() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetAll(RequestOptions options) => throw null; + + public virtual Task GetAllAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetAll() => throw null; + + public virtual Task> GetAllAsync() => throw null; + + public virtual ClientResult GetDefault(RequestOptions options) => throw null; + + public virtual Task GetDefaultAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetDefault() => throw null; + + public virtual Task> GetDefaultAsync() => throw null; + + public virtual ClientResult PutAll(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutAllAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutAll(UnionStringLiteralProperty body) => throw null; + + public virtual Task PutAllAsync(UnionStringLiteralProperty body) => throw null; + + public virtual ClientResult PutDefault(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PutDefault(UnionStringLiteralProperty body) => throw null; + + public virtual Task PutDefaultAsync(UnionStringLiteralProperty body) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/_Type.Property.Optional.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/_Type.Property.Optional.csproj new file mode 100644 index 000000000..9835d49ee --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/_Type.Property.Optional.csproj @@ -0,0 +1,16 @@ + + + This is the _Type.Property.Optional client library for developing .NET applications with rich experience. + SDK Code Generation _Type.Property.Optional + 1.0.0-beta.1 + _Type.Property.Optional + netstandard2.0 + latest + true + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/tspCodeModel.json new file mode 100644 index 000000000..19bd6183a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/tspCodeModel.json @@ -0,0 +1,5927 @@ +{ + "$id": "1", + "Name": "Type.Property.Optional", + "ApiVersions": [], + "Enums": [ + { + "$id": "2", + "Kind": "enum", + "Name": "UnionFloatLiteralPropertyProperty", + "CrossLanguageDefinitionId": "UnionFloatLiteralProperty.property.anonymous", + "ValueType": { + "$id": "3", + "Kind": "float32", + "Name": "float32", + "CrossLanguageDefinitionId": "TypeSpec.float32", + "Decorators": [] + }, + "Values": [ + { + "$id": "4", + "Name": "1.25", + "Value": 1.25, + "Decorators": [] + }, + { + "$id": "5", + "Name": "2.375", + "Value": 2.375, + "Decorators": [] + } + ], + "IsExtensible": false, + "Usage": "Input,Output,Json", + "Decorators": [] + }, + { + "$id": "6", + "Kind": "enum", + "Name": "UnionIntLiteralPropertyProperty", + "CrossLanguageDefinitionId": "UnionIntLiteralProperty.property.anonymous", + "ValueType": { + "$id": "7", + "Kind": "int32", + "Name": "int32", + "CrossLanguageDefinitionId": "TypeSpec.int32", + "Decorators": [] + }, + "Values": [ + { + "$id": "8", + "Name": "1", + "Value": 1, + "Decorators": [] + }, + { + "$id": "9", + "Name": "2", + "Value": 2, + "Decorators": [] + } + ], + "IsExtensible": false, + "Usage": "Input,Output,Json", + "Decorators": [] + }, + { + "$id": "10", + "Kind": "enum", + "Name": "UnionStringLiteralPropertyProperty", + "CrossLanguageDefinitionId": "UnionStringLiteralProperty.property.anonymous", + "ValueType": { + "$id": "11", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Values": [ + { + "$id": "12", + "Name": "hello", + "Value": "hello", + "Decorators": [] + }, + { + "$id": "13", + "Name": "world", + "Value": "world", + "Decorators": [] + } + ], + "IsExtensible": false, + "Usage": "Input,Output,Json", + "Decorators": [] + }, + { + "$id": "14", + "Kind": "enum", + "Name": "FloatLiteralProperty_property", + "ValueType": { + "$id": "15", + "Kind": "float32", + "Name": "float32", + "CrossLanguageDefinitionId": "TypeSpec.float32", + "Decorators": [] + }, + "Values": [ + { + "$id": "16", + "Name": "1.25", + "Value": 1.25, + "Description": "1.25" + } + ], + "CrossLanguageDefinitionId": "", + "Description": "The FloatLiteralProperty_property", + "IsExtensible": true, + "Usage": "Input,Output,Json", + "Decorators": [] + }, + { + "$id": "17", + "Kind": "enum", + "Name": "IntLiteralProperty_property", + "ValueType": { + "$id": "18", + "Kind": "int32", + "Name": "int32", + "CrossLanguageDefinitionId": "TypeSpec.int32", + "Decorators": [] + }, + "Values": [ + { + "$id": "19", + "Name": "1", + "Value": 1, + "Description": "1" + } + ], + "CrossLanguageDefinitionId": "", + "Description": "The IntLiteralProperty_property", + "IsExtensible": true, + "Usage": "Input,Output,Json", + "Decorators": [] + }, + { + "$id": "20", + "Kind": "enum", + "Name": "StringLiteralProperty_property", + "ValueType": { + "$id": "21", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Values": [ + { + "$id": "22", + "Name": "hello", + "Value": "hello", + "Description": "hello" + } + ], + "CrossLanguageDefinitionId": "", + "Description": "The StringLiteralProperty_property", + "IsExtensible": true, + "Usage": "Input,Output,Json", + "Decorators": [] + } + ], + "Models": [ + { + "$id": "23", + "Kind": "model", + "Name": "RequiredAndOptionalProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.RequiredAndOptionalProperty", + "Usage": "Input,Output,Json", + "Description": "Model with required and optional properties", + "Decorators": [], + "Properties": [ + { + "$id": "24", + "Name": "optionalProperty", + "SerializedName": "optionalProperty", + "Description": "optional string property", + "Type": { + "$id": "25", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + }, + { + "$id": "26", + "Name": "requiredProperty", + "SerializedName": "requiredProperty", + "Description": "required int property", + "Type": { + "$id": "27", + "Kind": "int32", + "Name": "int32", + "CrossLanguageDefinitionId": "TypeSpec.int32", + "Decorators": [] + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "28", + "Kind": "model", + "Name": "UnionFloatLiteralProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionFloatLiteralProperty", + "Usage": "Input,Output,Json", + "Description": "Model with union of float literal property", + "Decorators": [], + "Properties": [ + { + "$id": "29", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$ref": "2" + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "30", + "Kind": "model", + "Name": "UnionIntLiteralProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionIntLiteralProperty", + "Usage": "Input,Output,Json", + "Description": "Model with union of int literal property", + "Decorators": [], + "Properties": [ + { + "$id": "31", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$ref": "6" + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "32", + "Kind": "model", + "Name": "UnionStringLiteralProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionStringLiteralProperty", + "Usage": "Input,Output,Json", + "Description": "Model with union of string literal property", + "Decorators": [], + "Properties": [ + { + "$id": "33", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$ref": "10" + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "34", + "Kind": "model", + "Name": "BooleanLiteralProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.BooleanLiteralProperty", + "Usage": "Input,Output,Json", + "Description": "Model with boolean literal property", + "Decorators": [], + "Properties": [ + { + "$id": "35", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$id": "36", + "Kind": "constant", + "ValueType": { + "$id": "37", + "Kind": "boolean", + "Name": "boolean", + "CrossLanguageDefinitionId": "TypeSpec.boolean", + "Decorators": [] + }, + "Value": true, + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "38", + "Kind": "model", + "Name": "FloatLiteralProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.FloatLiteralProperty", + "Usage": "Input,Output,Json", + "Description": "Model with float literal property", + "Decorators": [], + "Properties": [ + { + "$id": "39", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$id": "40", + "Kind": "constant", + "ValueType": { + "$ref": "14" + }, + "Value": 1.25, + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "41", + "Kind": "model", + "Name": "IntLiteralProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.IntLiteralProperty", + "Usage": "Input,Output,Json", + "Description": "Model with int literal property", + "Decorators": [], + "Properties": [ + { + "$id": "42", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$id": "43", + "Kind": "constant", + "ValueType": { + "$ref": "17" + }, + "Value": 1, + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "44", + "Kind": "model", + "Name": "StringLiteralProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.StringLiteralProperty", + "Usage": "Input,Output,Json", + "Description": "Model with string literal property", + "Decorators": [], + "Properties": [ + { + "$id": "45", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$id": "46", + "Kind": "constant", + "ValueType": { + "$ref": "20" + }, + "Value": "hello", + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "47", + "Kind": "model", + "Name": "CollectionsModelProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.CollectionsModelProperty", + "Usage": "Input,Output,Json", + "Description": "Model with collection models properties", + "Decorators": [], + "Properties": [ + { + "$id": "48", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$id": "49", + "Kind": "array", + "Name": "ArrayStringProperty", + "ValueType": { + "$id": "50", + "Kind": "model", + "Name": "StringProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.StringProperty", + "Usage": "Input,Output,Json", + "Description": "Template type for testing models with optional property. Pass in the type of the property you are looking for", + "Decorators": [], + "Properties": [ + { + "$id": "51", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$id": "52", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + "CrossLanguageDefinitionId": "TypeSpec.Array", + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$ref": "50" + }, + { + "$id": "53", + "Kind": "model", + "Name": "CollectionsByteProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.CollectionsByteProperty", + "Usage": "Input,Output,Json", + "Description": "Model with collection bytes properties", + "Decorators": [], + "Properties": [ + { + "$id": "54", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$id": "55", + "Kind": "array", + "Name": "Array", + "ValueType": { + "$id": "56", + "Kind": "bytes", + "Name": "bytes", + "Encode": "base64", + "CrossLanguageDefinitionId": "TypeSpec.bytes", + "Decorators": [] + }, + "CrossLanguageDefinitionId": "TypeSpec.Array", + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "57", + "Kind": "model", + "Name": "PlainTimeProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.PlainTimeProperty", + "Usage": "Input,Output,Json", + "Description": "Model with a plainTime property", + "Decorators": [], + "Properties": [ + { + "$id": "58", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$id": "59", + "Kind": "plainTime", + "Name": "plainTime", + "CrossLanguageDefinitionId": "TypeSpec.plainTime", + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "60", + "Kind": "model", + "Name": "PlainDateProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.PlainDateProperty", + "Usage": "Input,Output,Json", + "Description": "Model with a plainDate property", + "Decorators": [], + "Properties": [ + { + "$id": "61", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$id": "62", + "Kind": "plainDate", + "Name": "plainDate", + "CrossLanguageDefinitionId": "TypeSpec.plainDate", + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "63", + "Kind": "model", + "Name": "DurationProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.DurationProperty", + "Usage": "Input,Output,Json", + "Description": "Model with a duration property", + "Decorators": [], + "Properties": [ + { + "$id": "64", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$id": "65", + "Kind": "duration", + "Name": "duration", + "Encode": "ISO8601", + "WireType": { + "$id": "66", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "CrossLanguageDefinitionId": "TypeSpec.duration", + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "67", + "Kind": "model", + "Name": "DatetimeProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.DatetimeProperty", + "Usage": "Input,Output,Json", + "Description": "Model with a datetime property", + "Decorators": [], + "Properties": [ + { + "$id": "68", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$id": "69", + "Kind": "utcDateTime", + "Name": "utcDateTime", + "Encode": "rfc3339", + "WireType": { + "$id": "70", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "CrossLanguageDefinitionId": "TypeSpec.utcDateTime", + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "71", + "Kind": "model", + "Name": "BytesProperty", + "CrossLanguageDefinitionId": "Type.Property.Optional.BytesProperty", + "Usage": "Input,Output,Json", + "Description": "Template type for testing models with optional property. Pass in the type of the property you are looking for", + "Decorators": [], + "Properties": [ + { + "$id": "72", + "Name": "property", + "SerializedName": "property", + "Description": "Property", + "Type": { + "$id": "73", + "Kind": "bytes", + "Name": "bytes", + "Encode": "base64", + "CrossLanguageDefinitionId": "TypeSpec.bytes", + "Decorators": [] + }, + "IsRequired": false, + "IsReadOnly": false, + "Decorators": [] + } + ] + } + ], + "Clients": [ + { + "$id": "74", + "Name": "OptionalClient", + "Description": "Illustrates models with optional properties.", + "Operations": [], + "Protocol": { + "$id": "75" + }, + "Parameters": [ + { + "$id": "76", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "77", + "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": "78", + "Type": { + "$id": "79", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + } + ], + "Decorators": [] + }, + { + "$id": "80", + "Name": "String", + "Operations": [ + { + "$id": "81", + "Name": "getAll", + "ResourceName": "String", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "82", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "83", + "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": "84", + "Type": { + "$id": "85", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "86", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "87", + "Kind": "constant", + "ValueType": { + "$id": "88", + "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": [] + } + ], + "Responses": [ + { + "$id": "89", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "50" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/string/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.String.getAll", + "Decorators": [] + }, + { + "$id": "90", + "Name": "getDefault", + "ResourceName": "String", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "82" + }, + { + "$id": "91", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "92", + "Kind": "constant", + "ValueType": { + "$id": "93", + "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": [] + } + ], + "Responses": [ + { + "$id": "94", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "50" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/string/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.String.getDefault", + "Decorators": [] + }, + { + "$id": "95", + "Name": "putAll", + "ResourceName": "String", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "82" + }, + { + "$id": "96", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "97", + "Kind": "constant", + "ValueType": { + "$id": "98", + "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": [] + }, + { + "$id": "99", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "50" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "100", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/string/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.String.putAll", + "Decorators": [] + }, + { + "$id": "101", + "Name": "putDefault", + "ResourceName": "String", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "82" + }, + { + "$id": "102", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "103", + "Kind": "constant", + "ValueType": { + "$id": "104", + "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": [] + }, + { + "$id": "105", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "50" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "106", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/string/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.String.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "107" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "82" + } + ], + "Decorators": [] + }, + { + "$id": "108", + "Name": "Bytes", + "Operations": [ + { + "$id": "109", + "Name": "getAll", + "ResourceName": "Bytes", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "110", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "111", + "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": "112", + "Type": { + "$id": "113", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "114", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "115", + "Kind": "constant", + "ValueType": { + "$id": "116", + "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": [] + } + ], + "Responses": [ + { + "$id": "117", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "71" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/bytes/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.Bytes.getAll", + "Decorators": [] + }, + { + "$id": "118", + "Name": "getDefault", + "ResourceName": "Bytes", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "110" + }, + { + "$id": "119", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "120", + "Kind": "constant", + "ValueType": { + "$id": "121", + "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": [] + } + ], + "Responses": [ + { + "$id": "122", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "71" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/bytes/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.Bytes.getDefault", + "Decorators": [] + }, + { + "$id": "123", + "Name": "putAll", + "ResourceName": "Bytes", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "110" + }, + { + "$id": "124", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "125", + "Kind": "constant", + "ValueType": { + "$id": "126", + "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": [] + }, + { + "$id": "127", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "71" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "128", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/bytes/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.Bytes.putAll", + "Decorators": [] + }, + { + "$id": "129", + "Name": "putDefault", + "ResourceName": "Bytes", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "110" + }, + { + "$id": "130", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "131", + "Kind": "constant", + "ValueType": { + "$id": "132", + "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": [] + }, + { + "$id": "133", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "71" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "134", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/bytes/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.Bytes.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "135" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "110" + } + ], + "Decorators": [] + }, + { + "$id": "136", + "Name": "Datetime", + "Operations": [ + { + "$id": "137", + "Name": "getAll", + "ResourceName": "Datetime", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "138", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "139", + "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": "140", + "Type": { + "$id": "141", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "142", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "143", + "Kind": "constant", + "ValueType": { + "$id": "144", + "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": [] + } + ], + "Responses": [ + { + "$id": "145", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "67" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/datetime/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.Datetime.getAll", + "Decorators": [] + }, + { + "$id": "146", + "Name": "getDefault", + "ResourceName": "Datetime", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "138" + }, + { + "$id": "147", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "148", + "Kind": "constant", + "ValueType": { + "$id": "149", + "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": [] + } + ], + "Responses": [ + { + "$id": "150", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "67" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/datetime/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.Datetime.getDefault", + "Decorators": [] + }, + { + "$id": "151", + "Name": "putAll", + "ResourceName": "Datetime", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "138" + }, + { + "$id": "152", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "153", + "Kind": "constant", + "ValueType": { + "$id": "154", + "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": [] + }, + { + "$id": "155", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "67" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "156", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/datetime/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.Datetime.putAll", + "Decorators": [] + }, + { + "$id": "157", + "Name": "putDefault", + "ResourceName": "Datetime", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "138" + }, + { + "$id": "158", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "159", + "Kind": "constant", + "ValueType": { + "$id": "160", + "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": [] + }, + { + "$id": "161", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "67" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "162", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/datetime/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.Datetime.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "163" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "138" + } + ], + "Decorators": [] + }, + { + "$id": "164", + "Name": "Duration", + "Operations": [ + { + "$id": "165", + "Name": "getAll", + "ResourceName": "Duration", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "166", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "167", + "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": "168", + "Type": { + "$id": "169", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "170", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "171", + "Kind": "constant", + "ValueType": { + "$id": "172", + "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": [] + } + ], + "Responses": [ + { + "$id": "173", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "63" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/duration/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.Duration.getAll", + "Decorators": [] + }, + { + "$id": "174", + "Name": "getDefault", + "ResourceName": "Duration", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "166" + }, + { + "$id": "175", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "176", + "Kind": "constant", + "ValueType": { + "$id": "177", + "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": [] + } + ], + "Responses": [ + { + "$id": "178", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "63" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/duration/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.Duration.getDefault", + "Decorators": [] + }, + { + "$id": "179", + "Name": "putAll", + "ResourceName": "Duration", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "166" + }, + { + "$id": "180", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "181", + "Kind": "constant", + "ValueType": { + "$id": "182", + "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": [] + }, + { + "$id": "183", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "63" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "184", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/duration/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.Duration.putAll", + "Decorators": [] + }, + { + "$id": "185", + "Name": "putDefault", + "ResourceName": "Duration", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "166" + }, + { + "$id": "186", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "187", + "Kind": "constant", + "ValueType": { + "$id": "188", + "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": [] + }, + { + "$id": "189", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "63" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "190", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/duration/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.Duration.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "191" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "166" + } + ], + "Decorators": [] + }, + { + "$id": "192", + "Name": "PlainDate", + "Operations": [ + { + "$id": "193", + "Name": "getAll", + "ResourceName": "PlainDate", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "194", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "195", + "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": "196", + "Type": { + "$id": "197", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "198", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "199", + "Kind": "constant", + "ValueType": { + "$id": "200", + "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": [] + } + ], + "Responses": [ + { + "$id": "201", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "60" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/plainDate/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.PlainDate.getAll", + "Decorators": [] + }, + { + "$id": "202", + "Name": "getDefault", + "ResourceName": "PlainDate", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "194" + }, + { + "$id": "203", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "204", + "Kind": "constant", + "ValueType": { + "$id": "205", + "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": [] + } + ], + "Responses": [ + { + "$id": "206", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "60" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/plainDate/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.PlainDate.getDefault", + "Decorators": [] + }, + { + "$id": "207", + "Name": "putAll", + "ResourceName": "PlainDate", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "194" + }, + { + "$id": "208", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "209", + "Kind": "constant", + "ValueType": { + "$id": "210", + "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": [] + }, + { + "$id": "211", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "60" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "212", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/plainDate/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.PlainDate.putAll", + "Decorators": [] + }, + { + "$id": "213", + "Name": "putDefault", + "ResourceName": "PlainDate", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "194" + }, + { + "$id": "214", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "215", + "Kind": "constant", + "ValueType": { + "$id": "216", + "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": [] + }, + { + "$id": "217", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "60" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "218", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/plainDate/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.PlainDate.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "219" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "194" + } + ], + "Decorators": [] + }, + { + "$id": "220", + "Name": "PlainTime", + "Operations": [ + { + "$id": "221", + "Name": "getAll", + "ResourceName": "PlainTime", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "222", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "223", + "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": "224", + "Type": { + "$id": "225", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "226", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "227", + "Kind": "constant", + "ValueType": { + "$id": "228", + "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": [] + } + ], + "Responses": [ + { + "$id": "229", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "57" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/plainTime/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.PlainTime.getAll", + "Decorators": [] + }, + { + "$id": "230", + "Name": "getDefault", + "ResourceName": "PlainTime", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "222" + }, + { + "$id": "231", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "232", + "Kind": "constant", + "ValueType": { + "$id": "233", + "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": [] + } + ], + "Responses": [ + { + "$id": "234", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "57" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/plainTime/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.PlainTime.getDefault", + "Decorators": [] + }, + { + "$id": "235", + "Name": "putAll", + "ResourceName": "PlainTime", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "222" + }, + { + "$id": "236", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "237", + "Kind": "constant", + "ValueType": { + "$id": "238", + "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": [] + }, + { + "$id": "239", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "57" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "240", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/plainTime/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.PlainTime.putAll", + "Decorators": [] + }, + { + "$id": "241", + "Name": "putDefault", + "ResourceName": "PlainTime", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "222" + }, + { + "$id": "242", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "243", + "Kind": "constant", + "ValueType": { + "$id": "244", + "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": [] + }, + { + "$id": "245", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "57" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "246", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/plainTime/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.PlainTime.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "247" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "222" + } + ], + "Decorators": [] + }, + { + "$id": "248", + "Name": "CollectionsByte", + "Operations": [ + { + "$id": "249", + "Name": "getAll", + "ResourceName": "CollectionsByte", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "250", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "251", + "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": "252", + "Type": { + "$id": "253", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "254", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "255", + "Kind": "constant", + "ValueType": { + "$id": "256", + "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": [] + } + ], + "Responses": [ + { + "$id": "257", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "53" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/collections/bytes/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.CollectionsByte.getAll", + "Decorators": [] + }, + { + "$id": "258", + "Name": "getDefault", + "ResourceName": "CollectionsByte", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "250" + }, + { + "$id": "259", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "260", + "Kind": "constant", + "ValueType": { + "$id": "261", + "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": [] + } + ], + "Responses": [ + { + "$id": "262", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "53" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/collections/bytes/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.CollectionsByte.getDefault", + "Decorators": [] + }, + { + "$id": "263", + "Name": "putAll", + "ResourceName": "CollectionsByte", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "250" + }, + { + "$id": "264", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "265", + "Kind": "constant", + "ValueType": { + "$id": "266", + "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": [] + }, + { + "$id": "267", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "53" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "268", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/collections/bytes/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.CollectionsByte.putAll", + "Decorators": [] + }, + { + "$id": "269", + "Name": "putDefault", + "ResourceName": "CollectionsByte", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "250" + }, + { + "$id": "270", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "271", + "Kind": "constant", + "ValueType": { + "$id": "272", + "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": [] + }, + { + "$id": "273", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "53" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "274", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/collections/bytes/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.CollectionsByte.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "275" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "250" + } + ], + "Decorators": [] + }, + { + "$id": "276", + "Name": "CollectionsModel", + "Operations": [ + { + "$id": "277", + "Name": "getAll", + "ResourceName": "CollectionsModel", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "278", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "279", + "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": "280", + "Type": { + "$id": "281", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "282", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "283", + "Kind": "constant", + "ValueType": { + "$id": "284", + "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": [] + } + ], + "Responses": [ + { + "$id": "285", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "47" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/collections/model/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.CollectionsModel.getAll", + "Decorators": [] + }, + { + "$id": "286", + "Name": "getDefault", + "ResourceName": "CollectionsModel", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "278" + }, + { + "$id": "287", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "288", + "Kind": "constant", + "ValueType": { + "$id": "289", + "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": [] + } + ], + "Responses": [ + { + "$id": "290", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "47" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/collections/model/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.CollectionsModel.getDefault", + "Decorators": [] + }, + { + "$id": "291", + "Name": "putAll", + "ResourceName": "CollectionsModel", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "278" + }, + { + "$id": "292", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "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": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "295", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "47" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "296", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/collections/model/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.CollectionsModel.putAll", + "Decorators": [] + }, + { + "$id": "297", + "Name": "putDefault", + "ResourceName": "CollectionsModel", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "278" + }, + { + "$id": "298", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "299", + "Kind": "constant", + "ValueType": { + "$id": "300", + "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": [] + }, + { + "$id": "301", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "47" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "302", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/collections/model/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.CollectionsModel.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "303" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "278" + } + ], + "Decorators": [] + }, + { + "$id": "304", + "Name": "StringLiteral", + "Operations": [ + { + "$id": "305", + "Name": "getAll", + "ResourceName": "StringLiteral", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "306", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "307", + "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": "308", + "Type": { + "$id": "309", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "310", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "311", + "Kind": "constant", + "ValueType": { + "$id": "312", + "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": [] + } + ], + "Responses": [ + { + "$id": "313", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "44" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/string/literal/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.StringLiteral.getAll", + "Decorators": [] + }, + { + "$id": "314", + "Name": "getDefault", + "ResourceName": "StringLiteral", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "306" + }, + { + "$id": "315", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "316", + "Kind": "constant", + "ValueType": { + "$id": "317", + "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": [] + } + ], + "Responses": [ + { + "$id": "318", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "44" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/string/literal/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.StringLiteral.getDefault", + "Decorators": [] + }, + { + "$id": "319", + "Name": "putAll", + "ResourceName": "StringLiteral", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "306" + }, + { + "$id": "320", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "321", + "Kind": "constant", + "ValueType": { + "$id": "322", + "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": [] + }, + { + "$id": "323", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "44" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "324", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/string/literal/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.StringLiteral.putAll", + "Decorators": [] + }, + { + "$id": "325", + "Name": "putDefault", + "ResourceName": "StringLiteral", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "306" + }, + { + "$id": "326", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "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": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "329", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "44" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "330", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/string/literal/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.StringLiteral.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "331" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "306" + } + ], + "Decorators": [] + }, + { + "$id": "332", + "Name": "IntLiteral", + "Operations": [ + { + "$id": "333", + "Name": "getAll", + "ResourceName": "IntLiteral", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "334", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "335", + "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": "336", + "Type": { + "$id": "337", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "338", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "339", + "Kind": "constant", + "ValueType": { + "$id": "340", + "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": [] + } + ], + "Responses": [ + { + "$id": "341", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "41" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/int/literal/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.IntLiteral.getAll", + "Decorators": [] + }, + { + "$id": "342", + "Name": "getDefault", + "ResourceName": "IntLiteral", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "334" + }, + { + "$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": [] + } + ], + "Responses": [ + { + "$id": "346", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "41" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/int/literal/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.IntLiteral.getDefault", + "Decorators": [] + }, + { + "$id": "347", + "Name": "putAll", + "ResourceName": "IntLiteral", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "334" + }, + { + "$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": [] + }, + { + "$id": "351", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "41" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "352", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/int/literal/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.IntLiteral.putAll", + "Decorators": [] + }, + { + "$id": "353", + "Name": "putDefault", + "ResourceName": "IntLiteral", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "334" + }, + { + "$id": "354", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "355", + "Kind": "constant", + "ValueType": { + "$id": "356", + "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": [] + }, + { + "$id": "357", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "41" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "358", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/int/literal/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.IntLiteral.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "359" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "334" + } + ], + "Decorators": [] + }, + { + "$id": "360", + "Name": "FloatLiteral", + "Operations": [ + { + "$id": "361", + "Name": "getAll", + "ResourceName": "FloatLiteral", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "362", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "363", + "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": "364", + "Type": { + "$id": "365", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "366", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "367", + "Kind": "constant", + "ValueType": { + "$id": "368", + "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": [] + } + ], + "Responses": [ + { + "$id": "369", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "38" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/float/literal/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.FloatLiteral.getAll", + "Decorators": [] + }, + { + "$id": "370", + "Name": "getDefault", + "ResourceName": "FloatLiteral", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "362" + }, + { + "$id": "371", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "372", + "Kind": "constant", + "ValueType": { + "$id": "373", + "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": [] + } + ], + "Responses": [ + { + "$id": "374", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "38" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/float/literal/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.FloatLiteral.getDefault", + "Decorators": [] + }, + { + "$id": "375", + "Name": "putAll", + "ResourceName": "FloatLiteral", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "362" + }, + { + "$id": "376", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "377", + "Kind": "constant", + "ValueType": { + "$id": "378", + "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": [] + }, + { + "$id": "379", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "38" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "380", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/float/literal/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.FloatLiteral.putAll", + "Decorators": [] + }, + { + "$id": "381", + "Name": "putDefault", + "ResourceName": "FloatLiteral", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "362" + }, + { + "$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": [] + }, + { + "$id": "385", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "38" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "386", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/float/literal/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.FloatLiteral.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "387" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "362" + } + ], + "Decorators": [] + }, + { + "$id": "388", + "Name": "BooleanLiteral", + "Operations": [ + { + "$id": "389", + "Name": "getAll", + "ResourceName": "BooleanLiteral", + "Description": "Get models that will return all properties in the model", + "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": [] + } + ], + "Responses": [ + { + "$id": "397", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "34" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/boolean/literal/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.BooleanLiteral.getAll", + "Decorators": [] + }, + { + "$id": "398", + "Name": "getDefault", + "ResourceName": "BooleanLiteral", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "390" + }, + { + "$id": "399", + "Name": "accept", + "NameInRequest": "Accept", + "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": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "402", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "34" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/boolean/literal/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.BooleanLiteral.getDefault", + "Decorators": [] + }, + { + "$id": "403", + "Name": "putAll", + "ResourceName": "BooleanLiteral", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "390" + }, + { + "$id": "404", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "405", + "Kind": "constant", + "ValueType": { + "$id": "406", + "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": [] + }, + { + "$id": "407", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "34" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "408", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/boolean/literal/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.BooleanLiteral.putAll", + "Decorators": [] + }, + { + "$id": "409", + "Name": "putDefault", + "ResourceName": "BooleanLiteral", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "390" + }, + { + "$id": "410", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "411", + "Kind": "constant", + "ValueType": { + "$id": "412", + "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": [] + }, + { + "$id": "413", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "34" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "414", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/boolean/literal/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.BooleanLiteral.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "415" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "390" + } + ], + "Decorators": [] + }, + { + "$id": "416", + "Name": "UnionStringLiteral", + "Operations": [ + { + "$id": "417", + "Name": "getAll", + "ResourceName": "UnionStringLiteral", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "418", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "419", + "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": "420", + "Type": { + "$id": "421", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "422", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "423", + "Kind": "constant", + "ValueType": { + "$id": "424", + "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": [] + } + ], + "Responses": [ + { + "$id": "425", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "32" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/union/string/literal/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionStringLiteral.getAll", + "Decorators": [] + }, + { + "$id": "426", + "Name": "getDefault", + "ResourceName": "UnionStringLiteral", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "418" + }, + { + "$id": "427", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "428", + "Kind": "constant", + "ValueType": { + "$id": "429", + "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": [] + } + ], + "Responses": [ + { + "$id": "430", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "32" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/union/string/literal/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionStringLiteral.getDefault", + "Decorators": [] + }, + { + "$id": "431", + "Name": "putAll", + "ResourceName": "UnionStringLiteral", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "418" + }, + { + "$id": "432", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "433", + "Kind": "constant", + "ValueType": { + "$id": "434", + "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": [] + }, + { + "$id": "435", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "32" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "436", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/union/string/literal/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionStringLiteral.putAll", + "Decorators": [] + }, + { + "$id": "437", + "Name": "putDefault", + "ResourceName": "UnionStringLiteral", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "418" + }, + { + "$id": "438", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "439", + "Kind": "constant", + "ValueType": { + "$id": "440", + "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": [] + }, + { + "$id": "441", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "32" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "442", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/union/string/literal/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionStringLiteral.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "443" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "418" + } + ], + "Decorators": [] + }, + { + "$id": "444", + "Name": "UnionIntLiteral", + "Operations": [ + { + "$id": "445", + "Name": "getAll", + "ResourceName": "UnionIntLiteral", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "446", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "447", + "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": "448", + "Type": { + "$id": "449", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "450", + "Name": "accept", + "NameInRequest": "Accept", + "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": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "453", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "30" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/union/int/literal/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionIntLiteral.getAll", + "Decorators": [] + }, + { + "$id": "454", + "Name": "getDefault", + "ResourceName": "UnionIntLiteral", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "446" + }, + { + "$id": "455", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "456", + "Kind": "constant", + "ValueType": { + "$id": "457", + "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": [] + } + ], + "Responses": [ + { + "$id": "458", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "30" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/union/int/literal/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionIntLiteral.getDefault", + "Decorators": [] + }, + { + "$id": "459", + "Name": "putAll", + "ResourceName": "UnionIntLiteral", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "446" + }, + { + "$id": "460", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "461", + "Kind": "constant", + "ValueType": { + "$id": "462", + "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": [] + }, + { + "$id": "463", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "30" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "464", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/union/int/literal/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionIntLiteral.putAll", + "Decorators": [] + }, + { + "$id": "465", + "Name": "putDefault", + "ResourceName": "UnionIntLiteral", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "446" + }, + { + "$id": "466", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "467", + "Kind": "constant", + "ValueType": { + "$id": "468", + "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": [] + }, + { + "$id": "469", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "30" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "470", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/union/int/literal/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionIntLiteral.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "471" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "446" + } + ], + "Decorators": [] + }, + { + "$id": "472", + "Name": "UnionFloatLiteral", + "Operations": [ + { + "$id": "473", + "Name": "getAll", + "ResourceName": "UnionFloatLiteral", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "474", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "475", + "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": "476", + "Type": { + "$id": "477", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "478", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "479", + "Kind": "constant", + "ValueType": { + "$id": "480", + "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": [] + } + ], + "Responses": [ + { + "$id": "481", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "28" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/union/float/literal/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionFloatLiteral.getAll", + "Decorators": [] + }, + { + "$id": "482", + "Name": "getDefault", + "ResourceName": "UnionFloatLiteral", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "474" + }, + { + "$id": "483", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "484", + "Kind": "constant", + "ValueType": { + "$id": "485", + "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": [] + } + ], + "Responses": [ + { + "$id": "486", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "28" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/union/float/literal/default", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionFloatLiteral.getDefault", + "Decorators": [] + }, + { + "$id": "487", + "Name": "putAll", + "ResourceName": "UnionFloatLiteral", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "474" + }, + { + "$id": "488", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "489", + "Kind": "constant", + "ValueType": { + "$id": "490", + "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": [] + }, + { + "$id": "491", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "28" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "492", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/union/float/literal/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionFloatLiteral.putAll", + "Decorators": [] + }, + { + "$id": "493", + "Name": "putDefault", + "ResourceName": "UnionFloatLiteral", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "474" + }, + { + "$id": "494", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "495", + "Kind": "constant", + "ValueType": { + "$id": "496", + "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": [] + }, + { + "$id": "497", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "28" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "498", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/union/float/literal/default", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.UnionFloatLiteral.putDefault", + "Decorators": [] + } + ], + "Protocol": { + "$id": "499" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "474" + } + ], + "Decorators": [] + }, + { + "$id": "500", + "Name": "RequiredAndOptional", + "Description": "Test optional and required properties", + "Operations": [ + { + "$id": "501", + "Name": "getAll", + "ResourceName": "RequiredAndOptional", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "502", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "503", + "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": "504", + "Type": { + "$id": "505", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "506", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "507", + "Kind": "constant", + "ValueType": { + "$id": "508", + "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": [] + } + ], + "Responses": [ + { + "$id": "509", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "23" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/requiredAndOptional/all", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.RequiredAndOptional.getAll", + "Decorators": [] + }, + { + "$id": "510", + "Name": "getRequiredOnly", + "ResourceName": "RequiredAndOptional", + "Description": "Get models that will return only the required properties", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "502" + }, + { + "$id": "511", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "512", + "Kind": "constant", + "ValueType": { + "$id": "513", + "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": [] + } + ], + "Responses": [ + { + "$id": "514", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "23" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/optional/requiredAndOptional/requiredOnly", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.RequiredAndOptional.getRequiredOnly", + "Decorators": [] + }, + { + "$id": "515", + "Name": "putAll", + "ResourceName": "RequiredAndOptional", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "502" + }, + { + "$id": "516", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "517", + "Kind": "constant", + "ValueType": { + "$id": "518", + "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": [] + }, + { + "$id": "519", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "23" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "520", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/requiredAndOptional/all", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.RequiredAndOptional.putAll", + "Decorators": [] + }, + { + "$id": "521", + "Name": "putRequiredOnly", + "ResourceName": "RequiredAndOptional", + "Description": "Put a body with only required properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "502" + }, + { + "$id": "522", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "523", + "Kind": "constant", + "ValueType": { + "$id": "524", + "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": [] + }, + { + "$id": "525", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "23" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "526", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/optional/requiredAndOptional/requiredOnly", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Optional.RequiredAndOptional.putRequiredOnly", + "Decorators": [] + } + ], + "Protocol": { + "$id": "527" + }, + "Parent": "OptionalClient", + "Parameters": [ + { + "$ref": "502" + } + ], + "Decorators": [] + } + ] +}