diff --git a/packages/http-client-csharp/eng/scripts/Generate.ps1 b/packages/http-client-csharp/eng/scripts/Generate.ps1 index d570ca10b9..fc4b6d8da6 100644 --- a/packages/http-client-csharp/eng/scripts/Generate.ps1 +++ b/packages/http-client-csharp/eng/scripts/Generate.ps1 @@ -79,7 +79,6 @@ $failingSpecs = @( Join-Path 'http' 'type' 'model' 'inheritance' 'recursive' Join-Path 'http' 'type' 'model' 'inheritance' 'single-discriminator' Join-Path 'http' 'type' 'property' 'additional-properties' - Join-Path 'http' 'type' 'property' 'nullable' Join-Path 'http' 'type' 'property' 'optionality' Join-Path 'http' 'type' 'property' 'value-types' ) diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/ScmMethodProviderCollection.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/ScmMethodProviderCollection.cs index 215fd89380..151c45478b 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/ScmMethodProviderCollection.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/ScmMethodProviderCollection.cs @@ -43,12 +43,21 @@ protected override IReadOnlyList BuildMethods() var syncProtocol = BuildProtocolMethod(_createRequestMethod, false); var asyncProtocol = BuildProtocolMethod(_createRequestMethod, true); + if (Operation.GenerateConvenienceMethod) + { + return + [ + syncProtocol, + asyncProtocol, + BuildConvenienceMethod(syncProtocol, false), + BuildConvenienceMethod(asyncProtocol, true), + ]; + } + return [ syncProtocol, asyncProtocol, - BuildConvenienceMethod(syncProtocol, false), - BuildConvenienceMethod(asyncProtocol, true), ]; } 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 c2aebfbb8b..3de9683c81 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 @@ -90,6 +90,11 @@ "commandName": "Executable", "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.Generator.CSharp.exe" }, + "http-type-property-nullable": { + "commandLineArgs": "$(SolutionDir)/TestProjects/CadlRanch/http/type/property/nullable -p StubLibraryPlugin", + "commandName": "Executable", + "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/Microsoft.Generator.CSharp/src/TypeFactory.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/TypeFactory.cs index 9e3268a171..159199a44d 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/TypeFactory.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/TypeFactory.cs @@ -269,6 +269,7 @@ protected virtual ParameterProvider CreateParameterCore(InputParameter parameter InputLiteralType literalType => GetSerializationFormat(literalType.ValueType), InputArrayType listType => GetSerializationFormat(listType.ValueType), InputDictionaryType dictionaryType => GetSerializationFormat(dictionaryType.ValueType), + InputNullableType nullableType => GetSerializationFormat(nullableType.Type), InputDateTimeType dateTimeType => dateTimeType.Encode switch { DateTimeKnownEncoding.Rfc3339 => SerializationFormat.DateTime_RFC3339, 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 new file mode 100644 index 0000000000..4c412d67f0 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Nullable/NullableTests.cs @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using _Type.Property.Nullable; +using System.Threading.Tasks; +using NUnit.Framework; +using AutoRest.TestServer.Tests.Infrastructure; +using System; +using System.Xml; +using System.ClientModel; +using System.Linq; + +namespace TestProjects.CadlRanch.Tests.Http._Type.Property.Nullable +{ + internal class NullableTests : CadlRanchTestBase + { + [CadlRanchTest] + public Task StringGetNonNull() => Test(async (host) => + { + var response = await new NullableClient(host, null).GetStringClient().GetNonNullAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("foo", response.Value.RequiredProperty); + Assert.AreEqual("hello", response.Value.NullableProperty); + }); + + [CadlRanchTest] + public Task StringGetNull() => Test(async (host) => + { + var response = await new NullableClient(host, null).GetStringClient().GetNullAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("foo", response.Value.RequiredProperty); + Assert.IsNull(response.Value.NullableProperty); + }); + + [CadlRanchTest] + public Task StringPatchNonNull() => Test(async (host) => + { + var value = new + { + requiredProperty = "foo", + nullableProperty = "hello" + }; + var response = await new NullableClient(host, null).GetStringClient().PatchNonNullAsync(BinaryContent.Create(BinaryData.FromObjectAsJson(value)), null); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task StringPatchNull() => Test(async (host) => + { + string value = "{ \"requiredProperty\": \"foo\", \"nullableProperty\": null }"; + var response = await new NullableClient(host, null).GetStringClient().PatchNullAsync(BinaryContent.Create(BinaryData.FromString(value)), null); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task BytesGetNonNull() => Test(async (host) => + { + var response = await new NullableClient(host, null).GetBytesClient().GetNonNullAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("foo", response.Value.RequiredProperty); + BinaryDataAssert.AreEqual(BinaryData.FromString("hello, world!"), response.Value.NullableProperty); + }); + + [CadlRanchTest] + public Task BytesGetNull() => Test(async (host) => + { + var response = await new NullableClient(host, null).GetBytesClient().GetNullAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("foo", response.Value.RequiredProperty); + Assert.IsNull(response.Value.NullableProperty); + }); + + [CadlRanchTest] + public Task BytesPatchNonNull() => Test(async (host) => + { + var value = new + { + requiredProperty = "foo", + // cspell: disable-next-line + nullableProperty = "aGVsbG8sIHdvcmxkIQ==" + }; + var response = await new NullableClient(host, null).GetBytesClient().PatchNonNullAsync(BinaryContent.Create(BinaryData.FromObjectAsJson(value)), null); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task BytesPatchNull() => Test(async (host) => + { + string value = "{ \"requiredProperty\": \"foo\", \"nullableProperty\": null }"; + var response = await new NullableClient(host, null).GetBytesClient().PatchNullAsync(BinaryContent.Create(BinaryData.FromString(value)), null); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task DatetimeTetNonNull() => Test(async (host) => + { + var response = await new NullableClient(host, null).GetDatetimeClient().GetNonNullAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("foo", response.Value.RequiredProperty); + Assert.AreEqual(DateTimeOffset.Parse("2022-08-26T18:38:00Z"), response.Value.NullableProperty); + }); + + [CadlRanchTest] + public Task DatetimeGetNull() => Test(async (host) => + { + var response = await new NullableClient(host, null).GetDatetimeClient().GetNullAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("foo", response.Value.RequiredProperty); + Assert.IsNull(response.Value.NullableProperty); + }); + + [CadlRanchTest] + public Task DatetimePatchNonNull() => Test(async (host) => + { + var value = new + { + requiredProperty = "foo", + nullableProperty = DateTimeOffset.Parse("2022-08-26T18:38:00Z") + }; + var response = await new NullableClient(host, null).GetDatetimeClient().PatchNonNullAsync(BinaryContent.Create(BinaryData.FromObjectAsJson(value)), null); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task Datetime_patchNull() => Test(async (host) => + { + string value = "{ \"requiredProperty\": \"foo\", \"nullableProperty\": null }"; + var response = await new NullableClient(host, null).GetDatetimeClient().PatchNullAsync(BinaryContent.Create(BinaryData.FromString(value)), null); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task DurationGetNonNull() => Test(async (host) => + { + var response = await new NullableClient(host, null).GetDurationClient().GetNonNullAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("foo", response.Value.RequiredProperty); + Assert.AreEqual(XmlConvert.ToTimeSpan("P123DT22H14M12.011S"), response.Value.NullableProperty); + }); + + [CadlRanchTest] + public Task Type_Property_Nullable_Duration_getNull() => Test(async (host) => + { + var response = await new NullableClient(host, null).GetDurationClient().GetNullAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("foo", response.Value.RequiredProperty); + Assert.IsNull(response.Value.NullableProperty); + }); + + [CadlRanchTest] + public Task DurationPatchNonNull() => Test(async (host) => + { + var value = new + { + requiredProperty = "foo", + nullableProperty = "P123DT22H14M12.011S" + }; + var response = await new NullableClient(host, null).GetDurationClient().PatchNonNullAsync(BinaryContent.Create(BinaryData.FromObjectAsJson(value)), null); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task DurationPatchNull() => Test(async (host) => + { + string value = "{ \"requiredProperty\": \"foo\", \"nullableProperty\": null }"; + var response = await new NullableClient(host, null).GetDurationClient().PatchNullAsync(BinaryContent.Create(BinaryData.FromString(value)), null); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task CollectionsByteGetNonNull() => Test(async (host) => + { + var response = await new NullableClient(host, null).GetCollectionsByteClient().GetNonNullAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("foo", response.Value.RequiredProperty); + Assert.AreEqual(2, response.Value.NullableProperty.Count); + BinaryDataAssert.AreEqual(BinaryData.FromString("hello, world!"), response.Value.NullableProperty.First()); + BinaryDataAssert.AreEqual(BinaryData.FromString("hello, world!"), response.Value.NullableProperty.Last()); + }); + + [CadlRanchTest] + public Task CollectionsByteGetNull() => Test(async (host) => + { + var response = await new NullableClient(host, null).GetCollectionsByteClient().GetNullAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("foo", response.Value.RequiredProperty); + Assert.IsNotNull(response.Value.NullableProperty); + }); + + [CadlRanchTest] + public Task CollectionsBytePatchNonNull() => Test(async (host) => + { + var value = new + { + requiredProperty = "foo", + // cspell: disable-next-line + nullableProperty = new[] { "aGVsbG8sIHdvcmxkIQ==", "aGVsbG8sIHdvcmxkIQ==" } + }; + var response = await new NullableClient(host, null).GetCollectionsByteClient().PatchNonNullAsync(BinaryContent.Create(BinaryData.FromObjectAsJson(value)), null); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task CollectionsBytePatchNull() => Test(async (host) => + { + string value = "{ \"requiredProperty\": \"foo\", \"nullableProperty\": null }"; + var response = await new NullableClient(host, null).GetCollectionsByteClient().PatchNullAsync(BinaryContent.Create(BinaryData.FromString(value)), null); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task CollectionsModelGetNonNull() => Test(async (host) => + { + var response = await new NullableClient(host, null).GetCollectionsModelClient().GetNonNullAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("foo", response.Value.RequiredProperty); + Assert.AreEqual(2, response.Value.NullableProperty.Count); + Assert.AreEqual("hello", response.Value.NullableProperty.First().Property); + Assert.AreEqual("world", response.Value.NullableProperty.Last().Property); + }); + + [CadlRanchTest] + public Task CollectionsModelGetNull() => Test(async (host) => + { + var response = await new NullableClient(host, null).GetCollectionsModelClient().GetNullAsync(); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("foo", response.Value.RequiredProperty); + Assert.IsNotNull(response.Value.NullableProperty); + }); + + [CadlRanchTest] + public Task CollectionsModelPatchNonNull() => Test(async (host) => + { + var value = new + { + requiredProperty = "foo", + nullableProperty = new[] + { + new + { + property = "hello" + }, + new + { + property = "world" + } + } + }; + var response = await new NullableClient(host, null).GetCollectionsModelClient().PatchNonNullAsync(BinaryContent.Create(BinaryData.FromObjectAsJson(value)), null); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [CadlRanchTest] + public Task CollectionsModelPatchNull() => Test(async (host) => + { + string value = "{ \"requiredProperty\": \"foo\", \"nullableProperty\": null }"; + var response = await new NullableClient(host, null).GetCollectionsModelClient().PatchNullAsync(BinaryContent.Create(BinaryData.FromString(value)), null); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/Configuration.json b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/Configuration.json new file mode 100644 index 0000000000..be2bce62c6 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/Configuration.json @@ -0,0 +1,6 @@ +{ + "output-folder": ".", + "namespace": "Type.Property.Nullable", + "library-name": "Type.Property.Nullable", + "use-model-reader-writer": true +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/_Type.Property.Nullable.sln b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/_Type.Property.Nullable.sln new file mode 100644 index 0000000000..c6b9239036 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/_Type.Property.Nullable.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.Nullable", "src\_Type.Property.Nullable.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/nullable/src/Generated/Bytes.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Bytes.cs new file mode 100644 index 0000000000..4db1dc799c --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Bytes.cs @@ -0,0 +1,42 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Nullable.Models; + +namespace _Type.Property.Nullable +{ + public partial class Bytes + { + protected Bytes() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetNonNull(RequestOptions options) => throw null; + + public virtual Task GetNonNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNonNull() => throw null; + + public virtual Task> GetNonNullAsync() => throw null; + + public virtual ClientResult GetNull(RequestOptions options) => throw null; + + public virtual Task GetNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNull() => throw null; + + public virtual Task> GetNullAsync() => throw null; + + public virtual ClientResult PatchNonNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNonNullAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PatchNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNullAsync(BinaryContent content, RequestOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsByte.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsByte.cs new file mode 100644 index 0000000000..cd7b959909 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsByte.cs @@ -0,0 +1,42 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Nullable.Models; + +namespace _Type.Property.Nullable +{ + public partial class CollectionsByte + { + protected CollectionsByte() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetNonNull(RequestOptions options) => throw null; + + public virtual Task GetNonNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNonNull() => throw null; + + public virtual Task> GetNonNullAsync() => throw null; + + public virtual ClientResult GetNull(RequestOptions options) => throw null; + + public virtual Task GetNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNull() => throw null; + + public virtual Task> GetNullAsync() => throw null; + + public virtual ClientResult PatchNonNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNonNullAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PatchNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNullAsync(BinaryContent content, RequestOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsModel.cs new file mode 100644 index 0000000000..d5b104ccc3 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsModel.cs @@ -0,0 +1,42 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Nullable.Models; + +namespace _Type.Property.Nullable +{ + public partial class CollectionsModel + { + protected CollectionsModel() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetNonNull(RequestOptions options) => throw null; + + public virtual Task GetNonNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNonNull() => throw null; + + public virtual Task> GetNonNullAsync() => throw null; + + public virtual ClientResult GetNull(RequestOptions options) => throw null; + + public virtual Task GetNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNull() => throw null; + + public virtual Task> GetNullAsync() => throw null; + + public virtual ClientResult PatchNonNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNonNullAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PatchNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNullAsync(BinaryContent content, RequestOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsString.cs new file mode 100644 index 0000000000..e8ab9c0720 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsString.cs @@ -0,0 +1,42 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Nullable.Models; + +namespace _Type.Property.Nullable +{ + public partial class CollectionsString + { + protected CollectionsString() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetNonNull(RequestOptions options) => throw null; + + public virtual Task GetNonNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNonNull() => throw null; + + public virtual Task> GetNonNullAsync() => throw null; + + public virtual ClientResult GetNull(RequestOptions options) => throw null; + + public virtual Task GetNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNull() => throw null; + + public virtual Task> GetNullAsync() => throw null; + + public virtual ClientResult PatchNonNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNonNullAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PatchNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNullAsync(BinaryContent content, RequestOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Datetime.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Datetime.cs new file mode 100644 index 0000000000..fc875ac29d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Datetime.cs @@ -0,0 +1,42 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Nullable.Models; + +namespace _Type.Property.Nullable +{ + public partial class Datetime + { + protected Datetime() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetNonNull(RequestOptions options) => throw null; + + public virtual Task GetNonNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNonNull() => throw null; + + public virtual Task> GetNonNullAsync() => throw null; + + public virtual ClientResult GetNull(RequestOptions options) => throw null; + + public virtual Task GetNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNull() => throw null; + + public virtual Task> GetNullAsync() => throw null; + + public virtual ClientResult PatchNonNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNonNullAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PatchNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNullAsync(BinaryContent content, RequestOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Duration.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Duration.cs new file mode 100644 index 0000000000..197390c3c3 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Duration.cs @@ -0,0 +1,42 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Nullable.Models; + +namespace _Type.Property.Nullable +{ + public partial class Duration + { + protected Duration() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetNonNull(RequestOptions options) => throw null; + + public virtual Task GetNonNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNonNull() => throw null; + + public virtual Task> GetNonNullAsync() => throw null; + + public virtual ClientResult GetNull(RequestOptions options) => throw null; + + public virtual Task GetNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNull() => throw null; + + public virtual Task> GetNullAsync() => throw null; + + public virtual ClientResult PatchNonNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNonNullAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PatchNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNullAsync(BinaryContent content, RequestOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/BytesProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/BytesProperty.Serialization.cs new file mode 100644 index 0000000000..d23336258f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/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.Nullable.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/nullable/src/Generated/Models/BytesProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/BytesProperty.cs new file mode 100644 index 0000000000..c9791192cb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/BytesProperty.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System; + +namespace _Type.Property.Nullable.Models +{ + public partial class BytesProperty + { + public string RequiredProperty + { + get => throw null; + set => throw null; + } + + + public BinaryData NullableProperty + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsByteProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsByteProperty.Serialization.cs new file mode 100644 index 0000000000..24db059da6 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/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.Nullable.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/nullable/src/Generated/Models/CollectionsByteProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsByteProperty.cs new file mode 100644 index 0000000000..af713ff531 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsByteProperty.cs @@ -0,0 +1,26 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.Nullable.Models +{ + public partial class CollectionsByteProperty + { + public string RequiredProperty + { + get => throw null; + set => throw null; + } + + + public IList NullableProperty + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsModelProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsModelProperty.Serialization.cs new file mode 100644 index 0000000000..78a34e7b7d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/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.Nullable.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/nullable/src/Generated/Models/CollectionsModelProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsModelProperty.cs new file mode 100644 index 0000000000..ce34e290a0 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsModelProperty.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace _Type.Property.Nullable.Models +{ + public partial class CollectionsModelProperty + { + public string RequiredProperty + { + get => throw null; + set => throw null; + } + + + public IList NullableProperty + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsStringProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsStringProperty.Serialization.cs new file mode 100644 index 0000000000..e4b44649c2 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsStringProperty.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Nullable.Models +{ + public partial class CollectionsStringProperty : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + CollectionsStringProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual CollectionsStringProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + CollectionsStringProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual CollectionsStringProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(CollectionsStringProperty collectionsStringProperty) => throw null; + + public static explicit operator CollectionsStringProperty(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsStringProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsStringProperty.cs new file mode 100644 index 0000000000..14fdf1da4f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/CollectionsStringProperty.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace _Type.Property.Nullable.Models +{ + public partial class CollectionsStringProperty + { + public CollectionsStringProperty(string requiredProperty, IEnumerable nullableProperty) => throw null; + + public string RequiredProperty + { + get => throw null; + set => throw null; + } + + + public IList NullableProperty + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/DatetimeProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/DatetimeProperty.Serialization.cs new file mode 100644 index 0000000000..c2c4df2db0 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/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.Nullable.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/nullable/src/Generated/Models/DatetimeProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/DatetimeProperty.cs new file mode 100644 index 0000000000..a62c65e9cc --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/DatetimeProperty.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System; + +namespace _Type.Property.Nullable.Models +{ + public partial class DatetimeProperty + { + public string RequiredProperty + { + get => throw null; + set => throw null; + } + + + public DateTimeOffset? NullableProperty + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/DurationProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/DurationProperty.Serialization.cs new file mode 100644 index 0000000000..cc57b70713 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/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.Nullable.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/nullable/src/Generated/Models/DurationProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/DurationProperty.cs new file mode 100644 index 0000000000..02b197e805 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/DurationProperty.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System; + +namespace _Type.Property.Nullable.Models +{ + public partial class DurationProperty + { + public string RequiredProperty + { + get => throw null; + set => throw null; + } + + + public TimeSpan? NullableProperty + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/InnerModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/InnerModel.Serialization.cs new file mode 100644 index 0000000000..eac6d6ef4a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/InnerModel.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace _Type.Property.Nullable.Models +{ + public partial class InnerModel : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + InnerModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual InnerModel JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + InnerModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual InnerModel PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static implicit operator BinaryContent(InnerModel innerModel) => throw null; + + public static explicit operator InnerModel(ClientResult result) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/InnerModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/InnerModel.cs new file mode 100644 index 0000000000..38fea168de --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/InnerModel.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +namespace _Type.Property.Nullable.Models +{ + public partial class InnerModel + { + public string Property + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/StringProperty.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/StringProperty.Serialization.cs new file mode 100644 index 0000000000..3739ae076a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/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.Nullable.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/nullable/src/Generated/Models/StringProperty.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/StringProperty.cs new file mode 100644 index 0000000000..e635e78e9d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Models/StringProperty.cs @@ -0,0 +1,23 @@ +// + +#nullable disable + +namespace _Type.Property.Nullable.Models +{ + public partial class StringProperty + { + public string RequiredProperty + { + get => throw null; + set => throw null; + } + + + public string NullableProperty + { + get => throw null; + set => throw null; + } + + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/NullableClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/NullableClient.cs new file mode 100644 index 0000000000..9632911841 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/NullableClient.cs @@ -0,0 +1,32 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; + +namespace _Type.Property.Nullable +{ + public partial class NullableClient + { + public NullableClient() : this(new Uri("http://localhost:3000"), new NullableClientOptions()) => throw null; + + public NullableClient(Uri endpoint, NullableClientOptions 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 CollectionsByte GetCollectionsByteClient() => throw null; + + public virtual CollectionsModel GetCollectionsModelClient() => throw null; + + public virtual CollectionsString GetCollectionsStringClient() => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/NullableClientOptions.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/NullableClientOptions.cs new file mode 100644 index 0000000000..d4939dbbb1 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/NullableClientOptions.cs @@ -0,0 +1,12 @@ +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace _Type.Property.Nullable +{ + public partial class NullableClientOptions : ClientPipelineOptions + { + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/String.cs new file mode 100644 index 0000000000..9745906d23 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/String.cs @@ -0,0 +1,42 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading.Tasks; +using _Type.Property.Nullable.Models; + +namespace _Type.Property.Nullable +{ + public partial class String + { + protected String() => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetNonNull(RequestOptions options) => throw null; + + public virtual Task GetNonNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNonNull() => throw null; + + public virtual Task> GetNonNullAsync() => throw null; + + public virtual ClientResult GetNull(RequestOptions options) => throw null; + + public virtual Task GetNullAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNull() => throw null; + + public virtual Task> GetNullAsync() => throw null; + + public virtual ClientResult PatchNonNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNonNullAsync(BinaryContent content, RequestOptions options) => throw null; + + public virtual ClientResult PatchNull(BinaryContent content, RequestOptions options) => throw null; + + public virtual Task PatchNullAsync(BinaryContent content, RequestOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/TypePropertyNullableModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/TypePropertyNullableModelFactory.cs new file mode 100644 index 0000000000..039aecf377 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/TypePropertyNullableModelFactory.cs @@ -0,0 +1,28 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _Type.Property.Nullable.Models +{ + public static partial class TypePropertyNullableModelFactory + { + public static CollectionsStringProperty CollectionsStringProperty(string requiredProperty = default, IEnumerable nullableProperty = default) => throw null; + + public static CollectionsModelProperty CollectionsModelProperty(string requiredProperty = default, IEnumerable nullableProperty = default) => throw null; + + public static InnerModel InnerModel(string @property = default) => throw null; + + public static CollectionsByteProperty CollectionsByteProperty(string requiredProperty = default, IEnumerable nullableProperty = default) => throw null; + + public static DurationProperty DurationProperty(string requiredProperty = default, TimeSpan? nullableProperty = default) => throw null; + + public static DatetimeProperty DatetimeProperty(string requiredProperty = default, DateTimeOffset? nullableProperty = default) => throw null; + + public static BytesProperty BytesProperty(string requiredProperty = default, BinaryData nullableProperty = default) => throw null; + + public static StringProperty StringProperty(string requiredProperty = default, string nullableProperty = default) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/_Type.Property.Nullable.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/_Type.Property.Nullable.csproj new file mode 100644 index 0000000000..1a23a30bad --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/_Type.Property.Nullable.csproj @@ -0,0 +1,16 @@ + + + This is the _Type.Property.Nullable client library for developing .NET applications with rich experience. + SDK Code Generation _Type.Property.Nullable + 1.0.0-beta.1 + _Type.Property.Nullable + netstandard2.0 + latest + true + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/tspCodeModel.json new file mode 100644 index 0000000000..00874b2136 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/tspCodeModel.json @@ -0,0 +1,2732 @@ +{ + "$id": "1", + "Name": "Type.Property.Nullable", + "ApiVersions": [], + "Enums": [], + "Models": [ + { + "$id": "2", + "Kind": "model", + "Name": "CollectionsStringProperty", + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsStringProperty", + "Usage": "Input,Output,JsonMergePatch,Json", + "Description": "Model with collection string properties", + "Decorators": [], + "Properties": [ + { + "$id": "3", + "Name": "requiredProperty", + "SerializedName": "requiredProperty", + "Description": "Required property", + "Type": { + "$id": "4", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + }, + { + "$id": "5", + "Name": "nullableProperty", + "SerializedName": "nullableProperty", + "Description": "Property", + "Type": { + "$id": "6", + "Kind": "nullable", + "Type": { + "$id": "7", + "Kind": "array", + "Name": "Array", + "ValueType": { + "$id": "8", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "CrossLanguageDefinitionId": "TypeSpec.Array", + "Decorators": [] + } + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "9", + "Kind": "model", + "Name": "CollectionsModelProperty", + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsModelProperty", + "Usage": "Output,Json", + "Description": "Model with collection models properties", + "Decorators": [], + "Properties": [ + { + "$id": "10", + "Name": "requiredProperty", + "SerializedName": "requiredProperty", + "Description": "Required property", + "Type": { + "$id": "11", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + }, + { + "$id": "12", + "Name": "nullableProperty", + "SerializedName": "nullableProperty", + "Description": "Property", + "Type": { + "$id": "13", + "Kind": "nullable", + "Type": { + "$id": "14", + "Kind": "array", + "Name": "ArrayInnerModel", + "ValueType": { + "$id": "15", + "Kind": "model", + "Name": "InnerModel", + "CrossLanguageDefinitionId": "Type.Property.Nullable.InnerModel", + "Usage": "Output,Json", + "Description": "Inner model used in collections model property", + "Decorators": [], + "Properties": [ + { + "$id": "16", + "Name": "property", + "SerializedName": "property", + "Description": "Inner model property", + "Type": { + "$id": "17", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + "CrossLanguageDefinitionId": "TypeSpec.Array", + "Decorators": [] + } + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$ref": "15" + }, + { + "$id": "18", + "Kind": "model", + "Name": "CollectionsByteProperty", + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsByteProperty", + "Usage": "Output,Json", + "Description": "Model with collection bytes properties", + "Decorators": [], + "Properties": [ + { + "$id": "19", + "Name": "requiredProperty", + "SerializedName": "requiredProperty", + "Description": "Required property", + "Type": { + "$id": "20", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + }, + { + "$id": "21", + "Name": "nullableProperty", + "SerializedName": "nullableProperty", + "Description": "Property", + "Type": { + "$id": "22", + "Kind": "nullable", + "Type": { + "$id": "23", + "Kind": "array", + "Name": "Array", + "ValueType": { + "$id": "24", + "Kind": "bytes", + "Name": "bytes", + "Encode": "base64", + "CrossLanguageDefinitionId": "TypeSpec.bytes", + "Decorators": [] + }, + "CrossLanguageDefinitionId": "TypeSpec.Array", + "Decorators": [] + } + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "25", + "Kind": "model", + "Name": "DurationProperty", + "CrossLanguageDefinitionId": "Type.Property.Nullable.DurationProperty", + "Usage": "Output,Json", + "Description": "Model with a duration property", + "Decorators": [], + "Properties": [ + { + "$id": "26", + "Name": "requiredProperty", + "SerializedName": "requiredProperty", + "Description": "Required property", + "Type": { + "$id": "27", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + }, + { + "$id": "28", + "Name": "nullableProperty", + "SerializedName": "nullableProperty", + "Description": "Property", + "Type": { + "$id": "29", + "Kind": "nullable", + "Type": { + "$id": "30", + "Kind": "duration", + "Name": "duration", + "Encode": "ISO8601", + "WireType": { + "$id": "31", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "CrossLanguageDefinitionId": "TypeSpec.duration", + "Decorators": [] + } + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "32", + "Kind": "model", + "Name": "DatetimeProperty", + "CrossLanguageDefinitionId": "Type.Property.Nullable.DatetimeProperty", + "Usage": "Output,Json", + "Description": "Model with a datetime property", + "Decorators": [], + "Properties": [ + { + "$id": "33", + "Name": "requiredProperty", + "SerializedName": "requiredProperty", + "Description": "Required property", + "Type": { + "$id": "34", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + }, + { + "$id": "35", + "Name": "nullableProperty", + "SerializedName": "nullableProperty", + "Description": "Property", + "Type": { + "$id": "36", + "Kind": "nullable", + "Type": { + "$id": "37", + "Kind": "utcDateTime", + "Name": "utcDateTime", + "Encode": "rfc3339", + "WireType": { + "$id": "38", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "CrossLanguageDefinitionId": "TypeSpec.utcDateTime", + "Decorators": [] + } + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "39", + "Kind": "model", + "Name": "BytesProperty", + "CrossLanguageDefinitionId": "Type.Property.Nullable.BytesProperty", + "Usage": "Output,Json", + "Description": "Template type for testing models with nullable property. Pass in the type of the property you are looking for", + "Decorators": [], + "Properties": [ + { + "$id": "40", + "Name": "requiredProperty", + "SerializedName": "requiredProperty", + "Description": "Required property", + "Type": { + "$id": "41", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + }, + { + "$id": "42", + "Name": "nullableProperty", + "SerializedName": "nullableProperty", + "Description": "Property", + "Type": { + "$id": "43", + "Kind": "nullable", + "Type": { + "$id": "44", + "Kind": "bytes", + "Name": "bytes", + "Encode": "base64", + "CrossLanguageDefinitionId": "TypeSpec.bytes", + "Decorators": [] + } + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + } + ] + }, + { + "$id": "45", + "Kind": "model", + "Name": "StringProperty", + "CrossLanguageDefinitionId": "Type.Property.Nullable.StringProperty", + "Usage": "Output,Json", + "Description": "Template type for testing models with nullable property. Pass in the type of the property you are looking for", + "Decorators": [], + "Properties": [ + { + "$id": "46", + "Name": "requiredProperty", + "SerializedName": "requiredProperty", + "Description": "Required property", + "Type": { + "$id": "47", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + }, + { + "$id": "48", + "Name": "nullableProperty", + "SerializedName": "nullableProperty", + "Description": "Property", + "Type": { + "$id": "49", + "Kind": "nullable", + "Type": { + "$id": "50", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + } + }, + "IsRequired": true, + "IsReadOnly": false, + "Decorators": [] + } + ] + } + ], + "Clients": [ + { + "$id": "51", + "Name": "NullableClient", + "Description": "Illustrates models with nullable properties.", + "Operations": [], + "Protocol": { + "$id": "52" + }, + "Parameters": [ + { + "$id": "53", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "54", + "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": "55", + "Type": { + "$id": "56", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + } + ], + "Decorators": [] + }, + { + "$id": "57", + "Name": "String", + "Operations": [ + { + "$id": "58", + "Name": "getNonNull", + "ResourceName": "String", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "59", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "60", + "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": "61", + "Type": { + "$id": "62", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$id": "63", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "64", + "Kind": "constant", + "ValueType": { + "$id": "65", + "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": "66", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "45" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/string/non-null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.String.getNonNull", + "Decorators": [] + }, + { + "$id": "67", + "Name": "getNull", + "ResourceName": "String", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "59" + }, + { + "$id": "68", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "69", + "Kind": "constant", + "ValueType": { + "$id": "70", + "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": "71", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "45" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/string/null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.String.getNull", + "Decorators": [] + }, + { + "$id": "72", + "Name": "patchNonNull", + "ResourceName": "String", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "59" + }, + { + "$id": "73", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "74", + "Kind": "constant", + "ValueType": { + "$id": "75", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "76", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "45" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "77", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/string/non-null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.String.patchNonNull", + "Decorators": [] + }, + { + "$id": "78", + "Name": "patchNull", + "ResourceName": "String", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "59" + }, + { + "$id": "79", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "80", + "Kind": "constant", + "ValueType": { + "$id": "81", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "82", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "45" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "83", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/string/null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.String.patchNull", + "Decorators": [] + } + ], + "Protocol": { + "$id": "84" + }, + "Parent": "NullableClient", + "Parameters": [ + { + "$ref": "59" + } + ], + "Decorators": [] + }, + { + "$id": "85", + "Name": "Bytes", + "Operations": [ + { + "$id": "86", + "Name": "getNonNull", + "ResourceName": "Bytes", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "87", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "88", + "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": "89", + "Type": { + "$id": "90", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$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": "39" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/bytes/non-null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.Bytes.getNonNull", + "Decorators": [] + }, + { + "$id": "95", + "Name": "getNull", + "ResourceName": "Bytes", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "87" + }, + { + "$id": "96", + "Name": "accept", + "NameInRequest": "Accept", + "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": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "99", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "39" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/bytes/null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.Bytes.getNull", + "Decorators": [] + }, + { + "$id": "100", + "Name": "patchNonNull", + "ResourceName": "Bytes", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "87" + }, + { + "$id": "101", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "102", + "Kind": "constant", + "ValueType": { + "$id": "103", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "104", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "39" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "105", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/bytes/non-null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.Bytes.patchNonNull", + "Decorators": [] + }, + { + "$id": "106", + "Name": "patchNull", + "ResourceName": "Bytes", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "87" + }, + { + "$id": "107", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "108", + "Kind": "constant", + "ValueType": { + "$id": "109", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "110", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "39" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "111", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/bytes/null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.Bytes.patchNull", + "Decorators": [] + } + ], + "Protocol": { + "$id": "112" + }, + "Parent": "NullableClient", + "Parameters": [ + { + "$ref": "87" + } + ], + "Decorators": [] + }, + { + "$id": "113", + "Name": "Datetime", + "Operations": [ + { + "$id": "114", + "Name": "getNonNull", + "ResourceName": "Datetime", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "115", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "116", + "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": "117", + "Type": { + "$id": "118", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$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": "32" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/datetime/non-null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.Datetime.getNonNull", + "Decorators": [] + }, + { + "$id": "123", + "Name": "getNull", + "ResourceName": "Datetime", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "115" + }, + { + "$id": "124", + "Name": "accept", + "NameInRequest": "Accept", + "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": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "127", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "32" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/datetime/null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.Datetime.getNull", + "Decorators": [] + }, + { + "$id": "128", + "Name": "patchNonNull", + "ResourceName": "Datetime", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "115" + }, + { + "$id": "129", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "130", + "Kind": "constant", + "ValueType": { + "$id": "131", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "132", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "32" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "133", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/datetime/non-null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.Datetime.patchNonNull", + "Decorators": [] + }, + { + "$id": "134", + "Name": "patchNull", + "ResourceName": "Datetime", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "115" + }, + { + "$id": "135", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "136", + "Kind": "constant", + "ValueType": { + "$id": "137", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "138", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "32" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "139", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/datetime/null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.Datetime.patchNull", + "Decorators": [] + } + ], + "Protocol": { + "$id": "140" + }, + "Parent": "NullableClient", + "Parameters": [ + { + "$ref": "115" + } + ], + "Decorators": [] + }, + { + "$id": "141", + "Name": "Duration", + "Operations": [ + { + "$id": "142", + "Name": "getNonNull", + "ResourceName": "Duration", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "143", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "144", + "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": "145", + "Type": { + "$id": "146", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$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": "25" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/duration/non-null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.Duration.getNonNull", + "Decorators": [] + }, + { + "$id": "151", + "Name": "getNull", + "ResourceName": "Duration", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "143" + }, + { + "$id": "152", + "Name": "accept", + "NameInRequest": "Accept", + "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": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "155", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "25" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/duration/null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.Duration.getNull", + "Decorators": [] + }, + { + "$id": "156", + "Name": "patchNonNull", + "ResourceName": "Duration", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "143" + }, + { + "$id": "157", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "158", + "Kind": "constant", + "ValueType": { + "$id": "159", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "160", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "25" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "161", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/duration/non-null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.Duration.patchNonNull", + "Decorators": [] + }, + { + "$id": "162", + "Name": "patchNull", + "ResourceName": "Duration", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "143" + }, + { + "$id": "163", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "164", + "Kind": "constant", + "ValueType": { + "$id": "165", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "166", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "25" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "167", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/duration/null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.Duration.patchNull", + "Decorators": [] + } + ], + "Protocol": { + "$id": "168" + }, + "Parent": "NullableClient", + "Parameters": [ + { + "$ref": "143" + } + ], + "Decorators": [] + }, + { + "$id": "169", + "Name": "CollectionsByte", + "Operations": [ + { + "$id": "170", + "Name": "getNonNull", + "ResourceName": "CollectionsByte", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "171", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "172", + "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": "173", + "Type": { + "$id": "174", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$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": "18" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/collections/bytes/non-null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsByte.getNonNull", + "Decorators": [] + }, + { + "$id": "179", + "Name": "getNull", + "ResourceName": "CollectionsByte", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "171" + }, + { + "$id": "180", + "Name": "accept", + "NameInRequest": "Accept", + "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": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "183", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "18" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/collections/bytes/null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsByte.getNull", + "Decorators": [] + }, + { + "$id": "184", + "Name": "patchNonNull", + "ResourceName": "CollectionsByte", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "171" + }, + { + "$id": "185", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "186", + "Kind": "constant", + "ValueType": { + "$id": "187", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "188", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "18" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "189", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/collections/bytes/non-null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsByte.patchNonNull", + "Decorators": [] + }, + { + "$id": "190", + "Name": "patchNull", + "ResourceName": "CollectionsByte", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "171" + }, + { + "$id": "191", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "192", + "Kind": "constant", + "ValueType": { + "$id": "193", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "194", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "18" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "195", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/collections/bytes/null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsByte.patchNull", + "Decorators": [] + } + ], + "Protocol": { + "$id": "196" + }, + "Parent": "NullableClient", + "Parameters": [ + { + "$ref": "171" + } + ], + "Decorators": [] + }, + { + "$id": "197", + "Name": "CollectionsModel", + "Operations": [ + { + "$id": "198", + "Name": "getNonNull", + "ResourceName": "CollectionsModel", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "199", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "200", + "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": "201", + "Type": { + "$id": "202", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$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": "9" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/collections/model/non-null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsModel.getNonNull", + "Decorators": [] + }, + { + "$id": "207", + "Name": "getNull", + "ResourceName": "CollectionsModel", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "199" + }, + { + "$id": "208", + "Name": "accept", + "NameInRequest": "Accept", + "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": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "211", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "9" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/collections/model/null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsModel.getNull", + "Decorators": [] + }, + { + "$id": "212", + "Name": "patchNonNull", + "ResourceName": "CollectionsModel", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "199" + }, + { + "$id": "213", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "214", + "Kind": "constant", + "ValueType": { + "$id": "215", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "216", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "9" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "217", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/collections/model/non-null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsModel.patchNonNull", + "Decorators": [] + }, + { + "$id": "218", + "Name": "patchNull", + "ResourceName": "CollectionsModel", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "199" + }, + { + "$id": "219", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "220", + "Kind": "constant", + "ValueType": { + "$id": "221", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "222", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "9" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "223", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/collections/model/null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsModel.patchNull", + "Decorators": [] + } + ], + "Protocol": { + "$id": "224" + }, + "Parent": "NullableClient", + "Parameters": [ + { + "$ref": "199" + } + ], + "Decorators": [] + }, + { + "$id": "225", + "Name": "CollectionsString", + "Operations": [ + { + "$id": "226", + "Name": "getNonNull", + "ResourceName": "CollectionsString", + "Description": "Get models that will return all properties in the model", + "Accessibility": "public", + "Parameters": [ + { + "$id": "227", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "228", + "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": "229", + "Type": { + "$id": "230", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "http://localhost:3000" + } + }, + { + "$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": "2" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/collections/string/non-null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsString.getNonNull", + "Decorators": [] + }, + { + "$id": "235", + "Name": "getNull", + "ResourceName": "CollectionsString", + "Description": "Get models that will return the default object", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "227" + }, + { + "$id": "236", + "Name": "accept", + "NameInRequest": "Accept", + "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": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "239", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/collections/string/null", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsString.getNull", + "Decorators": [] + }, + { + "$id": "240", + "Name": "patchNonNull", + "ResourceName": "CollectionsString", + "Description": "Put a body with all properties present.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "227" + }, + { + "$id": "241", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "242", + "Kind": "constant", + "ValueType": { + "$id": "243", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "244", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "2" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "245", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/collections/string/non-null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsString.patchNonNull", + "Decorators": [] + }, + { + "$id": "246", + "Name": "patchNull", + "ResourceName": "CollectionsString", + "Description": "Put a body with default properties.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "227" + }, + { + "$id": "247", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "content-type is application/merge-patch+json", + "Type": { + "$id": "248", + "Kind": "constant", + "ValueType": { + "$id": "249", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/merge-patch+json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "250", + "Name": "body", + "NameInRequest": "body", + "Type": { + "$ref": "2" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "251", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/type/property/nullable/collections/string/null", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Type.Property.Nullable.CollectionsString.patchNull", + "Decorators": [] + } + ], + "Protocol": { + "$id": "252" + }, + "Parent": "NullableClient", + "Parameters": [ + { + "$ref": "227" + } + ], + "Decorators": [] + } + ] +} diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Unbranded-TypeSpec/src/Generated/UnbrandedTypeSpecClient.cs b/packages/http-client-csharp/generator/TestProjects/Local/Unbranded-TypeSpec/src/Generated/UnbrandedTypeSpecClient.cs index 21d3f1aa5f..89fb7961b9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Unbranded-TypeSpec/src/Generated/UnbrandedTypeSpecClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Unbranded-TypeSpec/src/Generated/UnbrandedTypeSpecClient.cs @@ -263,38 +263,6 @@ public virtual async Task NoContentTypeAsync(string p2, string p1, return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - /// Return hi again. - /// - /// - /// - /// , or is null. - /// Service returned a non-success status code. - public virtual ClientResult NoContentType(string p2, string p1, RoundTripModel action) - { - Argument.AssertNotNull(p2, nameof(p2)); - Argument.AssertNotNull(p1, nameof(p1)); - Argument.AssertNotNull(action, nameof(action)); - - ClientResult result = NoContentType(p2, p1, action, null); - return ClientResult.FromValue((RoundTripModel)result, result.GetRawResponse()); - } - - /// Return hi again. - /// - /// - /// - /// , or is null. - /// Service returned a non-success status code. - public virtual async Task> NoContentTypeAsync(string p2, string p1, RoundTripModel action) - { - Argument.AssertNotNull(p2, nameof(p2)); - Argument.AssertNotNull(p1, nameof(p1)); - Argument.AssertNotNull(action, nameof(action)); - - ClientResult result = await NoContentTypeAsync(p2, p1, action, null).ConfigureAwait(false); - return ClientResult.FromValue((RoundTripModel)result, result.GetRawResponse()); - } - /// /// [Protocol Method] Return hi in demo2 /// @@ -549,22 +517,6 @@ public virtual async Task TopAction2Async(RequestOptions options) return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - /// top level method2. - /// Service returned a non-success status code. - public virtual ClientResult TopAction2() - { - ClientResult result = TopAction2(null); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); - } - - /// top level method2. - /// Service returned a non-success status code. - public virtual async Task> TopAction2Async() - { - ClientResult result = await TopAction2Async(null).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); - } - /// /// [Protocol Method] top level patch /// @@ -607,30 +559,6 @@ public virtual async Task PatchActionAsync(BinaryContent content, return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - /// top level patch. - /// - /// is null. - /// Service returned a non-success status code. - public virtual ClientResult PatchAction(Thing body) - { - Argument.AssertNotNull(body, nameof(body)); - - ClientResult result = PatchAction(body, null); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); - } - - /// top level patch. - /// - /// is null. - /// Service returned a non-success status code. - public virtual async Task> PatchActionAsync(Thing body) - { - Argument.AssertNotNull(body, nameof(body)); - - ClientResult result = await PatchActionAsync(body, null).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); - } - /// /// [Protocol Method] body parameter without body decorator ///