From 12f4dbd8173612e348b61cecd5df352beea2305f Mon Sep 17 00:00:00 2001 From: Jorge Rangel Date: Tue, 17 Nov 2026 17:35:43 -0600 Subject: [PATCH 1/3] feat: add support for model proxies --- .../DiscriminatedUnionSerialization.cs | 4 +- ...elSerializationExtensionsDefinition.Xml.cs | 19 ++ .../ModelSerializationExtensionsDefinition.cs | 39 ++- .../MrwSerializationTypeDefinition.Xml.cs | 31 ++- .../MrwSerializationTypeDefinition.cs | 44 ++- .../ModelReaderWriterOptionsSnippets.cs | 5 + ...odelSerializationExtensionsSnippets.Xml.cs | 3 + .../ModelSerializationExtensionsSnippets.cs | 6 + .../src/Snippets/XElementSnippets.cs | 3 + ...lSerializationExtensionsDefinitionTests.cs | 48 ++++ ...alidateGetUtf8BytesMethodsWithXmlModels.cs | 25 ++ .../ValidateShouldReadThroughProxyMethod.cs | 17 ++ ...bjectValueIncludesFileBinaryContentCase.cs | 7 +- ...ateWriteObjectValueResolvesModelProxies.cs | 118 ++++++++ ...ctValueXmlIncludesFileBinaryContentCase.cs | 7 +- .../DeserializationTests.cs | 46 ++++ ...estedModelReadsRouteThroughModelProxies.cs | 74 +++++ .../DeserializeArrayProperties.cs | 2 +- .../DeserializeDictionaryProperties.cs | 2 +- .../DeserializeModelPropertyType.cs | 2 +- .../DeserializeModelWithAP.cs | 2 +- ...DeserializationMethodHandlesNestedModel.cs | 3 +- ...esDualFormatNestedModelOnlyForXmlFormat.cs | 51 ++++ .../XmlDeserializationTests.cs | 28 ++ ...extualEnvelopeSerialization(kind,value).cs | 5 +- ...textualEnvelopeSerialization(type,data).cs | 5 +- .../src/Primitives/NewProjectScaffolding.cs | 2 +- .../generator/Packages.Data.props | 2 +- .../Local.Tests/ModelProxyTests.cs | 259 ++++++++++++++++++ .../Internal/ModelSerializationExtensions.cs | 14 +- .../CollisionPetsUnion.Serialization.cs | 2 +- .../DescendantUnionPet.Serialization.cs | 2 +- .../DeserializePetsUnion.Serialization.cs | 2 +- .../Models/DeserializerPet.Serialization.cs | 2 +- .../Models/DirectUnionPet.Serialization.cs | 2 +- .../DirectUnionPetContainer.Serialization.cs | 2 +- .../Models/DynamicModel.Serialization.cs | 14 +- .../Models/LifecycleModel.Serialization.cs | 2 +- ...TokenHeaderResponseResult.Serialization.cs | 2 +- ...thContinuationTokenResult.Serialization.cs | 2 +- .../ListWithNextLinkResult.Serialization.cs | 2 +- ...tWithStringNextLinkResult.Serialization.cs | 2 +- .../Models/NestedMammal.Serialization.cs | 4 +- .../NullableDynamicModel.Serialization.cs | 14 +- ...OptionalNullableContainer.Serialization.cs | 2 +- ...ptionalNullableProperties.Serialization.cs | 2 +- .../PagePreviewDetails.Serialization.cs | 2 +- .../Models/PageThing.Serialization.cs | 2 +- .../Models/RebasedUnionA.Serialization.cs | 2 +- .../Models/RebasedUnionB.Serialization.cs | 2 +- .../Models/RebasedUnionPet.Serialization.cs | 4 +- .../Models/RoundTripModel.Serialization.cs | 4 +- .../SerializePetsUnion.Serialization.cs | 2 +- .../Models/UnionPet.Serialization.cs | 8 +- .../Generated/Models/Wrapper.Serialization.cs | 2 +- .../Models/XmlAdvancedModel.Serialization.cs | 24 +- .../Models/XmlUnionPet.Serialization.cs | 2 +- .../Sample-TypeSpec/src/SampleTypeSpec.csproj | 2 +- .../api-key/src/Authentication.ApiKey.csproj | 2 +- .../src/Authentication.Http.Custom.csproj | 2 +- .../oauth2/src/Authentication.OAuth2.csproj | 2 +- .../union/src/Authentication.Union.csproj | 2 +- ...ClientGenerator.Core.ResponseAsBool.csproj | 2 +- ...tGenerator.Core.ResponseReplacement.csproj | 2 +- .../src/Client.Structure.Service.csproj | 2 +- .../Client.Structure.Service.Default.csproj | 2 +- ...ient.Structure.Service.Multi.Client.csproj | 2 +- ...Structure.Service.Renamed.Operation.csproj | 2 +- ...Structure.Service.TwoOperationGroup.csproj | 2 +- .../documentation/src/Documentation.csproj | 2 +- .../http/encode/array/src/Encode.Array.csproj | 2 +- .../encode/boolean/src/Encode.Boolean.csproj | 2 +- .../http/encode/bytes/src/Encode.Bytes.csproj | 2 +- .../datetime/src/Encode.Datetime.csproj | 2 +- .../duration/src/Encode.Duration.csproj | 2 +- .../encode/numeric/src/Encode.Numeric.csproj | 2 +- .../basic/src/Parameters.Basic.csproj | 2 +- .../src/Parameters.BodyOptionality.csproj | 2 +- .../body-root/src/Parameters.BodyRoot.csproj | 2 +- .../src/Parameters.CollectionFormat.csproj | 2 +- .../path/src/Parameters.Path.csproj | 2 +- .../query/src/Parameters.Query.csproj | 2 +- .../spread/src/Parameters.Spread.csproj | 2 +- .../src/Payload.ContentNegotiation.csproj | 2 +- .../http/payload/head/src/Payload.Head.csproj | 2 +- .../src/Payload.JsonMergePatch.csproj | 2 +- .../media-type/src/Payload.MediaType.csproj | 2 +- .../multipart/src/Payload.MultiPart.csproj | 2 +- .../pageable/src/Payload.Pageable.csproj | 2 +- .../http/payload/xml/src/Payload.Xml.csproj | 2 +- .../v1/src/Resiliency.SrvDriven.V1.csproj | 2 +- .../v2/src/Resiliency.SrvDriven.V2.csproj | 2 +- .../src/Response.BodyOrNoContent.csproj | 2 +- .../src/Response.StatusCodeRange.csproj | 2 +- .../Spector/http/routes/src/Routes.csproj | 2 +- .../src/Serialization.EncodedName.Json.csproj | 2 +- .../src/Server.Endpoint.NotDefined.csproj | 2 +- .../multiple/src/Server.Path.Multiple.csproj | 2 +- .../path/single/src/Server.Path.Single.csproj | 2 +- .../src/Server.Versions.NotVersioned.csproj | 2 +- .../src/Server.Versions.Versioned.csproj | 2 +- .../src/Service.MultipleServices.csproj | 2 +- .../SpecialHeaders.ConditionalRequest.csproj | 2 +- .../src/SpecialHeaders.Repeatability.csproj | 2 +- .../special-words/src/SpecialWords.csproj | 2 +- .../jsonl/src/Streaming.Jsonl.csproj | 2 +- .../streaming/sse/src/Streaming.Sse.csproj | 2 +- .../http/type/array/src/Type.Array.csproj | 2 +- .../dictionary/src/Type.Dictionary.csproj | 2 +- .../src/Type.Enum.Extensible.csproj | 2 +- .../enum/fixed/src/Type.Enum.Fixed.csproj | 2 +- .../model/empty/src/Type.Model.Empty.csproj | 2 +- ...Model.Inheritance.EnumDiscriminator.csproj | 2 +- ...del.Inheritance.NestedDiscriminator.csproj | 2 +- ....Model.Inheritance.NotDiscriminated.csproj | 2 +- .../Type.Model.Inheritance.Recursive.csproj | 2 +- ...del.Inheritance.SingleDiscriminator.csproj | 2 +- .../model/usage/src/Type.Model.Usage.csproj | 2 +- .../src/Type.Model.Visibility.csproj | 2 +- .../Type.Property.AdditionalProperties.csproj | 2 +- .../src/Type.Property.Nullable.csproj | 2 +- .../src/Type.Property.Optional.csproj | 2 +- .../src/Type.Property.ValueTypes.csproj | 2 +- .../http/type/scalar/src/Type.Scalar.csproj | 2 +- .../Type.Union.Discriminated.Extends.csproj | 2 +- .../http/type/union/src/Type.Union.csproj | 2 +- .../added/v1/src/Versioning.Added.V1.csproj | 2 +- .../added/v2/src/Versioning.Added.V2.csproj | 2 +- .../v1/src/Versioning.MadeOptional.V1.csproj | 2 +- .../v2/src/Versioning.MadeOptional.V2.csproj | 2 +- .../v1/src/Versioning.Removed.V1.csproj | 2 +- .../v2/src/Versioning.Removed.V2.csproj | 2 +- .../src/Versioning.Removed.V2Preview.csproj | 2 +- .../v1/src/Versioning.RenamedFrom.V1.csproj | 2 +- .../v2/src/Versioning.RenamedFrom.V2.csproj | 2 +- ...Versioning.ReturnTypeChangedFrom.V1.csproj | 2 +- ...Versioning.ReturnTypeChangedFrom.V2.csproj | 2 +- .../src/Versioning.TypeChangedFrom.V1.csproj | 2 +- .../src/Versioning.TypeChangedFrom.V2.csproj | 2 +- 139 files changed, 988 insertions(+), 161 deletions(-) create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateGetUtf8BytesMethodsWithXmlModels.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateShouldReadThroughProxyMethod.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateWriteObjectValueResolvesModelProxies.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DeserializationTests/NestedModelReadsRouteThroughModelProxies.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodRoutesDualFormatNestedModelOnlyForXmlFormat.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Local.Tests/ModelProxyTests.cs diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/DiscriminatedUnionSerialization.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/DiscriminatedUnionSerialization.cs index f03b2d24cce..59a54d3fae6 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/DiscriminatedUnionSerialization.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/DiscriminatedUnionSerialization.cs @@ -67,9 +67,9 @@ internal static MethodProvider[] BuildMethods(InputUnionType union, TypeProvider .Or(payload.ValueKind().NotEqual(FrameworkEnumValue(JsonValueKind.Object))); var cases = subtypes.Select(entry => new SwitchCaseStatement( Literal(entry.Key), - Return(MrwSerializationTypeDefinition.GetDeserializationMethodInvocationForType( + Return(MrwSerializationTypeDefinition.GetProxyAwareDeserializationMethodInvocation( GetModelType(entry.Value), - payload, payload.GetUtf8Bytes(), options)))).ToList(); + payload, payload.GetUtf8Bytes(), options.As())))).ToList(); cases.Add(SwitchCaseStatement.Default(Throw(New.Instance( Literal($"Unknown discriminator value for union '{union.Name}'."))))); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.Xml.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.Xml.cs index d18f64512ad..10af656e8df 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.Xml.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.Xml.cs @@ -55,6 +55,7 @@ private MethodProvider[] BuildXmlExtensionMethods() BuildXmlGetDateTimeOffsetMethodProvider(), BuildXmlGetTimeSpanMethodProvider(), BuildXmlGetBytesFromBase64MethodProvider(), + BuildXmlGetUtf8BytesMethodProvider(), BuildXmlWriteStringValueDateTimeOffsetMethodProvider(), BuildXmlWriteStringValueTimeSpanMethodProvider(), BuildXmlWriteBase64StringValueMethodProvider(), @@ -62,6 +63,24 @@ private MethodProvider[] BuildXmlExtensionMethods() ]; } + // Re-serializes a nested element, including inherited namespace declarations, so it can be read through ModelReaderWriter. + private MethodProvider BuildXmlGetUtf8BytesMethodProvider() + { + var signature = new MethodSignature( + Name: ModelSerializationExtensionsSnippets.GetUtf8BytesMethodName, + Modifiers: _methodModifiers, + Parameters: [_xElementParameter], + ReturnType: typeof(BinaryData), + Description: null, + ReturnDescription: null); + + var element = _xElementParameter.As(); + var body = BinaryDataSnippets.FromString( + element.Invoke(nameof(XElement.ToString), FrameworkEnumValue(SaveOptions.DisableFormatting))); + + return new MethodProvider(signature, body, this, XmlDocProvider.Empty); + } + private MethodProvider BuildXmlGetDateTimeOffsetMethodProvider() { var signature = new MethodSignature( diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.cs index f21d993f23c..551f57ca7c3 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.cs @@ -191,6 +191,7 @@ protected override MethodProvider[] BuildMethods() BuildWriteObjectValueMethodGeneric(), BuildWriteObjectValueMethodProvider(), BuildGetUtf8BytesMethodProvider(), + BuildShouldReadThroughProxyMethodProvider(), .. BuildDynamicModelHelpers(), .. BuildXmlExtensionMethods(), ]; @@ -673,11 +674,19 @@ private MethodProvider BuildWriteObjectValueMethodGeneric() }; cases.Add( BuildWriteObjectValueSwitchCase(new CSharpType(typeof(IJsonModel<>), _t), "jsonModel", - jsonModel => new MethodBodyStatement[] + jsonModel => { - jsonModel.Invoke(nameof(IJsonModel.Write), writer, - options.NullCoalesce(ModelSerializationExtensionsSnippets.Wire)).Terminate(), - Break + var mrwOptions = options.As(); + return new MethodBodyStatement[] + { + options.Assign(ModelSerializationExtensionsSnippets.Wire, nullCoalesce: true).Terminate(), + new IfStatement(mrwOptions.ProxiesCount().GreaterThan(Int(0))) + { + jsonModel.Assign(mrwOptions.ResolveProxy(jsonModel)).Terminate() + }, + jsonModel.Invoke(nameof(IJsonModel.Write), writer, options).Terminate(), + Break + }; })); cases.AddRange(new[] { @@ -948,6 +957,28 @@ private MethodProvider BuildGetUtf8BytesMethodProvider() return new MethodProvider(signature, body, this, XmlDocProvider.Empty); } + private MethodProvider BuildShouldReadThroughProxyMethodProvider() + { + var optionsParameter = new ParameterProvider("options", FormattableStringHelpers.Empty, typeof(ModelReaderWriterOptions)); + var modelTypeParameter = new ParameterProvider("modelType", FormattableStringHelpers.Empty, typeof(Type)); + var contextParameter = new ParameterProvider("context", FormattableStringHelpers.Empty, typeof(ModelReaderWriterContext)); + var signature = new MethodSignature( + Name: ModelSerializationExtensionsSnippets.ShouldReadThroughProxyMethodName, + Modifiers: _methodModifiers, + Parameters: [optionsParameter, modelTypeParameter, contextParameter], + ReturnType: typeof(bool), + Description: null, + ReturnDescription: null); + + // Nested models can only be read through ModelReaderWriter when the context can build them. + var canBuildModel = contextParameter.Invoke( + nameof(ModelReaderWriterContext.TryGetTypeBuilder), + [modelTypeParameter, Identifier("_").AsArgument(isOut: true)]); + var body = Return(optionsParameter.As().ProxiesCount().GreaterThan(Int(0)).And(canBuildModel)); + + return new MethodProvider(signature, body, this, XmlDocProvider.Empty); + } + private MethodProvider BuildTryGetIndexMethodProvider() { var indexSliceParameter = diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.Xml.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.Xml.cs index 928c0a7f1b5..83731c67e4d 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.Xml.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.Xml.cs @@ -1111,12 +1111,41 @@ internal static ValueExpression DeserializeXmlValueCore( if (!underlyingType.IsFrameworkType) { - return GetDeserializationMethodInvocationForType(underlyingType, element, null, mrwOptions); + return GetProxyAwareXmlDeserializationMethodInvocation(underlyingType, element, mrwOptions); } return CreateXmlDeserializePrimitiveExpression(element, valueType, format); } + /// + /// XML counterpart of . A model that also supports JSON + /// reports "J" as its wire format, so it is only read through when XML is + /// requested explicitly; otherwise the XML payload would be parsed as JSON. + /// + private static ValueExpression GetProxyAwareXmlDeserializationMethodInvocation( + CSharpType valueType, + ScopedApi element, + ScopedApi options) + { + var deserialize = GetDeserializationMethodInvocationForType(valueType, element, null, options); + if (!TryGetProxyableModelSerialization(valueType, out var serialization)) + { + return deserialize; + } + + var modelType = valueType.WithNullable(false); + var shouldReadThroughProxy = options.ShouldReadThroughProxy(modelType); + if (serialization.SupportsJson) + { + shouldReadThroughProxy = options.Format().Equal(ModelReaderWriterOptionsSnippets.XmlFormat).And(shouldReadThroughProxy); + } + + return new TernaryConditionalExpression( + shouldReadThroughProxy, + ModelReaderWriterSnippets.Read(modelType, element.GetUtf8Bytes(), options), + deserialize); + } + internal static MethodBodyStatement SerializeXmlValueCore( CSharpType valueType, ValueExpression value, diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs index c212c3ded6f..4670072444d 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs @@ -6,6 +6,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Net; @@ -77,6 +78,9 @@ public partial class MrwSerializationTypeDefinition : TypeProvider private readonly bool _isStruct; private readonly bool _supportsJson; private readonly bool _supportsXml; + + // Models that support JSON report "J" as their wire format; XML-only models report "X". + internal bool SupportsJson => _supportsJson; private ConstructorProvider? _serializationConstructor; // Flag to determine if the model should override the serialization methods private bool? _shouldOverrideMethods; @@ -1997,8 +2001,7 @@ private ValueExpression CreateDeserializeValueExpression( valueType.ToEnum(ScmCodeModelGenerator.Instance.TypeFactory.DeserializeJsonValue( valueType.UnderlyingEnumType!, jsonElement, data, _mrwOptionsParameterSnippet, serializationFormat)), - _ => GetDeserializationMethodInvocationForType(valueType, jsonElement, data, - _mrwOptionsParameterSnippet) + _ => GetProxyAwareDeserializationMethodInvocation(valueType, jsonElement, data, _mrwOptionsParameterSnippet) }; if (valueType.IsFrameworkType && valueType.FrameworkType == typeof(Uri)) @@ -2012,6 +2015,43 @@ private ValueExpression CreateDeserializeValueExpression( return result; } + /// + /// Nested models keep calling their static deserializer when no proxies are registered. Otherwise they are + /// read through so that a proxy registered for the nested type is honored. + /// The generated helper also checks that the library's can build the + /// type, because accessibility, and therefore context membership, is only final when files are written. + /// + internal static ValueExpression GetProxyAwareDeserializationMethodInvocation( + CSharpType valueType, + ScopedApi jsonElement, + ScopedApi data, + ScopedApi options) + { + var deserialize = GetDeserializationMethodInvocationForType(valueType, jsonElement, data, options); + if (!TryGetProxyableModelSerialization(valueType, out _)) + { + return deserialize; + } + + var modelType = valueType.WithNullable(false); + return new TernaryConditionalExpression( + options.ShouldReadThroughProxy(modelType), + ModelReaderWriterSnippets.Read(modelType, data, options), + deserialize); + } + + /// + /// Nested reads are only routed through for generated models with MRW serialization. + /// + private static bool TryGetProxyableModelSerialization(CSharpType valueType, [NotNullWhen(true)] out MrwSerializationTypeDefinition? serialization) + { + serialization = ScmCodeModelGenerator.Instance.TypeFactory.CSharpTypeMap.TryGetValue(valueType, out var provider) + && provider is ModelProvider and not SystemObjectModelProvider + ? provider.SerializationProviders.OfType().FirstOrDefault() + : null; + return serialization is not null; + } + private MethodBodyStatement CreateDeserializeDictionaryValueStatement( CSharpType dictionaryItemType, DictionaryExpression dictionary, diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelReaderWriterOptionsSnippets.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelReaderWriterOptionsSnippets.cs index 4e085563ee2..b0406bbd4ce 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelReaderWriterOptionsSnippets.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelReaderWriterOptionsSnippets.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System.ClientModel.Primitives; +using System.Collections.Generic; using Microsoft.TypeSpec.Generator.Expressions; using Microsoft.TypeSpec.Generator.Snippets; using static Microsoft.TypeSpec.Generator.ClientModel.Snippets.ModelSerializationExtensionsSnippets; @@ -12,6 +13,10 @@ namespace Microsoft.TypeSpec.Generator.ClientModel.Snippets internal static class ModelReaderWriterOptionsSnippets { public static ValueExpression Format(this ScopedApi mrwOptions) => mrwOptions.Property(nameof(ModelReaderWriterOptions.Format)); + public static ValueExpression ProxiesCount(this ScopedApi mrwOptions) + => mrwOptions.Property(nameof(ModelReaderWriterOptions.Proxies)).Property(nameof(ICollection.Count)); + public static ValueExpression ResolveProxy(this ScopedApi mrwOptions, ValueExpression model) + => mrwOptions.Invoke(nameof(ModelReaderWriterOptions.ResolveProxy), model); internal static ScopedApi WireFormat => Literal("W"); internal static ScopedApi JsonFormat => Literal("J"); internal static ScopedApi XmlFormat => Literal("X"); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.Xml.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.Xml.cs index a4d364eeecb..469c59e9dff 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.Xml.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.Xml.cs @@ -45,5 +45,8 @@ public static InvokeMethodExpression GetTimeSpan(ScopedApi element, st public static InvokeMethodExpression GetBytesFromBase64(ScopedApi element, string? format) => element.Invoke(GetBytesFromBase64MethodName, Literal(format)); + + public static InvokeMethodExpression GetUtf8Bytes(ScopedApi element) + => element.Invoke(GetUtf8BytesMethodName); } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.cs index c210deae089..56da9ffe6fc 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.cs @@ -5,6 +5,7 @@ using System.Text.Json; using Microsoft.TypeSpec.Generator.ClientModel.Providers; using Microsoft.TypeSpec.Generator.Expressions; +using Microsoft.TypeSpec.Generator.Primitives; using Microsoft.TypeSpec.Generator.Snippets; using Microsoft.TypeSpec.Generator.Statements; using static Microsoft.TypeSpec.Generator.Snippets.Snippet; @@ -18,6 +19,8 @@ internal static partial class ModelSerializationExtensionsSnippets private const string WriteBase64UrlStringValueMethodName = "WriteBase64UrlStringValue"; private const string WriteNumberValueMethodName = "WriteNumberValue"; private const string WriteObjectValueMethodName = "WriteObjectValue"; + internal const string ShouldReadThroughProxyMethodName = "ShouldReadThroughProxy"; + internal const string GetUtf8BytesMethodName = "GetUtf8Bytes"; private const string GetCharMethodName = "GetChar"; private const string GetObjectMethodName = "GetObject"; private const string GetBytesFromBase64MethodName = "GetBytesFromBase64"; @@ -65,5 +68,8 @@ public static ValueExpression GetTimeSpan(this ScopedApi provider, ScopedApi element) => provider.Invoke(GetCharMethodName, [element]); + + public static ScopedApi ShouldReadThroughProxy(this ScopedApi options, CSharpType modelType) + => options.Invoke(ShouldReadThroughProxyMethodName, [TypeOf(modelType), ModelReaderWriterContextSnippets.Default]).As(); } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/XElementSnippets.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/XElementSnippets.cs index 137a2d82401..84954ccd934 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/XElementSnippets.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/XElementSnippets.cs @@ -53,6 +53,9 @@ public static ScopedApi GetTimeSpan(this ScopedApi element, public static ScopedApi GetBytesFromBase64(this ScopedApi element, string? format) => ModelSerializationExtensionsSnippets.GetBytesFromBase64(element, format).As(); + public static ScopedApi GetUtf8Bytes(this ScopedApi element) + => ModelSerializationExtensionsSnippets.GetUtf8Bytes(element).As(); + public static ScopedApi Namespace(this ScopedApi name) => name.Property(nameof(XName.Namespace)).As(); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/ModelSerializationExtensionsDefinitionTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/ModelSerializationExtensionsDefinitionTests.cs index 2fcb6d05302..f3dea8438e8 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/ModelSerializationExtensionsDefinitionTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/ModelSerializationExtensionsDefinitionTests.cs @@ -591,6 +591,23 @@ public void ValidateXmlWriteObjectValueMethodIsGenerated() Assert.IsTrue(writeStringValueMethods.Count == 1); } + // Snapshot of the GetUtf8Bytes overloads; the XElement overload re-serializes nested XML models so they can be + // read through ModelReaderWriter proxies. + [Test] + public void ValidateGetUtf8BytesMethodsWithXmlModels() + { + var xmlModel = InputFactory.Model( + "TestXmlModel", + usage: InputModelTypeUsage.Input | InputModelTypeUsage.Xml, + properties: [InputFactory.Property("Name", InputPrimitiveType.String)]); + MockHelpers.LoadMockGenerator(inputModels: () => [xmlModel]); + + var definition = new ModelSerializationExtensionsDefinition(); + var writer = new TypeProviderWriter(new FilteredMethodsTypeProvider(definition, name => name == "GetUtf8Bytes")); + var file = writer.Write(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); + } + [Test] public void ValidateXmlWriteBase64StringVAlueMethodIsGenerated() { @@ -759,6 +776,37 @@ public void ValidateWriteFileBinaryContentMethod() Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); } + // Snapshot of the helper that decides whether nested models are read through ModelReaderWriter: + // only when proxies are registered and the context can build the requested type. + [Test] + public void ValidateShouldReadThroughProxyMethod() + { + MockHelpers.LoadMockGenerator(); + + var definition = new ModelSerializationExtensionsDefinition(); + var writer = new TypeProviderWriter(new FilteredMethodsTypeProvider(definition, name => name == "ShouldReadThroughProxy")); + var file = writer.Write(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); + } + + // Snapshot of the WriteObjectValue switch — verifies nested JSON models resolve registered proxies + // and keep writing the model directly when none are registered. + [Test] + public void ValidateWriteObjectValueResolvesModelProxies() + { + MockHelpers.LoadMockGenerator(); + + var definition = new ModelSerializationExtensionsDefinition(); + var method = definition.Methods + .Where(m => m.Signature.Name == "WriteObjectValue" && m.Signature.GenericArguments?.Count > 0) + .SingleOrDefault(); + Assert.IsNotNull(method); + + var writer = new TypeProviderWriter(new FilteredMethodsTypeProvider(definition, name => name == method!.Signature.Name)); + var file = writer.Write(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); + } + // Snapshot of the WriteObjectValue switch — verifies the FileBinaryContent case is emitted. [Test] public void ValidateWriteObjectValueIncludesFileBinaryContentCase() diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateGetUtf8BytesMethodsWithXmlModels.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateGetUtf8BytesMethodsWithXmlModels.cs new file mode 100644 index 00000000000..bd57b8f8a96 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateGetUtf8BytesMethodsWithXmlModels.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System; +using System.Runtime.InteropServices; +using System.Text.Json; +using System.Xml.Linq; + +namespace Sample +{ + public partial class ModelSerializationExtensions + { + public static global::System.BinaryData GetUtf8Bytes(this global::System.Text.Json.JsonElement element) + { +#if NET9_0_OR_GREATER + return new global::System.BinaryData(global::System.Runtime.InteropServices.JsonMarshal.GetRawUtf8Value(element).ToArray()); +#else + return global::System.BinaryData.FromString(element.GetRawText()); +#endif + } + + public static global::System.BinaryData GetUtf8Bytes(this global::System.Xml.Linq.XElement element) => global::System.BinaryData.FromString(element.ToString(global::System.Xml.Linq.SaveOptions.DisableFormatting)); + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateShouldReadThroughProxyMethod.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateShouldReadThroughProxyMethod.cs new file mode 100644 index 00000000000..e70a14b5b81 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateShouldReadThroughProxyMethod.cs @@ -0,0 +1,17 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; + +namespace Sample +{ + public partial class ModelSerializationExtensions + { + public static bool ShouldReadThroughProxy(this global::System.ClientModel.Primitives.ModelReaderWriterOptions options, global::System.Type modelType, global::System.ClientModel.Primitives.ModelReaderWriterContext context) + { + return ((options.Proxies.Count > 0) && context.TryGetTypeBuilder(modelType, out _)); + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateWriteObjectValueIncludesFileBinaryContentCase.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateWriteObjectValueIncludesFileBinaryContentCase.cs index ec7a3604dc5..ca83d18b8e3 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateWriteObjectValueIncludesFileBinaryContentCase.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateWriteObjectValueIncludesFileBinaryContentCase.cs @@ -21,7 +21,12 @@ public static void WriteObjectValue(this global::System.Text.Json.Utf8JsonWri writer.WriteNullValue(); break; case global::System.ClientModel.Primitives.IJsonModel jsonModel: - jsonModel.Write(writer, (options ?? global::Sample.ModelSerializationExtensions.WireOptions)); + options ??= global::Sample.ModelSerializationExtensions.WireOptions; + if ((options.Proxies.Count > 0)) + { + jsonModel = options.ResolveProxy(jsonModel); + } + jsonModel.Write(writer, options); break; case byte[] bytes: writer.WriteBase64StringValue(bytes); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateWriteObjectValueResolvesModelProxies.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateWriteObjectValueResolvesModelProxies.cs new file mode 100644 index 00000000000..e268024dce6 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateWriteObjectValueResolvesModelProxies.cs @@ -0,0 +1,118 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections; +using System.Collections.Generic; +using System.Text.Json; + +namespace Sample +{ + public partial class ModelSerializationExtensions + { + public static void WriteObjectValue(this global::System.Text.Json.Utf8JsonWriter writer, T value, global::System.ClientModel.Primitives.ModelReaderWriterOptions options = ((global::System.ClientModel.Primitives.ModelReaderWriterOptions)null)) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case global::System.ClientModel.Primitives.IJsonModel jsonModel: + options ??= global::Sample.ModelSerializationExtensions.WireOptions; + if ((options.Proxies.Count > 0)) + { + jsonModel = options.ResolveProxy(jsonModel); + } + jsonModel.Write(writer, options); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case global::System.BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case global::System.Text.Json.JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case short shortValue: + writer.WriteNumberValue(shortValue); + break; + case ushort ushortValue: + writer.WriteNumberValue(ushortValue); + break; + case uint uintValue: + writer.WriteNumberValue(uintValue); + break; + case ulong ulongValue: + writer.WriteNumberValue(ulongValue); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case global::System.Guid g: + writer.WriteStringValue(g); + break; + case global::System.DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case global::System.DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case global::System.Collections.Generic.IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case global::System.Collections.IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case global::System.TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new global::System.NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this global::System.Text.Json.Utf8JsonWriter writer, object value, global::System.ClientModel.Primitives.ModelReaderWriterOptions options = ((global::System.ClientModel.Primitives.ModelReaderWriterOptions)null)) + { + writer.WriteObjectValue(value, options); + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateWriteObjectValueXmlIncludesFileBinaryContentCase.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateWriteObjectValueXmlIncludesFileBinaryContentCase.cs index 73e5c7af57f..74f495f4593 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateWriteObjectValueXmlIncludesFileBinaryContentCase.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateWriteObjectValueXmlIncludesFileBinaryContentCase.cs @@ -23,7 +23,12 @@ public static void WriteObjectValue(this global::System.Text.Json.Utf8JsonWri writer.WriteNullValue(); break; case global::System.ClientModel.Primitives.IJsonModel jsonModel: - jsonModel.Write(writer, (options ?? global::Sample.ModelSerializationExtensions.WireOptions)); + options ??= global::Sample.ModelSerializationExtensions.WireOptions; + if ((options.Proxies.Count > 0)) + { + jsonModel = options.ResolveProxy(jsonModel); + } + jsonModel.Write(writer, options); break; case byte[] bytes: writer.WriteBase64StringValue(bytes); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/DeserializationTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/DeserializationTests.cs index f2cf222b837..65919710619 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/DeserializationTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/DeserializationTests.cs @@ -160,6 +160,52 @@ public void TestDeserializationOfDurationMillisecondsIntegerWireType(string wire Assert.AreEqual(Helpers.GetExpectedFromFile(parameters: wireKindName), file.Content); } + // Validates that nested model properties, list items and dictionary values keep the static + // deserializer when no proxies are registered and otherwise read through ModelReaderWriter. + [Test] + public void NestedModelReadsRouteThroughModelProxies() + { + var nestedModel = InputFactory.Model("NestedModel", properties: [InputFactory.Property("name", InputPrimitiveType.String)]); + var inputModel = InputFactory.Model("TestModel", properties: + [ + InputFactory.Property("nested", nestedModel, isRequired: true), + InputFactory.Property("nestedList", InputFactory.Array(nestedModel)), + InputFactory.Property("nestedDictionary", InputFactory.Dictionary(nestedModel)), + InputFactory.Property("name", InputPrimitiveType.String) + ]); + + var mrwProvider = new ModelProvider(inputModel).SerializationProviders.FirstOrDefault(); + Assert.IsNotNull(mrwProvider); + var writer = new TypeProviderWriter(mrwProvider!); + var file = writer.Write(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); + } + + // The discriminator switch selects the concrete deserializer for the model that was already resolved, + // so it must not re-enter proxy resolution. + [Test] + public void DiscriminatorDispatchDoesNotRouteThroughModelProxies() + { + var catModel = InputFactory.Model("cat", discriminatedKind: "cat", properties: + [ + InputFactory.Property("kind", InputPrimitiveType.String, isRequired: true, isDiscriminator: true) + ]); + var petModel = InputFactory.Model( + "pet", + properties: [InputFactory.Property("kind", InputPrimitiveType.String, isRequired: true, isDiscriminator: true)], + discriminatedModels: new Dictionary() { { "cat", catModel } }); + + var serialization = ScmCodeModelGenerator.Instance.TypeFactory.CreateModel(petModel)!.SerializationProviders.FirstOrDefault(); + Assert.IsNotNull(serialization); + var deserializeMethod = serialization!.Methods.FirstOrDefault(m => m.Signature.Name == "DeserializePet"); + Assert.IsNotNull(deserializeMethod); + + var methodBody = deserializeMethod!.BodyStatements!.ToDisplayString(); + Assert.That(methodBody, Does.Contain("global::Sample.Models.Cat.DeserializeCat(element, options)")); + Assert.That(methodBody, Does.Not.Contain("ShouldReadThroughProxy")); + Assert.That(methodBody, Does.Not.Contain("ModelReaderWriter.Read")); + } + // Validates the deserialize body produced for a required FileBinaryContent property. [Test] public void RequiredFileBinaryContentProperty() diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DeserializationTests/NestedModelReadsRouteThroughModelProxies.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DeserializationTests/NestedModelReadsRouteThroughModelProxies.cs new file mode 100644 index 00000000000..2bb01040ff6 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DeserializationTests/NestedModelReadsRouteThroughModelProxies.cs @@ -0,0 +1,74 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Sample; + +namespace Sample.Models +{ + public partial class TestModel : global::System.ClientModel.Primitives.IJsonModel + { + internal static global::Sample.Models.TestModel DeserializeTestModel(global::System.Text.Json.JsonElement element, global::System.ClientModel.Primitives.ModelReaderWriterOptions options) + { + if ((element.ValueKind == global::System.Text.Json.JsonValueKind.Null)) + { + return null; + } + global::Sample.Models.NestedModel nested = default; + global::System.Collections.Generic.IList nestedList = default; + global::System.Collections.Generic.IDictionary nestedDictionary = default; + string name = default; + global::System.Collections.Generic.IDictionary additionalBinaryDataProperties = new global::Sample.ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("nested"u8)) + { + nested = options.ShouldReadThroughProxy(typeof(global::Sample.Models.NestedModel), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.NestedModel.DeserializeNestedModel(prop.Value, options); + continue; + } + if (prop.NameEquals("nestedList"u8)) + { + if ((prop.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)) + { + continue; + } + global::System.Collections.Generic.List array = new global::System.Collections.Generic.List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(options.ShouldReadThroughProxy(typeof(global::Sample.Models.NestedModel), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(item.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.NestedModel.DeserializeNestedModel(item, options)); + } + nestedList = array; + continue; + } + if (prop.NameEquals("nestedDictionary"u8)) + { + if ((prop.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)) + { + continue; + } + global::System.Collections.Generic.Dictionary dictionary = new global::System.Collections.Generic.Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(typeof(global::Sample.Models.NestedModel), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.NestedModel.DeserializeNestedModel(prop0.Value, options)); + } + nestedDictionary = dictionary; + continue; + } + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if ((options.Format != "W")) + { + additionalBinaryDataProperties.Add(prop.Name, prop.Value.GetUtf8Bytes()); + } + } + return new global::Sample.Models.TestModel(nested, (nestedList ?? new global::Sample.ChangeTrackingList()), (nestedDictionary ?? new global::Sample.ChangeTrackingDictionary()), name, additionalBinaryDataProperties); + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeArrayProperties.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeArrayProperties.cs index c118bb3622d..d235ba2f7fe 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeArrayProperties.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeArrayProperties.cs @@ -36,7 +36,7 @@ public partial class DynamicModel global::System.Collections.Generic.List array = new global::System.Collections.Generic.List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(global::Sample.Models.Cat.DeserializeCat(item, options)); + array.Add(options.ShouldReadThroughProxy(typeof(global::Sample.Models.Cat), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(item.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(item, options)); } cats = array; continue; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeDictionaryProperties.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeDictionaryProperties.cs index 470699a3e54..0f23a3358e0 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeDictionaryProperties.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeDictionaryProperties.cs @@ -36,7 +36,7 @@ public partial class DynamicModel global::System.Collections.Generic.Dictionary dictionary = new global::System.Collections.Generic.Dictionary(); foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(prop0.Name, global::Sample.Models.Cat.DeserializeCat(prop0.Value, options)); + dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(typeof(global::Sample.Models.Cat), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(prop0.Value, options)); } cats = dictionary; continue; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelPropertyType.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelPropertyType.cs index cb16b0ef8f5..4906ed18a98 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelPropertyType.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelPropertyType.cs @@ -31,7 +31,7 @@ public partial class DynamicModel { continue; } - cat = global::Sample.Models.Cat.DeserializeCat(prop.Value, options); + cat = options.ShouldReadThroughProxy(typeof(global::Sample.Models.Cat), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(prop.Value, options); continue; } if (prop.NameEquals("anything"u8)) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelWithAP.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelWithAP.cs index 000d8c269ba..56119499181 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelWithAP.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelWithAP.cs @@ -32,7 +32,7 @@ public partial class DynamicModel { continue; } - cats = global::Sample.Models.Cat.DeserializeCat(prop.Value, options); + cats = options.ShouldReadThroughProxy(typeof(global::Sample.Models.Cat), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(prop.Value, options); continue; } switch (prop.Value.ValueKind) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodHandlesNestedModel.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodHandlesNestedModel.cs index 87fcc6f34f5..e521a30a63d 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodHandlesNestedModel.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodHandlesNestedModel.cs @@ -6,6 +6,7 @@ using System.ClientModel.Primitives; using System.IO; using System.Xml.Linq; +using Sample; namespace Sample.Models { @@ -40,7 +41,7 @@ public partial class OuterModel : global::System.ClientModel.Primitives.IPersist string localName = child.Name.LocalName; if ((localName == "inner")) { - inner = global::Sample.Models.InnerModel.DeserializeInnerModel(child, options); + inner = options.ShouldReadThroughProxy(typeof(global::Sample.Models.InnerModel), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(child.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.InnerModel.DeserializeInnerModel(child, options); continue; } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodRoutesDualFormatNestedModelOnlyForXmlFormat.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodRoutesDualFormatNestedModelOnlyForXmlFormat.cs new file mode 100644 index 00000000000..81ab46a1ebe --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodRoutesDualFormatNestedModelOnlyForXmlFormat.cs @@ -0,0 +1,51 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.IO; +using System.Xml.Linq; +using Sample; + +namespace Sample.Models +{ + public partial class OuterModel : global::System.ClientModel.Primitives.IPersistableModel + { + protected virtual global::Sample.Models.OuterModel PersistableModelCreateCore(global::System.BinaryData data, global::System.ClientModel.Primitives.ModelReaderWriterOptions options) + { + string format = (options.Format == "W") ? ((global::System.ClientModel.Primitives.IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "X": + using (global::System.IO.Stream dataStream = data.ToStream()) + { + return global::Sample.Models.OuterModel.DeserializeOuterModel(global::System.Xml.Linq.XElement.Load(dataStream, global::System.Xml.Linq.LoadOptions.PreserveWhitespace), options); + } + default: + throw new global::System.FormatException($"The model {nameof(global::Sample.Models.OuterModel)} does not support reading '{options.Format}' format."); + } + } + + internal static global::Sample.Models.OuterModel DeserializeOuterModel(global::System.Xml.Linq.XElement element, global::System.ClientModel.Primitives.ModelReaderWriterOptions options) + { + if ((element == null)) + { + return null; + } + + global::Sample.Models.InnerModel inner = default; + + foreach (var child in element.Elements()) + { + string localName = child.Name.LocalName; + if ((localName == "inner")) + { + inner = ((options.Format == "X") && options.ShouldReadThroughProxy(typeof(global::Sample.Models.InnerModel), global::Sample.SampleContext.Default)) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(child.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.InnerModel.DeserializeInnerModel(child, options); + continue; + } + } + return new global::Sample.Models.OuterModel(inner); + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/XmlDeserializationTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/XmlDeserializationTests.cs index c742a43bff8..bd38cb35a91 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/XmlDeserializationTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/XmlDeserializationTests.cs @@ -142,6 +142,34 @@ public async Task XmlDeserializationMethodHandlesNestedModel() Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); } + // A nested model that also supports JSON reports "J" for the wire format, so it is only read through + // ModelReaderWriter proxies when the options explicitly request XML. + [Test] + public void XmlDeserializationMethodRoutesDualFormatNestedModelOnlyForXmlFormat() + { + var innerModel = InputFactory.Model( + "InnerModel", + usage: InputModelTypeUsage.Input | InputModelTypeUsage.Xml | InputModelTypeUsage.Json, + properties: [InputFactory.Property("value", InputPrimitiveType.String, serializationOptions: InputFactory.Serialization.Options(xml: InputFactory.Serialization.Xml("value")))]); + var outerModel = InputFactory.Model( + "OuterModel", + usage: InputModelTypeUsage.Input | InputModelTypeUsage.Xml, + properties: [InputFactory.Property("inner", innerModel, serializationOptions: InputFactory.Serialization.Options(xml: InputFactory.Serialization.Xml("inner")))]); + var mockGenerator = MockHelpers.LoadMockGenerator( + inputModels: () => [innerModel, outerModel], + createSerializationsCore: (inputType, typeProvider) + => inputType is InputModelType modeltype + ? [new MockMrwProvider(modeltype, (typeProvider as ModelProvider)!)] + : []); + + var modelProvider = mockGenerator.Object.OutputLibrary.TypeProviders.Single(t => t is ModelProvider && t.Name == "OuterModel"); + var serializationProvider = modelProvider.SerializationProviders.Single(t => t is MrwSerializationTypeDefinition); + + var writer = new TypeProviderWriter(serializationProvider); + var file = writer.Write(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); + } + [Test] public async Task XmlDeserializationMethodHandlesUnwrappedListProperty() { diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(kind,value).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(kind,value).cs index d241aff9edb..854a11ca5db 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(kind,value).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(kind,value).cs @@ -5,6 +5,7 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; +using Sample; namespace Sample.Models { @@ -53,9 +54,9 @@ internal static void SerializePetsUnion(global::System.Text.Json.Utf8JsonWriter switch (discriminator.GetString()) { case "feline": - return global::Sample.Models.Cat.DeserializeCat(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(global::Sample.Models.Cat), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(discriminator0, options); case "canine": - return global::Sample.Models.Dog.DeserializeDog(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(global::Sample.Models.Dog), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Dog.DeserializeDog(discriminator0, options); default: throw new global::System.Text.Json.JsonException("Unknown discriminator value for union 'pets'."); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(type,data).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(type,data).cs index 9ed6dc33eb6..77698d8e418 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(type,data).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(type,data).cs @@ -5,6 +5,7 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; +using Sample; namespace Sample.Models { @@ -53,9 +54,9 @@ internal static void SerializePetsUnion(global::System.Text.Json.Utf8JsonWriter switch (discriminator.GetString()) { case "feline": - return global::Sample.Models.Cat.DeserializeCat(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(global::Sample.Models.Cat), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(discriminator0, options); case "canine": - return global::Sample.Models.Dog.DeserializeDog(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(global::Sample.Models.Dog), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Dog.DeserializeDog(discriminator0, options); default: throw new global::System.Text.Json.JsonException("Unknown discriminator value for union 'pets'."); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Primitives/NewProjectScaffolding.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Primitives/NewProjectScaffolding.cs index 30d1b2b93a5..49b7b58cc3a 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Primitives/NewProjectScaffolding.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Primitives/NewProjectScaffolding.cs @@ -125,7 +125,7 @@ protected virtual string GetTestProjectFileContent() private static readonly IReadOnlyList _unbrandedDependencyPackages = new CSharpProjectWriter.CSProjDependencyPackage[] { - new("System.ClientModel", "1.16.0"), + new("System.ClientModel", "1.17.0-alpha.20261117.1"), }; protected virtual string GetSolutionFileContent() diff --git a/packages/http-client-csharp/generator/Packages.Data.props b/packages/http-client-csharp/generator/Packages.Data.props index 59e8f4b3be5..0acb6aa205e 100644 --- a/packages/http-client-csharp/generator/Packages.Data.props +++ b/packages/http-client-csharp/generator/Packages.Data.props @@ -14,7 +14,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Local.Tests/ModelProxyTests.cs b/packages/http-client-csharp/generator/TestProjects/Local.Tests/ModelProxyTests.cs new file mode 100644 index 00000000000..eae6be1bd88 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Local.Tests/ModelProxyTests.cs @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using NUnit.Framework; +using SampleTypeSpec; + +namespace TestProjects.Local.Tests +{ + public class ModelProxyTests + { + [Test] + public void NestedModelReadsUseRegisteredProxy() + { + var proxy = new ThingProxy(); + var options = CreateOptions(proxy); + + var page = ReadPage("""{"items":[{"name":"first"},{"name":"second"}]}""", options); + var roundTrip = ModelReaderWriter.Read( + BinaryData.FromString("""{"requiredModel":{"name":"nested"}}"""), options, SampleTypeSpecContext.Default); + + Assert.AreEqual(new[] { "proxy:first", "proxy:second" }, page.Items.Select(item => item.Rename)); + Assert.AreEqual("proxy:nested", roundTrip!.RequiredModel.Rename); + Assert.AreEqual(3, proxy.ReadCount); + } + + [Test] + public void NestedModelWritesUseRegisteredProxy() + { + var proxy = new ThingProxy(); + var page = new PageThing([CreateThing("first"), CreateThing("second")]); + + var result = ModelReaderWriter.Write(page, CreateOptions(proxy), SampleTypeSpecContext.Default); + + using var document = JsonDocument.Parse(result); + var items = document.RootElement.GetProperty("items").EnumerateArray().ToArray(); + Assert.AreEqual(new[] { "first", "second" }, items.Select(item => item.GetProperty("proxied").GetString())); + Assert.AreEqual(2, proxy.WriteCount); + } + + [Test] + public void NestedDynamicModelReadsUseRegisteredProxy() + { + var proxy = new AnotherDynamicModelProxy(); + + var model = ModelReaderWriter.Read( + BinaryData.FromString("""{"name":"root","foo":{"bar":"single"},"listFoo":[{"bar":"item"}],"dictionaryFoo":{"key":{"bar":"value"}}}"""), + CreateOptions(proxy), + SampleTypeSpecContext.Default); + + Assert.AreEqual("proxy:single", model!.Foo.Bar); + Assert.AreEqual("proxy:item", model.ListFoo.Single().Bar); + Assert.AreEqual("proxy:value", model.DictionaryFoo["key"].Bar); + Assert.AreEqual(3, proxy.ReadCount); + } + + [Test] + public void NestedDynamicModelWritesUseRegisteredProxy() + { + var proxy = new AnotherDynamicModelProxy(); + var model = new DynamicModel( + "root", + [1], + new Dictionary(), + new Dictionary(), + new AnotherDynamicModel("single"), + [new AnotherDynamicModel("item")], + [], + new Dictionary { ["key"] = new AnotherDynamicModel("value") }, + new Dictionary>(), + new Dictionary>(), + []); + + var result = ModelReaderWriter.Write(model, CreateOptions(proxy), SampleTypeSpecContext.Default); + + using var document = JsonDocument.Parse(result); + var root = document.RootElement; + Assert.AreEqual("single", root.GetProperty("foo").GetProperty("proxied").GetString()); + Assert.AreEqual("item", root.GetProperty("listFoo")[0].GetProperty("proxied").GetString()); + Assert.AreEqual("value", root.GetProperty("dictionaryFoo").GetProperty("key").GetProperty("proxied").GetString()); + Assert.AreEqual(3, proxy.WriteCount); + } + + [Test] + public void DecliningProxyFallsBackToModelSerialization() + { + var proxy = new ThingProxy(canHandle: false); + var options = CreateOptions(proxy); + + var page = ReadPage("""{"items":[{"name":"first"}]}""", options); + var result = ModelReaderWriter.Write(new PageThing([CreateThing("second")]), options, SampleTypeSpecContext.Default); + + Assert.AreEqual("first", page.Items.Single().Rename); + using var document = JsonDocument.Parse(result); + var item = document.RootElement.GetProperty("items")[0]; + Assert.AreEqual("second", item.GetProperty("name").GetString()); + Assert.IsFalse(item.TryGetProperty("proxied", out _)); + Assert.AreEqual(0, proxy.ReadCount); + Assert.AreEqual(0, proxy.WriteCount); + } + + [Test] + public void NestedXmlModelReadsUseRegisteredProxy() + { + var nestedProxy = new XmlNestedModelProxy(); + var itemProxy = new XmlItemProxy(); + var options = new ModelReaderWriterOptions("W"); + options.Proxies.Add(nestedProxy); + options.Proxies.Add(itemProxy); + + var model = ModelReaderWriter.Read( + BinaryData.FromString("""rootfirst1nested"""), + options, + SampleTypeSpecContext.Default); + + Assert.AreEqual("proxy:nested", model!.NestedModel.Value); + Assert.AreEqual(7, model.NestedModel.NestedId); + Assert.AreEqual("proxy:first", model.Items.Single().ItemName); + Assert.AreEqual(1, nestedProxy.ReadCount); + Assert.AreEqual(1, itemProxy.ReadCount); + } + + [Test] + public void ShouldReadThroughProxyRequiresProxiesAndBuildableModel() + { + var options = new ModelReaderWriterOptions("W"); + Assert.IsFalse(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default)); + + options.Proxies.Add(new ThingProxy()); + + Assert.IsTrue(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default)); + // Internal models are not registered in the generated context, so they keep the static deserializer. + Assert.IsFalse(options.ShouldReadThroughProxy(typeof(PageThing), SampleTypeSpecContext.Default)); + } + + private static ModelReaderWriterOptions CreateOptions(ModelProxy proxy) + { + var options = new ModelReaderWriterOptions("W"); + options.Proxies.Add(proxy); + return options; + } + + // PageThing is internal, so it is not buildable through the generated context; read it through its own interface. + private static PageThing ReadPage(string json, ModelReaderWriterOptions options) + => ((IPersistableModel)new PageThing([])).Create(BinaryData.FromString(json), options)!; + + private static Thing CreateThing(string name) + => new(name, BinaryData.FromString("\"union\""), "nullable", null, "description", [1], "docs"); + + private sealed class ThingProxy : TestProxy + { + public ThingProxy(bool canHandle = true) : base(canHandle) + { + } + + protected override Thing Transform(Thing model) + { + model.Rename = $"proxy:{model.Rename}"; + return model; + } + + protected override string? Describe(Thing model) => model.Rename; + } + + private sealed class AnotherDynamicModelProxy : TestProxy + { + protected override AnotherDynamicModel Transform(AnotherDynamicModel model) => new($"proxy:{model.Bar}"); + + protected override string? Describe(AnotherDynamicModel model) => model.Bar; + } + + private sealed class XmlNestedModelProxy : XmlTestProxy + { + protected override XmlNestedModel Transform(XmlNestedModel model) + { + model.Value = $"proxy:{model.Value}"; + return model; + } + } + + private sealed class XmlItemProxy : XmlTestProxy + { + protected override XmlItem Transform(XmlItem model) + { + model.ItemName = $"proxy:{model.ItemName}"; + return model; + } + } + + // XML proxies only implement IPersistableModel; reads transform the model's own XML deserialization. + private abstract class XmlTestProxy : ModelProxy where T : class + { + public int ReadCount { get; private set; } + + protected abstract T Transform(T model); + + public override T Create(BinaryData data, ModelReaderWriterOptions options) + { + ReadCount++; + return Transform(ModelReaderWriter.Read(data, ModelReaderWriterOptions.Xml, SampleTypeSpecContext.Default)!); + } + + public override BinaryData Write(ModelReaderWriterOptions options) => throw new NotSupportedException(); + + public override string GetFormatFromOptions(ModelReaderWriterOptions options) => "X"; + } + + // Reads by delegating to the model's own serialization and transforming the result, and writes a marker + // object describing the original model so tests can tell which serializer handled each nested model. + private abstract class TestProxy : ModelProxy, IJsonModel where T : class + { + private readonly bool _canHandle; + + protected TestProxy(bool canHandle = true) + { + _canHandle = canHandle; + } + + public int ReadCount { get; private set; } + + public int WriteCount { get; private set; } + + protected abstract T Transform(T model); + + protected abstract string? Describe(T model); + + public override bool CanHandle(T model, ModelReaderWriterOptions options) => _canHandle; + + public override bool CanHandle(ReadOnlyMemory data, ModelReaderWriterOptions options) => _canHandle; + + public override bool CanHandle(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => _canHandle; + + public override T Create(BinaryData data, ModelReaderWriterOptions options) + { + ReadCount++; + return Transform(ModelReaderWriter.Read(data, ModelReaderWriterOptions.Json, SampleTypeSpecContext.Default)!); + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + WriteCount++; + writer.WriteStartObject(); + writer.WriteString("proxied", Describe((T)options.ProxiedModel!)); + writer.WriteEndObject(); + } + + T IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + => throw new NotSupportedException(); + + public override BinaryData Write(ModelReaderWriterOptions options) => throw new NotSupportedException(); + + public override string GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/ModelSerializationExtensions.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/ModelSerializationExtensions.cs index d02d4900909..db0dbe4cad4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/ModelSerializationExtensions.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/ModelSerializationExtensions.cs @@ -250,7 +250,12 @@ public static void WriteObjectValue(this Utf8JsonWriter writer, T value, Mode writer.WriteNullValue(); break; case IJsonModel jsonModel: - jsonModel.Write(writer, options ?? WireOptions); + options ??= WireOptions; + if (options.Proxies.Count > 0) + { + jsonModel = options.ResolveProxy(jsonModel); + } + jsonModel.Write(writer, options); break; case byte[] bytes: writer.WriteBase64StringValue(bytes); @@ -349,6 +354,11 @@ public static BinaryData GetUtf8Bytes(this JsonElement element) #endif } + public static bool ShouldReadThroughProxy(this ModelReaderWriterOptions options, Type modelType, ModelReaderWriterContext context) + { + return options.Proxies.Count > 0 && context.TryGetTypeBuilder(modelType, out _); + } + public static ReadOnlySpan SliceToStartOfPropertyName(this ReadOnlySpan jsonPath) { ReadOnlySpan local = jsonPath; @@ -450,6 +460,8 @@ public static ReadOnlySpan GetRemainder(this ReadOnlySpan jsonPath, _ => throw new ArgumentException("Format is not supported: ", nameof(format)) }; + public static BinaryData GetUtf8Bytes(this XElement element) => BinaryData.FromString(element.ToString(SaveOptions.DisableFormatting)); + public static void WriteStringValue(this XmlWriter writer, DateTimeOffset value, string format) { writer.WriteValue(TypeFormatters.ToString(value, format)); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CollisionPetsUnion.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CollisionPetsUnion.Serialization.cs index 4784feacd2a..08a31f5b4fd 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CollisionPetsUnion.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CollisionPetsUnion.Serialization.cs @@ -162,7 +162,7 @@ internal static CollisionPetsUnion DeserializeCollisionPetsUnion1(JsonElement el switch (discriminator.GetString()) { case "mammal": - return NestedMammal.DeserializeNestedMammal(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(NestedMammal), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : NestedMammal.DeserializeNestedMammal(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'CollisionPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DescendantUnionPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DescendantUnionPet.Serialization.cs index 4d21a0ba64e..b7e2a8cf7cb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DescendantUnionPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DescendantUnionPet.Serialization.cs @@ -162,7 +162,7 @@ internal static DescendantUnionPet DeserializeDescendantPetsUnion1(JsonElement e switch (discriminator.GetString()) { case "cat": - return DescendantUnionCat.DeserializeDescendantUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(DescendantUnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : DescendantUnionCat.DeserializeDescendantUnionCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'DescendantPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializePetsUnion.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializePetsUnion.Serialization.cs index dcdf49c598d..d582e5c9bea 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializePetsUnion.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializePetsUnion.Serialization.cs @@ -162,7 +162,7 @@ internal static DeserializePetsUnion DeserializePetsUnion1(JsonElement element, switch (discriminator.GetString()) { case "cat": - return DeserializeNamedCat.DeserializeDeserializeNamedCat(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(DeserializeNamedCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : DeserializeNamedCat.DeserializeDeserializeNamedCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'Pets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializerPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializerPet.Serialization.cs index 963edc5c177..78dbe3b0848 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializerPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializerPet.Serialization.cs @@ -162,7 +162,7 @@ internal static DeserializerPet DeserializePetsUnion1(JsonElement element, Model switch (discriminator.GetString()) { case "pet": - return PetsUnion.DeserializePetsUnion(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(PetsUnion), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : PetsUnion.DeserializePetsUnion(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'Pets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPet.Serialization.cs index bb6c4cb002b..7cb87c9b332 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPet.Serialization.cs @@ -218,7 +218,7 @@ internal static DirectUnionPet DeserializeDirectPetsUnion3(JsonElement element, switch (discriminator.GetString()) { case "cat": - return DirectUnionCat.DeserializeDirectUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(DirectUnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : DirectUnionCat.DeserializeDirectUnionCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'DirectPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPetContainer.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPetContainer.Serialization.cs index e68260747ff..f7506c40dcf 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPetContainer.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPetContainer.Serialization.cs @@ -147,7 +147,7 @@ internal static DirectUnionPetContainer DeserializeDirectUnionPetContainer(JsonE { if (prop.NameEquals("pet"u8)) { - pet = DirectUnionPet.DeserializeDirectUnionPet(prop.Value, options); + pet = options.ShouldReadThroughProxy(typeof(DirectUnionPet), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : DirectUnionPet.DeserializeDirectUnionPet(prop.Value, options); continue; } if (options.Format != "W") diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DynamicModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DynamicModel.Serialization.cs index fb666c7a7f0..93c1386f9c1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DynamicModel.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DynamicModel.Serialization.cs @@ -769,7 +769,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary } if (prop.NameEquals("foo"u8)) { - foo = AnotherDynamicModel.DeserializeAnotherDynamicModel(prop.Value, prop.Value.GetUtf8Bytes(), options); + foo = options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop.Value, prop.Value.GetUtf8Bytes(), options); continue; } if (prop.NameEquals("listFoo"u8)) @@ -777,7 +777,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); + array.Add(options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); } listFoo = array; continue; @@ -796,7 +796,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary List array0 = new List(); foreach (var item0 in item.EnumerateArray()) { - array0.Add(AnotherDynamicModel.DeserializeAnotherDynamicModel(item0, item0.GetUtf8Bytes(), options)); + array0.Add(options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item0, item0.GetUtf8Bytes(), options)); } array.Add(array0); } @@ -809,7 +809,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary Dictionary dictionary = new Dictionary(); foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(prop0.Name, AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); + dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); } dictionaryFoo = dictionary; continue; @@ -828,7 +828,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary Dictionary dictionary0 = new Dictionary(); foreach (var prop1 in prop0.Value.EnumerateObject()) { - dictionary0.Add(prop1.Name, AnotherDynamicModel.DeserializeAnotherDynamicModel(prop1.Value, prop1.Value.GetUtf8Bytes(), options)); + dictionary0.Add(prop1.Name, options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop1.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop1.Value, prop1.Value.GetUtf8Bytes(), options)); } dictionary.Add(prop0.Name, dictionary0); } @@ -850,7 +850,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary List array = new List(); foreach (var item in prop0.Value.EnumerateArray()) { - array.Add(AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); + array.Add(options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); } dictionary.Add(prop0.Name, array); } @@ -872,7 +872,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary Dictionary dictionary = new Dictionary(); foreach (var prop0 in item.EnumerateObject()) { - dictionary.Add(prop0.Name, AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); + dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); } array.Add(dictionary); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/LifecycleModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/LifecycleModel.Serialization.cs index aa1414688cb..7cd67ed23ff 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/LifecycleModel.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/LifecycleModel.Serialization.cs @@ -155,7 +155,7 @@ internal static LifecycleModel DeserializeLifecycleModel(JsonElement element, Mo { continue; } - preview = PreviewDetails.DeserializePreviewDetails(prop.Value, options); + preview = options.ShouldReadThroughProxy(typeof(PreviewDetails), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : PreviewDetails.DeserializePreviewDetails(prop.Value, options); continue; } if (prop.NameEquals("choice"u8)) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenHeaderResponseResult.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenHeaderResponseResult.Serialization.cs index 2ee695f08e1..08004d07109 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenHeaderResponseResult.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenHeaderResponseResult.Serialization.cs @@ -145,7 +145,7 @@ internal static ListWithContinuationTokenHeaderResponseResult DeserializeListWit List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(Thing.DeserializeThing(item, options)); + array.Add(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); } things = array; continue; diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenResult.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenResult.Serialization.cs index 4f0310ae3c8..13053b556cc 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenResult.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenResult.Serialization.cs @@ -151,7 +151,7 @@ internal static ListWithContinuationTokenResult DeserializeListWithContinuationT List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(Thing.DeserializeThing(item, options)); + array.Add(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); } things = array; continue; diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithNextLinkResult.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithNextLinkResult.Serialization.cs index 05411d9837c..a330dbcd549 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithNextLinkResult.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithNextLinkResult.Serialization.cs @@ -151,7 +151,7 @@ internal static ListWithNextLinkResult DeserializeListWithNextLinkResult(JsonEle List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(Thing.DeserializeThing(item, options)); + array.Add(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); } things = array; continue; diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithStringNextLinkResult.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithStringNextLinkResult.Serialization.cs index dbe94bf0dd0..5bed51c8a56 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithStringNextLinkResult.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithStringNextLinkResult.Serialization.cs @@ -151,7 +151,7 @@ internal static ListWithStringNextLinkResult DeserializeListWithStringNextLinkRe List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(Thing.DeserializeThing(item, options)); + array.Add(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); } things = array; continue; diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NestedMammal.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NestedMammal.Serialization.cs index b344bf80e02..f509fc7d3db 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NestedMammal.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NestedMammal.Serialization.cs @@ -173,7 +173,7 @@ internal static NestedMammal DeserializeNestedPetsUnion(JsonElement element, Mod switch (discriminator.GetString()) { case "cat": - return ExperimentalUnionCat.DeserializeExperimentalUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(ExperimentalUnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : ExperimentalUnionCat.DeserializeExperimentalUnionCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'NestedPets'."); } @@ -221,7 +221,7 @@ internal static NestedMammal DeserializeCollisionPetsUnion2(JsonElement element, switch (discriminator.GetString()) { case "cat": - return ExperimentalUnionCat.DeserializeExperimentalUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(ExperimentalUnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : ExperimentalUnionCat.DeserializeExperimentalUnionCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'CollisionPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NullableDynamicModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NullableDynamicModel.Serialization.cs index 86479056edf..0b3f46fa628 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NullableDynamicModel.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NullableDynamicModel.Serialization.cs @@ -505,7 +505,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement modelValue = null; continue; } - modelValue = AnotherDynamicModel.DeserializeAnotherDynamicModel(prop.Value, prop.Value.GetUtf8Bytes(), options); + modelValue = options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop.Value, prop.Value.GetUtf8Bytes(), options); continue; } if (prop.NameEquals("children"u8)) @@ -518,7 +518,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); + array.Add(options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); } children = array; continue; @@ -533,7 +533,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement Dictionary dictionary = new Dictionary(); foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(prop0.Name, AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); + dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); } childDictionary = dictionary; continue; @@ -557,7 +557,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement List array0 = new List(); foreach (var item0 in item.EnumerateArray()) { - array0.Add(AnotherDynamicModel.DeserializeAnotherDynamicModel(item0, item0.GetUtf8Bytes(), options)); + array0.Add(options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item0, item0.GetUtf8Bytes(), options)); } array.Add(array0); } @@ -584,7 +584,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement Dictionary dictionary0 = new Dictionary(); foreach (var prop1 in prop0.Value.EnumerateObject()) { - dictionary0.Add(prop1.Name, AnotherDynamicModel.DeserializeAnotherDynamicModel(prop1.Value, prop1.Value.GetUtf8Bytes(), options)); + dictionary0.Add(prop1.Name, options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop1.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop1.Value, prop1.Value.GetUtf8Bytes(), options)); } dictionary.Add(prop0.Name, dictionary0); } @@ -611,7 +611,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement List array = new List(); foreach (var item in prop0.Value.EnumerateArray()) { - array.Add(AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); + array.Add(options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); } dictionary.Add(prop0.Name, array); } @@ -638,7 +638,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement Dictionary dictionary = new Dictionary(); foreach (var prop0 in item.EnumerateObject()) { - dictionary.Add(prop0.Name, AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); + dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); } array.Add(dictionary); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableContainer.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableContainer.Serialization.cs index f1c7c65686e..1502d8a3fed 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableContainer.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableContainer.Serialization.cs @@ -128,7 +128,7 @@ internal static OptionalNullableContainer DeserializeOptionalNullableContainer(J { if (prop.NameEquals("child"u8)) { - child = OptionalNullableProperties.DeserializeOptionalNullableProperties(prop.Value, options); + child = options.ShouldReadThroughProxy(typeof(OptionalNullableProperties), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : OptionalNullableProperties.DeserializeOptionalNullableProperties(prop.Value, options); continue; } if (options.Format != "W") diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableProperties.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableProperties.Serialization.cs index fc903561509..d03ab9e56bb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableProperties.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableProperties.Serialization.cs @@ -311,7 +311,7 @@ internal static OptionalNullableProperties DeserializeOptionalNullableProperties nullableModel = null; continue; } - nullableModel = OptionalNullableChild.DeserializeOptionalNullableChild(prop.Value, options); + nullableModel = options.ShouldReadThroughProxy(typeof(OptionalNullableChild), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : OptionalNullableChild.DeserializeOptionalNullableChild(prop.Value, options); continue; } if (prop.NameEquals("nullableString"u8)) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PagePreviewDetails.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PagePreviewDetails.Serialization.cs index e58a7bf0bc7..575ddbdc629 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PagePreviewDetails.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PagePreviewDetails.Serialization.cs @@ -148,7 +148,7 @@ internal static PagePreviewDetails DeserializePagePreviewDetails(JsonElement ele List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(PreviewDetails.DeserializePreviewDetails(item, options)); + array.Add(options.ShouldReadThroughProxy(typeof(PreviewDetails), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : PreviewDetails.DeserializePreviewDetails(item, options)); } items = array; continue; diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PageThing.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PageThing.Serialization.cs index 508a1aa2181..f33ab76b1e1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PageThing.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PageThing.Serialization.cs @@ -145,7 +145,7 @@ internal static PageThing DeserializePageThing(JsonElement element, ModelReaderW List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(Thing.DeserializeThing(item, options)); + array.Add(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); } items = array; continue; diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionA.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionA.Serialization.cs index 575f4bfc70b..b99d2054a2e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionA.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionA.Serialization.cs @@ -170,7 +170,7 @@ internal static RebasedUnionA DeserializePetsUnion(JsonElement element, ModelRea switch (discriminator.GetString()) { case "a": - return RebasedUnionALeaf.DeserializeRebasedUnionALeaf(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(RebasedUnionALeaf), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RebasedUnionALeaf.DeserializeRebasedUnionALeaf(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'Pets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionB.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionB.Serialization.cs index 109326028fc..057df45d059 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionB.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionB.Serialization.cs @@ -170,7 +170,7 @@ internal static RebasedUnionB DeserializePetsUnion1(JsonElement element, ModelRe switch (discriminator.GetString()) { case "b": - return RebasedUnionBLeaf.DeserializeRebasedUnionBLeaf(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(RebasedUnionBLeaf), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RebasedUnionBLeaf.DeserializeRebasedUnionBLeaf(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'Pets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionPet.Serialization.cs index 7c2ae03fdc1..045de4d471b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionPet.Serialization.cs @@ -172,9 +172,9 @@ internal static RebasedUnionPet DeserializeRebasedPetsUnion(JsonElement element, switch (discriminator.GetString()) { case "a": - return RebasedUnionA.DeserializeRebasedUnionA(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(RebasedUnionA), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RebasedUnionA.DeserializeRebasedUnionA(discriminator0, options); case "b": - return RebasedUnionB.DeserializeRebasedUnionB(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(RebasedUnionB), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RebasedUnionB.DeserializeRebasedUnionB(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'RebasedPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs index d382367cb0d..c162c0c01c8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs @@ -408,7 +408,7 @@ internal static RoundTripModel DeserializeRoundTripModel(JsonElement element, Mo } if (prop.NameEquals("requiredModel"u8)) { - requiredModel = Thing.DeserializeThing(prop.Value, options); + requiredModel = options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(prop.Value, options); continue; } if (prop.NameEquals("intExtensibleEnum"u8)) @@ -622,7 +622,7 @@ internal static RoundTripModel DeserializeRoundTripModel(JsonElement element, Mo } if (prop.NameEquals("modelWithRequiredNullable"u8)) { - modelWithRequiredNullable = ModelWithRequiredNullableProperties.DeserializeModelWithRequiredNullableProperties(prop.Value, options); + modelWithRequiredNullable = options.ShouldReadThroughProxy(typeof(ModelWithRequiredNullableProperties), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : ModelWithRequiredNullableProperties.DeserializeModelWithRequiredNullableProperties(prop.Value, options); continue; } if (prop.NameEquals("requiredBytes"u8)) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SerializePetsUnion.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SerializePetsUnion.Serialization.cs index 0967899b911..7a8afe7d12a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SerializePetsUnion.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SerializePetsUnion.Serialization.cs @@ -162,7 +162,7 @@ internal static SerializePetsUnion DeserializePetsUnion1(JsonElement element, Mo switch (discriminator.GetString()) { case "cat": - return SerializeNamedCat.DeserializeSerializeNamedCat(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(SerializeNamedCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : SerializeNamedCat.DeserializeSerializeNamedCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'Pets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionPet.Serialization.cs index 18616419207..41649f4d640 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionPet.Serialization.cs @@ -172,9 +172,9 @@ internal static UnionPet DeserializeUnionPetsUnion(JsonElement element, ModelRea switch (discriminator.GetString()) { case "cat": - return UnionCat.DeserializeUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(UnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : UnionCat.DeserializeUnionCat(discriminator0, options); case "dog": - return UnionDog.DeserializeUnionDog(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(UnionDog), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : UnionDog.DeserializeUnionDog(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'UnionPets'."); } @@ -228,9 +228,9 @@ internal static UnionPet DeserializeAlternateUnionPetsUnion(JsonElement element, switch (discriminator.GetString()) { case "feline": - return UnionCat.DeserializeUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(UnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : UnionCat.DeserializeUnionCat(discriminator0, options); case "canine": - return UnionDog.DeserializeUnionDog(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(UnionDog), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : UnionDog.DeserializeUnionDog(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'AlternateUnionPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Wrapper.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Wrapper.Serialization.cs index 39a4f0f0767..64bdc587d79 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Wrapper.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Wrapper.Serialization.cs @@ -130,7 +130,7 @@ internal static Wrapper DeserializeWrapper(JsonElement element, ModelReaderWrite { if (prop.NameEquals("action"u8)) { - action = RoundTripModel.DeserializeRoundTripModel(prop.Value, options); + action = options.ShouldReadThroughProxy(typeof(RoundTripModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RoundTripModel.DeserializeRoundTripModel(prop.Value, options); continue; } if (options.Format != "W") diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlAdvancedModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlAdvancedModel.Serialization.cs index 5792b8a6f46..b6f1ad2b927 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlAdvancedModel.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlAdvancedModel.Serialization.cs @@ -499,7 +499,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M } if (localName == "unwrappedItems") { - unwrappedItems.Add(XmlItem.DeserializeXmlItem(child, options)); + unwrappedItems.Add(options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(child, options)); continue; } if (localName == "wrappedColors") @@ -517,19 +517,19 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M List array = new List(); foreach (var e in child.Elements("Item")) { - array.Add(XmlItem.DeserializeXmlItem(e, options)); + array.Add(options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(e.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(e, options)); } items = array; continue; } if (localName == "nestedModel") { - nestedModel = XmlNestedModel.DeserializeXmlNestedModel(child, options); + nestedModel = options.ShouldReadThroughProxy(typeof(XmlNestedModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlNestedModel.DeserializeXmlNestedModel(child, options); continue; } if (localName == "optionalNestedModel") { - optionalNestedModel = XmlNestedModel.DeserializeXmlNestedModel(child, options); + optionalNestedModel = options.ShouldReadThroughProxy(typeof(XmlNestedModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlNestedModel.DeserializeXmlNestedModel(child, options); continue; } if (localName == "metadata") @@ -604,7 +604,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M } if (localName == "anotherModel" && ns == anotherModelNs) { - anotherModel = XmlNestedModel.DeserializeXmlNestedModel(child, options); + anotherModel = options.ShouldReadThroughProxy(typeof(XmlNestedModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlNestedModel.DeserializeXmlNestedModel(child, options); continue; } if (localName == "modelsWithNamespaces") @@ -612,14 +612,14 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M List array = new List(); foreach (var e in child.Elements(modelsWithNamespacesNs + "XmlModelWithNamespace")) { - array.Add(XmlModelWithNamespace.DeserializeXmlModelWithNamespace(e, options)); + array.Add(options.ShouldReadThroughProxy(typeof(XmlModelWithNamespace), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(e.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlModelWithNamespace.DeserializeXmlModelWithNamespace(e, options)); } modelsWithNamespaces = array; continue; } if (localName == "unwrappedModelsWithNamespaces") { - unwrappedModelsWithNamespaces.Add(XmlModelWithNamespace.DeserializeXmlModelWithNamespace(child, options)); + unwrappedModelsWithNamespaces.Add(options.ShouldReadThroughProxy(typeof(XmlModelWithNamespace), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlModelWithNamespace.DeserializeXmlModelWithNamespace(child, options)); continue; } if (localName == "listOfListFoo") @@ -630,7 +630,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M List list = new List(); foreach (var item in e.Elements()) { - list.Add(XmlItem.DeserializeXmlItem(item, options)); + list.Add(options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(item, options)); } array.Add(list); } @@ -642,7 +642,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M Dictionary dictionary = new Dictionary(); foreach (var e in child.Elements()) { - dictionary.Add(e.Name.LocalName, XmlItem.DeserializeXmlItem(e, options)); + dictionary.Add(e.Name.LocalName, options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(e.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(e, options)); } dictionaryFoo = dictionary; continue; @@ -655,7 +655,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M Dictionary dict = new Dictionary(); foreach (var item in e.Elements()) { - dict.Add(item.Name.LocalName, XmlItem.DeserializeXmlItem(item, options)); + dict.Add(item.Name.LocalName, options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(item, options)); } dictionary.Add(e.Name.LocalName, dict); } @@ -670,7 +670,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M List list = new List(); foreach (var item in e.Elements()) { - list.Add(XmlItem.DeserializeXmlItem(item, options)); + list.Add(options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(item, options)); } dictionary.Add(e.Name.LocalName, list); } @@ -685,7 +685,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M Dictionary dict = new Dictionary(); foreach (var item in e.Elements()) { - dict.Add(item.Name.LocalName, XmlItem.DeserializeXmlItem(item, options)); + dict.Add(item.Name.LocalName, options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(item, options)); } array.Add(dict); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlUnionPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlUnionPet.Serialization.cs index 9abb9feb40a..38dc62255f2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlUnionPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlUnionPet.Serialization.cs @@ -240,7 +240,7 @@ internal static XmlUnionPet DeserializeXmlUnionPetsUnion(JsonElement element, Mo switch (discriminator.GetString()) { case "cat": - return XmlUnionCat.DeserializeXmlUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(typeof(XmlUnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlUnionCat.DeserializeXmlUnionCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'XmlUnionPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/SampleTypeSpec.csproj b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/SampleTypeSpec.csproj index a87f7fc1c1d..6e1ffc0ed16 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/SampleTypeSpec.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/SampleTypeSpec.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/src/Authentication.ApiKey.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/src/Authentication.ApiKey.csproj index e6cff2c1e64..1652eff7942 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/src/Authentication.ApiKey.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/src/Authentication.ApiKey.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/src/Authentication.Http.Custom.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/src/Authentication.Http.Custom.csproj index 41b05b03937..2a8fbab6573 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/src/Authentication.Http.Custom.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/src/Authentication.Http.Custom.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/src/Authentication.OAuth2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/src/Authentication.OAuth2.csproj index f849240e7f4..9a62789597c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/src/Authentication.OAuth2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/src/Authentication.OAuth2.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/src/Authentication.Union.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/src/Authentication.Union.csproj index ba7ec8d71ed..25a384bcc3c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/src/Authentication.Union.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/src/Authentication.Union.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/response-as-bool/src/_Specs_.Azure.ClientGenerator.Core.ResponseAsBool.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/response-as-bool/src/_Specs_.Azure.ClientGenerator.Core.ResponseAsBool.csproj index 6c9750f6ff1..51a0a6ea257 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/response-as-bool/src/_Specs_.Azure.ClientGenerator.Core.ResponseAsBool.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/response-as-bool/src/_Specs_.Azure.ClientGenerator.Core.ResponseAsBool.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/response-replacement/src/_Specs_.Azure.ClientGenerator.Core.ResponseReplacement.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/response-replacement/src/_Specs_.Azure.ClientGenerator.Core.ResponseReplacement.csproj index e294e96b2b4..3dcc064780e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/response-replacement/src/_Specs_.Azure.ClientGenerator.Core.ResponseReplacement.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/response-replacement/src/_Specs_.Azure.ClientGenerator.Core.ResponseReplacement.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Client.Structure.Service.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Client.Structure.Service.csproj index c3e4db2072c..3a3db903876 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Client.Structure.Service.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Client.Structure.Service.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Client.Structure.Service.Default.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Client.Structure.Service.Default.csproj index b760230385e..2ee346668e1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Client.Structure.Service.Default.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Client.Structure.Service.Default.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/src/Client.Structure.Service.Multi.Client.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/src/Client.Structure.Service.Multi.Client.csproj index de3df7167e6..2b087a6b24d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/src/Client.Structure.Service.Multi.Client.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/src/Client.Structure.Service.Multi.Client.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/src/Client.Structure.Service.Renamed.Operation.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/src/Client.Structure.Service.Renamed.Operation.csproj index bec91378bff..07b94e1edb2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/src/Client.Structure.Service.Renamed.Operation.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/src/Client.Structure.Service.Renamed.Operation.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Client.Structure.Service.TwoOperationGroup.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Client.Structure.Service.TwoOperationGroup.csproj index e63542948e9..a20f4881647 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Client.Structure.Service.TwoOperationGroup.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Client.Structure.Service.TwoOperationGroup.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Documentation.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Documentation.csproj index 6896d28e273..ae9662f8847 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Documentation.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Documentation.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Encode.Array.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Encode.Array.csproj index 89e282add3d..81f82ee16c3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Encode.Array.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Encode.Array.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/boolean/src/Encode.Boolean.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/boolean/src/Encode.Boolean.csproj index cc2ae94984d..644ba483c37 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/boolean/src/Encode.Boolean.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/boolean/src/Encode.Boolean.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Encode.Bytes.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Encode.Bytes.csproj index f556843e051..5ba1f0f0c54 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Encode.Bytes.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Encode.Bytes.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Encode.Datetime.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Encode.Datetime.csproj index 2f46250a6f5..93a1a0f4c9c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Encode.Datetime.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Encode.Datetime.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Encode.Duration.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Encode.Duration.csproj index 4fbeda285e4..3e4ce1ec55c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Encode.Duration.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Encode.Duration.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Encode.Numeric.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Encode.Numeric.csproj index 3a20fe0a04a..ea1188b0053 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Encode.Numeric.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Encode.Numeric.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Parameters.Basic.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Parameters.Basic.csproj index 0f390d3ce41..7a711ed4491 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Parameters.Basic.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Parameters.Basic.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Parameters.BodyOptionality.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Parameters.BodyOptionality.csproj index 051f046bd52..16eb6c201e9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Parameters.BodyOptionality.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Parameters.BodyOptionality.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-root/src/Parameters.BodyRoot.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-root/src/Parameters.BodyRoot.csproj index fdab120d046..4012987b277 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-root/src/Parameters.BodyRoot.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-root/src/Parameters.BodyRoot.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Parameters.CollectionFormat.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Parameters.CollectionFormat.csproj index c18dea48869..8181b4ff0d0 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Parameters.CollectionFormat.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Parameters.CollectionFormat.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/src/Parameters.Path.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/src/Parameters.Path.csproj index e27cc956fe0..728350e1ca8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/src/Parameters.Path.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/src/Parameters.Path.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Parameters.Query.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Parameters.Query.csproj index 42dbbd52673..954cb0c059e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Parameters.Query.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Parameters.Query.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Parameters.Spread.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Parameters.Spread.csproj index c74f45c2ceb..745a930a71c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Parameters.Spread.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Parameters.Spread.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Payload.ContentNegotiation.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Payload.ContentNegotiation.csproj index a51f764b849..d4ac273a048 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Payload.ContentNegotiation.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Payload.ContentNegotiation.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/head/src/Payload.Head.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/head/src/Payload.Head.csproj index be5eae6c928..243e2c031ad 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/head/src/Payload.Head.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/head/src/Payload.Head.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/src/Payload.JsonMergePatch.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/src/Payload.JsonMergePatch.csproj index ff988d62f02..6c232c732d5 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/src/Payload.JsonMergePatch.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/src/Payload.JsonMergePatch.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Payload.MediaType.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Payload.MediaType.csproj index 6a3f11bf2b8..cd6c6d10ee3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Payload.MediaType.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Payload.MediaType.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Payload.MultiPart.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Payload.MultiPart.csproj index eabedd8c56c..f1314ec890b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Payload.MultiPart.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Payload.MultiPart.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Payload.Pageable.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Payload.Pageable.csproj index 3c0533a73e5..a25c5d2f7a9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Payload.Pageable.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Payload.Pageable.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Payload.Xml.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Payload.Xml.csproj index 0a23625d1a7..2fb350e009b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Payload.Xml.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Payload.Xml.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/src/Resiliency.SrvDriven.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/src/Resiliency.SrvDriven.V1.csproj index 3c17f45e389..85cbd910c9c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/src/Resiliency.SrvDriven.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/src/Resiliency.SrvDriven.V1.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/src/Resiliency.SrvDriven.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/src/Resiliency.SrvDriven.V2.csproj index 099d808e435..8ea007e6961 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/src/Resiliency.SrvDriven.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/src/Resiliency.SrvDriven.V2.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj index da285aa6732..71b6f50bd9d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/src/Response.StatusCodeRange.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/src/Response.StatusCodeRange.csproj index 9f4db4b0446..7ec2c51a158 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/src/Response.StatusCodeRange.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/src/Response.StatusCodeRange.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Routes.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Routes.csproj index 68470455f61..e88aa642dbe 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Routes.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Routes.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Serialization.EncodedName.Json.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Serialization.EncodedName.Json.csproj index 43deed8db6a..bb42614421f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Serialization.EncodedName.Json.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Serialization.EncodedName.Json.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/src/Server.Endpoint.NotDefined.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/src/Server.Endpoint.NotDefined.csproj index 5d2734a9ba7..47987f325bb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/src/Server.Endpoint.NotDefined.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/src/Server.Endpoint.NotDefined.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/src/Server.Path.Multiple.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/src/Server.Path.Multiple.csproj index 4826ef70ea6..5174ea2dc3b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/src/Server.Path.Multiple.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/src/Server.Path.Multiple.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/src/Server.Path.Single.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/src/Server.Path.Single.csproj index 233ef58ad65..c3accce0327 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/src/Server.Path.Single.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/src/Server.Path.Single.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/src/Server.Versions.NotVersioned.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/src/Server.Versions.NotVersioned.csproj index 52a7800234f..a0397a84a63 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/src/Server.Versions.NotVersioned.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/src/Server.Versions.NotVersioned.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/src/Server.Versions.Versioned.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/src/Server.Versions.Versioned.csproj index 6faf3e78a72..baf1dc2df3f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/src/Server.Versions.Versioned.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/src/Server.Versions.Versioned.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Service.MultipleServices.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Service.MultipleServices.csproj index 6e9552bbe81..d508e3721cb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Service.MultipleServices.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Service.MultipleServices.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/src/SpecialHeaders.ConditionalRequest.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/src/SpecialHeaders.ConditionalRequest.csproj index 717cb7e9813..58edb0affc2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/src/SpecialHeaders.ConditionalRequest.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/src/SpecialHeaders.ConditionalRequest.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/src/SpecialHeaders.Repeatability.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/src/SpecialHeaders.Repeatability.csproj index 213d2fa239a..09f635e3f62 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/src/SpecialHeaders.Repeatability.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/src/SpecialHeaders.Repeatability.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/SpecialWords.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/SpecialWords.csproj index 42bccff6ae2..4a6fdbc0ab4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/SpecialWords.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/SpecialWords.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Streaming.Jsonl.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Streaming.Jsonl.csproj index 386ce9e5bf0..75c958d51fa 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Streaming.Jsonl.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Streaming.Jsonl.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Streaming.Sse.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Streaming.Sse.csproj index 8aa31b7d7b8..64b7c04028c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Streaming.Sse.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Streaming.Sse.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Type.Array.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Type.Array.csproj index 77dc363cea8..ac47b1d3719 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Type.Array.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Type.Array.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Type.Dictionary.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Type.Dictionary.csproj index b9349e3e09f..dcbf6766df7 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Type.Dictionary.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Type.Dictionary.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Type.Enum.Extensible.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Type.Enum.Extensible.csproj index 23bca11e63c..8cca7eb9ec3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Type.Enum.Extensible.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Type.Enum.Extensible.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Type.Enum.Fixed.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Type.Enum.Fixed.csproj index f78989a3dcb..01bbbe8890c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Type.Enum.Fixed.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Type.Enum.Fixed.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Type.Model.Empty.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Type.Model.Empty.csproj index 38489965704..e94282b23fb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Type.Model.Empty.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Type.Model.Empty.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Type.Model.Inheritance.EnumDiscriminator.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Type.Model.Inheritance.EnumDiscriminator.csproj index a98d5249cb6..784ab6b3480 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Type.Model.Inheritance.EnumDiscriminator.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Type.Model.Inheritance.EnumDiscriminator.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Type.Model.Inheritance.NestedDiscriminator.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Type.Model.Inheritance.NestedDiscriminator.csproj index 135fea440d0..9997cad7bc9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Type.Model.Inheritance.NestedDiscriminator.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Type.Model.Inheritance.NestedDiscriminator.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Type.Model.Inheritance.NotDiscriminated.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Type.Model.Inheritance.NotDiscriminated.csproj index 38e4fe07a13..18000914486 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Type.Model.Inheritance.NotDiscriminated.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Type.Model.Inheritance.NotDiscriminated.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Type.Model.Inheritance.Recursive.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Type.Model.Inheritance.Recursive.csproj index 2a98bea847c..1688a556c64 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Type.Model.Inheritance.Recursive.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Type.Model.Inheritance.Recursive.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Type.Model.Inheritance.SingleDiscriminator.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Type.Model.Inheritance.SingleDiscriminator.csproj index b579ae9f805..86e5c88a87c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Type.Model.Inheritance.SingleDiscriminator.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Type.Model.Inheritance.SingleDiscriminator.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Type.Model.Usage.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Type.Model.Usage.csproj index 5f798130e2f..01962276d1a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Type.Model.Usage.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Type.Model.Usage.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Type.Model.Visibility.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Type.Model.Visibility.csproj index 022336babf4..e7d6030c12f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Type.Model.Visibility.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Type.Model.Visibility.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Type.Property.AdditionalProperties.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Type.Property.AdditionalProperties.csproj index 34571a06526..59329d2fd98 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Type.Property.AdditionalProperties.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Type.Property.AdditionalProperties.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Type.Property.Nullable.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Type.Property.Nullable.csproj index 7ebe5c775ca..d18eab3fc86 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Type.Property.Nullable.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Type.Property.Nullable.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Type.Property.Optional.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Type.Property.Optional.csproj index c23f32ee47e..650f27ab9a4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Type.Property.Optional.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Type.Property.Optional.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Type.Property.ValueTypes.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Type.Property.ValueTypes.csproj index 673d7d885d3..301653f6119 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Type.Property.ValueTypes.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Type.Property.ValueTypes.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Type.Scalar.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Type.Scalar.csproj index 9628e297261..59b35b16f55 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Type.Scalar.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Type.Scalar.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Type.Union.Discriminated.Extends.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Type.Union.Discriminated.Extends.csproj index 79af0087b10..3dc7e9196a4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Type.Union.Discriminated.Extends.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Type.Union.Discriminated.Extends.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Type.Union.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Type.Union.csproj index d9c574f174f..8ecff4fa1d2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Type.Union.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Type.Union.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/src/Versioning.Added.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/src/Versioning.Added.V1.csproj index 933ebbd8633..aaaa6ede97b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/src/Versioning.Added.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/src/Versioning.Added.V1.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/src/Versioning.Added.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/src/Versioning.Added.V2.csproj index 1f17f3f5c7a..e3590fdbc1f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/src/Versioning.Added.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/src/Versioning.Added.V2.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/src/Versioning.MadeOptional.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/src/Versioning.MadeOptional.V1.csproj index 8a11d530c9e..21f0bb6fc54 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/src/Versioning.MadeOptional.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/src/Versioning.MadeOptional.V1.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/src/Versioning.MadeOptional.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/src/Versioning.MadeOptional.V2.csproj index 60d8478016e..f881257b6c6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/src/Versioning.MadeOptional.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/src/Versioning.MadeOptional.V2.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/src/Versioning.Removed.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/src/Versioning.Removed.V1.csproj index feedd2ecd8f..f8adf357411 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/src/Versioning.Removed.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/src/Versioning.Removed.V1.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/src/Versioning.Removed.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/src/Versioning.Removed.V2.csproj index e926e07f865..430da6164ad 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/src/Versioning.Removed.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/src/Versioning.Removed.V2.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/src/Versioning.Removed.V2Preview.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/src/Versioning.Removed.V2Preview.csproj index cae8b76e6da..94f89d443c6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/src/Versioning.Removed.V2Preview.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/src/Versioning.Removed.V2Preview.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/src/Versioning.RenamedFrom.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/src/Versioning.RenamedFrom.V1.csproj index 2f98456a217..cab36b1b69c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/src/Versioning.RenamedFrom.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/src/Versioning.RenamedFrom.V1.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/src/Versioning.RenamedFrom.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/src/Versioning.RenamedFrom.V2.csproj index 445934f5bb0..c809bca2f68 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/src/Versioning.RenamedFrom.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/src/Versioning.RenamedFrom.V2.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/src/Versioning.ReturnTypeChangedFrom.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/src/Versioning.ReturnTypeChangedFrom.V1.csproj index df736caf62c..ece163bae50 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/src/Versioning.ReturnTypeChangedFrom.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/src/Versioning.ReturnTypeChangedFrom.V1.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/src/Versioning.ReturnTypeChangedFrom.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/src/Versioning.ReturnTypeChangedFrom.V2.csproj index 6f018604824..ea79c0f304f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/src/Versioning.ReturnTypeChangedFrom.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/src/Versioning.ReturnTypeChangedFrom.V2.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/src/Versioning.TypeChangedFrom.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/src/Versioning.TypeChangedFrom.V1.csproj index 6ec90566fb1..72a26eba795 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/src/Versioning.TypeChangedFrom.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/src/Versioning.TypeChangedFrom.V1.csproj @@ -10,7 +10,7 @@ - + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/src/Versioning.TypeChangedFrom.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/src/Versioning.TypeChangedFrom.V2.csproj index a4e27099c19..c07fde0914a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/src/Versioning.TypeChangedFrom.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/src/Versioning.TypeChangedFrom.V2.csproj @@ -10,7 +10,7 @@ - + From 6ffa7a3bcac1e5242fd32dc0aebe315dfcf7aaa0 Mon Sep 17 00:00:00 2001 From: Jorge Rangel Date: Fri, 20 Nov 2026 11:44:15 -0600 Subject: [PATCH 2/3] feat(http-client-csharp): pass client model proxies through operations Address PR feedback on model proxy routing: - Read dual-format nested XML models through their proxies with XML options so XML-only parents read with "W" still apply registered proxies. - Make ShouldReadThroughProxy generic and cache the per-type context lookup. - Copy ClientPipelineOptions.ModelProxies into a client-level ModelReaderWriterOptions field and pass it to subclients and paging collection results. - Add internal ToBinaryContent(ModelReaderWriterOptions) and FromClientResult(ClientResult, ModelReaderWriterOptions) conversions and use them in convenience methods instead of the cast operators. - Keep the existing output for pipelines whose options don't carry model proxies. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../Abstractions/ClientPipelineApi.cs | 13 + .../src/Providers/ClientPipelineProvider.cs | 3 + .../src/Providers/ClientProvider.cs | 36 + .../Providers/CollectionResultDefinition.cs | 53 +- ...zationExtensionsDefinition.ModelProxies.cs | 145 + ...elSerializationExtensionsDefinition.Xml.cs | 32 + .../ModelSerializationExtensionsDefinition.cs | 24 +- ...erializationTypeDefinition.ModelProxies.cs | 206 + .../MrwSerializationTypeDefinition.Xml.cs | 16 +- .../MrwSerializationTypeDefinition.cs | 13 +- .../Providers/ScmMethodProviderCollection.cs | 85 +- ...odelSerializationExtensionsSnippets.Xml.cs | 4 + .../ModelSerializationExtensionsSnippets.cs | 6 +- .../Sample_TypeSpec/TreeXmlTests.cs | 4 +- .../ClientProviderCustomizationTests.cs | 3 +- .../ClientProviders/ClientProviderTests.cs | 59 +- ...ionalNonBodyParameterAddedWithModelBody.cs | 4 +- ..._NextLinkContinuationToken(False,False).cs | 8 +- ...y_NextLinkContinuationToken(False,True).cs | 32 +- ...NextLinkContinuationToken(StringFilter).cs | 32 +- ...nuationToken(StringFilter,ProtocolOnly).cs | 16 +- ...y_NextLinkContinuationToken(True,False).cs | 8 +- ...nuationToken(True,False,CustomProtocol).cs | 8 +- ...ontinuationToken(True,False,NoDefaults).cs | 16 +- ...ty_NextLinkContinuationToken(True,True).cs | 32 +- ...ContinuationToken(True,True,NoDefaults).cs | 32 +- ...CustomDeclarationsCompile(ParentClient).cs | 4 +- ...tiServiceClient_GeneratesExpectedClient.cs | 6 +- ...thThreeServices_GeneratesExpectedClient.cs | 8 +- ...eCombinedClient_GeneratesExpectedClient.cs | 2 + ...thThreeServices_GeneratesExpectedClient.cs | 2 + ...nkPagingAccountsForCustomMethods(False).cs | 8 +- ...kPagingImplementsRenamedPartials(False).cs | 12 +- ...NextLinkPagingPreservesTokenlessPartial.cs | 8 +- ...gRetainsTokenForLongerArgumentCollision.cs | 32 +- ...etainsTokenForOptionalArgumentCollision.cs | 32 +- ...xtLinkPagingUsesBetterLiteralConversion.cs | 64 +- ...yConstructor(WithDefault,False,False,0).cs | 1 + ...ryConstructor(WithDefault,False,True,0).cs | 1 + ...ryConstructor(WithDefault,True,False,0).cs | 1 + ...aryConstructor(WithDefault,True,True,0).cs | 1 + ...Constructor(WithRequired,False,False,0).cs | 1 + ...yConstructor(WithRequired,False,True,0).cs | 1 + ...yConstructor(WithRequired,True,False,0).cs | 1 + ...ryConstructor(WithRequired,True,True,0).cs | 1 + ...ValidateConstructorsWhenUnsupportedAuth.cs | 1 + .../ClientProviderTests/XmlDocsAreWritten.cs | 2 + .../CollectionResultDefinitionTests.cs | 4 +- .../ContinuationTokenInBody.cs | 8 +- .../ContinuationTokenInBodyAsync.cs | 8 +- .../ContinuationTokenInBodyOfT.cs | 10 +- .../ContinuationTokenInBodyOfTAsync.cs | 10 +- .../ContinuationTokenInHeader.cs | 4 +- .../ContinuationTokenInHeaderAsync.cs | 4 +- .../ContinuationTokenInHeaderOfT.cs | 6 +- .../ContinuationTokenInHeaderOfTAsync.cs | 6 +- .../NestedContinuationTokenInBody.cs | 8 +- .../NestedContinuationTokenInBodyAsync.cs | 8 +- .../NestedContinuationTokenInBodyOfT.cs | 10 +- .../NestedContinuationTokenInBodyOfTAsync.cs | 10 +- .../NoNextLinkOrContinuationToken.cs | 4 +- .../NoNextLinkOrContinuationTokenAsync.cs | 4 +- .../NoNextLinkOrContinuationTokenOfT.cs | 6 +- .../NoNextLinkOrContinuationTokenOfTAsync.cs | 6 +- .../NextLinkTests/InheritedNextLinkInBody.cs | 8 +- .../InheritedNextLinkInBodyAsync.cs | 8 +- .../InheritedNextLinkInBodyOfT.cs | 10 +- .../InheritedNextLinkInBodyOfTAsync.cs | 10 +- .../NextLinkTests/NestedNextLinkInBody.cs | 8 +- .../NestedNextLinkInBodyAsync.cs | 8 +- .../NextLinkTests/NestedNextLinkInBodyOfT.cs | 10 +- .../NestedNextLinkInBodyOfTAsync.cs | 10 +- .../TestData/NextLinkTests/NextLinkInBody.cs | 8 +- .../NextLinkTests/NextLinkInBodyAsync.cs | 8 +- .../NextLinkTests/NextLinkInBodyOfT.cs | 10 +- .../NextLinkTests/NextLinkInBodyOfTAsync.cs | 10 +- .../NextLinkTests/NextLinkInHeader.cs | 4 +- .../NextLinkTests/NextLinkInHeaderAsync.cs | 4 +- .../NextLinkTests/NextLinkInHeaderOfT.cs | 6 +- .../NextLinkTests/NextLinkInHeaderOfTAsync.cs | 6 +- ...jectedParameterFiltersNextLinkArguments.cs | 8 +- ...lSerializationExtensionsDefinitionTests.cs | 44 +- ...dateShouldReadThroughProxyMethod(Cache).cs | 24 + .../ValidateShouldReadThroughProxyMethod.cs | 5 +- .../ValidateToWireOptionsMethod.cs | 26 + .../ValidateToXmlOptionsMethod.cs | 25 + .../MrwSerializationTypeDefinitionTests.cs | 58 +- ...estedModelReadsRouteThroughModelProxies.cs | 6 +- .../DeserializeArrayProperties.cs | 2 +- .../DeserializeDictionaryProperties.cs | 2 +- .../DeserializeModelPropertyType.cs | 2 +- .../DeserializeModelWithAP.cs | 2 +- ...ProxyConversionsTakeClientOptions(Json).cs | 14 + ...yConversionsTakeClientOptions(Json,Xml).cs | 30 + ...lProxyConversionsTakeClientOptions(Xml).cs | 19 + ...DeserializationMethodHandlesNestedModel.cs | 2 +- ...adsDualFormatNestedModelWithXmlOptions.cs} | 2 +- .../XmlDeserializationTests.cs | 6 +- .../ScmMethodProviderCollectionTests.cs | 56 +- ...tSettingsConstructor_WithStringEndpoint.cs | 2 + ...TestSettingsConstructor_WithUrlEndpoint.cs | 2 + ...extualEnvelopeSerialization(kind,value).cs | 4 +- ...textualEnvelopeSerialization(type,data).cs | 4 +- ...ingOperationParamsAndNonBodyModelParams.cs | 2 +- ...onvertsWithClientOptions(Json,Xml,json).cs | 5 + ...ConvertsWithClientOptions(Json,Xml,xml).cs | 5 + ...es_ConvertsWithClientOptions(Json,json).cs | 4 + ...xies_ConvertsWithClientOptions(Xml,xml).cs | 4 + ...stResponse_UsesXDocumentDeserialization.cs | 2 +- ...GeneratesUnbufferedAsyncStreamingResult.cs | 2 +- ...PagingOmitsOnlyContinuationToken(False).cs | 8 +- ...kPagingOmitsOnlyContinuationToken(True).cs | 8 +- ...tinuationTokenOptionsBag(CustomMethods).cs | 8 +- ...ervesContinuationTokenOptionsBag(False).cs | 8 +- ...servesContinuationTokenOptionsBag(True).cs | 8 +- ...ingPreservesContinuationTokenOptionsBag.cs | 8 +- ...andsBagForCollectionResult(Convenience).cs | 2 +- ...ExpandsBagForCollectionResult(Protocol).cs | 2 +- .../ClientPipelineWithoutModelProxies.cs | 29 + .../Local.Tests/ModelProxyTests.cs | 150 +- .../Local/Sample-TypeSpec/Sample-TypeSpec.tsp | 14 + .../src/Generated/AnimalOperations.cs | 21 +- ...entalSamplesGetAllAsyncCollectionResult.cs | 5 +- ...alSamplesGetAllAsyncCollectionResultOfT.cs | 7 +- ...perimentalSamplesGetAllCollectionResult.cs | 5 +- ...imentalSamplesGetAllCollectionResultOfT.cs | 7 +- ...hContinuationTokenAsyncCollectionResult.cs | 9 +- ...ntinuationTokenAsyncCollectionResultOfT.cs | 11 +- ...etWithContinuationTokenCollectionResult.cs | 9 +- ...ithContinuationTokenCollectionResultOfT.cs | 11 +- ...okenHeaderResponseAsyncCollectionResult.cs | 5 +- ...nHeaderResponseAsyncCollectionResultOfT.cs | 7 +- ...tionTokenHeaderResponseCollectionResult.cs | 5 +- ...nTokenHeaderResponseCollectionResultOfT.cs | 7 +- ...entGetWithNextLinkAsyncCollectionResult.cs | 9 +- ...GetWithNextLinkAsyncCollectionResultOfT.cs | 11 +- ...ecClientGetWithNextLinkCollectionResult.cs | 9 +- ...lientGetWithNextLinkCollectionResultOfT.cs | 11 +- ...lientGetWithPagingAsyncCollectionResult.cs | 5 +- ...ntGetWithPagingAsyncCollectionResultOfT.cs | 7 +- ...SpecClientGetWithPagingCollectionResult.cs | 5 +- ...cClientGetWithPagingCollectionResultOfT.cs | 7 +- ...WithStringNextLinkAsyncCollectionResult.cs | 9 +- ...hStringNextLinkAsyncCollectionResultOfT.cs | 11 +- ...ntGetWithStringNextLinkCollectionResult.cs | 9 +- ...etWithStringNextLinkCollectionResultOfT.cs | 11 +- .../src/Generated/ConstructorRequirements.cs | 69 +- .../src/Generated/DogOperations.cs | 13 +- .../src/Generated/ExperimentalSamples.cs | 17 +- .../Internal/ModelSerializationExtensions.cs | 48 +- .../Sample-TypeSpec/src/Generated/Metrics.cs | 10 +- .../Generated/Models/Animal.Serialization.cs | 20 + .../CollisionPetsUnion.Serialization.cs | 2 +- ...orClientNameCollisionLeaf.Serialization.cs | 20 + .../ConstructorInheritedLeaf.Serialization.cs | 7 + .../ConstructorOverride.Serialization.cs | 7 + ...eadOnlyCollectionOverride.Serialization.cs | 7 + .../ConstructorReadOnlyLeaf.Serialization.cs | 7 + ...nstructorReadOnlyOverride.Serialization.cs | 7 + ...equiredCollectionOverride.Serialization.cs | 7 + .../ConstructorWritableLeaf.Serialization.cs | 7 + .../CustomIntermediateCat.Serialization.cs | 13 + .../Models/CustomUnionCat.Serialization.cs | 13 + .../Models/CustomUnionPet.Serialization.cs | 20 + .../DescendantUnionCat.Serialization.cs | 13 + .../DescendantUnionPet.Serialization.cs | 2 +- .../DeserializeNamedCat.Serialization.cs | 13 + .../DeserializePetsUnion.Serialization.cs | 2 +- .../Models/DeserializerPet.Serialization.cs | 2 +- .../Models/DirectUnionCat.Serialization.cs | 13 + .../Models/DirectUnionPet.Serialization.cs | 22 +- .../DirectUnionPetContainer.Serialization.cs | 22 +- .../src/Generated/Models/Dog.Serialization.cs | 20 + .../Models/DynamicModel.Serialization.cs | 21 +- .../DynamicUnionPetContainer.Serialization.cs | 21 + .../ExperimentalUnionCat.Serialization.cs | 13 + .../Models/ExternalUnionCat.Serialization.cs | 13 + .../Generated/Models/Friend.Serialization.cs | 20 + .../Models/GetNotebookResult.Serialization.cs | 13 + .../GetWidgetMetricsResult.Serialization.cs | 13 + .../IntermediateUnionCat.Serialization.cs | 13 + .../Models/LifecycleModel.Serialization.cs | 15 +- ...TokenHeaderResponseResult.Serialization.cs | 15 +- ...thContinuationTokenResult.Serialization.cs | 15 +- .../ListWithNextLinkResult.Serialization.cs | 15 +- ...tWithStringNextLinkResult.Serialization.cs | 15 +- ...EmbeddedNonBodyParameters.Serialization.cs | 7 + .../Models/NestedMammal.Serialization.cs | 17 +- .../NullableDynamicModel.Serialization.cs | 14 +- ...OptionalNullableContainer.Serialization.cs | 2 +- ...ptionalNullableProperties.Serialization.cs | 2 +- .../PagePreviewDetails.Serialization.cs | 15 +- .../Models/PageThing.Serialization.cs | 15 +- .../src/Generated/Models/Pet.Serialization.cs | 20 + .../Models/PetsUnion.Serialization.cs | 13 + .../RawUnionPetContainer.Serialization.cs | 20 + .../Models/RebasedUnionA.Serialization.cs | 15 +- .../Models/RebasedUnionALeaf.Serialization.cs | 13 + .../Models/RebasedUnionB.Serialization.cs | 15 +- .../Models/RebasedUnionBLeaf.Serialization.cs | 13 + .../Models/RebasedUnionPet.Serialization.cs | 4 +- .../RenamedConstructorLeaf.Serialization.cs | 7 + ...enamedConstructorOverride.Serialization.cs | 7 + ...edConstructorReturnedName.Serialization.cs | 7 + ...iteralConstructorOverride.Serialization.cs | 20 + .../RenamedModelCustom.Serialization.cs | 20 + ...enamedConstructorOverride.Serialization.cs | 7 + ...turnsAnonymousModelResult.Serialization.cs | 13 + .../Models/RoundTripModel.Serialization.cs | 24 +- .../Generated/Models/SampleTypeSpecContext.cs | 1 + .../Models/SerializeNamedCat.Serialization.cs | 13 + .../SerializePetsUnion.Serialization.cs | 2 +- .../Generated/Models/Thing.Serialization.cs | 20 + .../Generated/Models/Tree.Serialization.cs | 36 +- .../Models/UnionCat.Serialization.cs | 13 + .../Models/UnionDog.Serialization.cs | 13 + .../Models/UnionPet.Serialization.cs | 8 +- .../Models/UnionPetContainer.Serialization.cs | 20 + .../Generated/Models/Wrapper.Serialization.cs | 2 +- .../Models/XmlAdvancedModel.Serialization.cs | 49 +- .../XmlConstructorOverride.Serialization.cs | 7 + .../Models/XmlTreeContainer.Serialization.cs | 166 + .../src/Generated/Models/XmlTreeContainer.cs | 23 + .../Models/XmlUnionCat.Serialization.cs | 29 + .../Models/XmlUnionPet.Serialization.cs | 38 +- .../src/Generated/Notebooks.cs | 10 +- .../src/Generated/PetOperations.cs | 21 +- .../Generated/PlantOperations.RestClient.cs | 12 + .../src/Generated/PlantOperations.cs | 81 +- .../src/Generated/SampleTypeSpecClient.cs | 158 +- .../Generated/SampleTypeSpecModelFactory.cs | 8 + .../src/Generated/UnionExtends.cs | 185 +- .../Local/Sample-TypeSpec/tspCodeModel.json | 5146 +++++++++-------- .../src/Generated/HeadAsBoolean.cs | 2 +- .../src/Generated/Group3.cs | 2 +- .../src/Generated/Group4.cs | 2 +- .../src/Generated/Group5.cs | 2 +- .../structure/default/src/Generated/Bar.cs | 2 +- .../structure/default/src/Generated/Baz.cs | 2 +- .../structure/default/src/Generated/BazFoo.cs | 2 +- .../structure/default/src/Generated/Foo.cs | 2 +- .../structure/default/src/Generated/Qux.cs | 2 +- .../structure/default/src/Generated/QuxBar.cs | 2 +- .../renamed-operation/src/Generated/Group.cs | 2 +- .../src/Generated/Group1.cs | 2 +- .../src/Generated/Group2.cs | 2 +- .../http/documentation/src/Generated/Lists.cs | 2 +- .../src/Generated/TextFormatting.cs | 2 +- .../encode/array/src/Generated/Property.cs | 2 +- .../encode/boolean/src/Generated/Property.cs | 2 +- .../http/encode/bytes/src/Generated/Header.cs | 2 +- .../encode/bytes/src/Generated/Property.cs | 2 +- .../http/encode/bytes/src/Generated/Query.cs | 2 +- .../encode/bytes/src/Generated/RequestBody.cs | 2 +- .../bytes/src/Generated/ResponseBody.cs | 2 +- .../encode/datetime/src/Generated/Header.cs | 2 +- .../encode/datetime/src/Generated/Property.cs | 2 +- .../encode/datetime/src/Generated/Query.cs | 2 +- .../datetime/src/Generated/ResponseHeader.cs | 2 +- .../encode/duration/src/Generated/Header.cs | 2 +- .../encode/duration/src/Generated/Lossy.cs | 2 +- .../encode/duration/src/Generated/Property.cs | 2 +- .../encode/duration/src/Generated/Query.cs | 2 +- .../encode/numeric/src/Generated/Property.cs | 2 +- .../basic/src/Generated/ExplicitBody.cs | 2 +- .../basic/src/Generated/ImplicitBody.cs | 2 +- .../src/Generated/OptionalExplicit.cs | 2 +- .../collection-format/src/Generated/Header.cs | 2 +- .../collection-format/src/Generated/Query.cs | 2 +- .../query/src/Generated/Constant.cs | 2 +- .../query/src/Generated/SpecialChar.cs | 2 +- .../parameters/spread/src/Generated/Alias.cs | 2 +- .../parameters/spread/src/Generated/Model.cs | 2 +- .../src/Generated/DifferentBody.cs | 2 +- .../src/Generated/SameBody.cs | 2 +- .../media-type/src/Generated/StringBody.cs | 2 +- .../multipart/src/Generated/FormData.cs | 2 +- .../multipart/src/Generated/FormDataFile.cs | 2 +- .../src/Generated/FormDataHttpParts.cs | 2 +- .../Generated/FormDataHttpPartsContentType.cs | 2 +- .../Generated/FormDataHttpPartsNonString.cs | 2 +- .../pageable/src/Generated/PageSize.cs | 2 +- .../src/Generated/ServerDrivenPagination.cs | 2 +- ...verDrivenPaginationAlternateInitialVerb.cs | 2 +- ...ServerDrivenPaginationContinuationToken.cs | 2 +- .../pageable/src/Generated/XmlPagination.cs | 2 +- .../Generated/ModelWithArrayOfModelValue.cs | 2 +- .../src/Generated/ModelWithAttributesValue.cs | 2 +- .../src/Generated/ModelWithDatetimeValue.cs | 2 +- .../src/Generated/ModelWithDictionaryValue.cs | 2 +- .../src/Generated/ModelWithEmptyArrayValue.cs | 2 +- .../Generated/ModelWithEncodedNamesValue.cs | 2 +- .../xml/src/Generated/ModelWithEnumValue.cs | 2 +- .../ModelWithNamespaceOnPropertiesValue.cs | 2 +- .../src/Generated/ModelWithNamespaceValue.cs | 2 +- .../Generated/ModelWithNestedModelValue.cs | 2 +- .../Generated/ModelWithOptionalFieldValue.cs | 2 +- .../Generated/ModelWithRenamedArraysValue.cs | 2 +- .../ModelWithRenamedAttributeValue.cs | 2 +- .../Generated/ModelWithRenamedFieldsValue.cs | 2 +- .../ModelWithRenamedNestedModelValue.cs | 2 +- .../ModelWithRenamedPropertyValue.cs | 2 +- ...odelWithRenamedUnwrappedModelArrayValue.cs | 2 +- ...ithRenamedWrappedAndItemModelArrayValue.cs | 2 +- .../ModelWithRenamedWrappedModelArrayValue.cs | 2 +- .../Generated/ModelWithSimpleArraysValue.cs | 2 +- .../xml/src/Generated/ModelWithTextValue.cs | 2 +- .../Generated/ModelWithUnwrappedArrayValue.cs | 2 +- .../ModelWithUnwrappedModelArrayValue.cs | 2 +- ...ithWrappedPrimitiveCustomItemNamesValue.cs | 2 +- .../xml/src/Generated/SimpleModelValue.cs | 2 +- .../xml/src/Generated/XmlErrorValue.cs | 2 +- .../http/routes/src/Generated/InInterface.cs | 2 +- .../routes/src/Generated/PathParameters.cs | 2 +- .../Generated/PathParametersLabelExpansion.cs | 2 +- .../PathParametersLabelExpansionExplode.cs | 2 +- .../PathParametersLabelExpansionStandard.cs | 2 +- .../PathParametersMatrixExpansion.cs | 2 +- .../PathParametersMatrixExpansionExplode.cs | 2 +- .../PathParametersMatrixExpansionStandard.cs | 2 +- .../Generated/PathParametersPathExpansion.cs | 2 +- .../PathParametersPathExpansionExplode.cs | 2 +- .../PathParametersPathExpansionStandard.cs | 2 +- .../PathParametersReservedExpansion.cs | 2 +- .../PathParametersSimpleExpansion.cs | 2 +- .../PathParametersSimpleExpansionExplode.cs | 2 +- .../PathParametersSimpleExpansionStandard.cs | 2 +- .../routes/src/Generated/QueryParameters.cs | 2 +- .../QueryParametersQueryContinuation.cs | 2 +- ...QueryParametersQueryContinuationExplode.cs | 2 +- ...ueryParametersQueryContinuationStandard.cs | 2 +- .../QueryParametersQueryExpansion.cs | 2 +- .../QueryParametersQueryExpansionExplode.cs | 2 +- .../QueryParametersQueryExpansionStandard.cs | 2 +- .../json/src/Generated/Property.cs | 2 +- .../src/Generated/AOperations.cs | 2 +- .../src/Generated/ASubNamespace.cs | 2 +- .../src/Generated/BOperations.cs | 2 +- .../src/Generated/BSubNamespace.cs | 2 +- .../src/Generated/ExtensibleStrings.cs | 2 +- .../src/Generated/ModelProperties.cs | 2 +- .../special-words/src/Generated/Models.cs | 2 +- .../special-words/src/Generated/Operations.cs | 2 +- .../special-words/src/Generated/Parameters.cs | 2 +- .../Generated/ReservedOperationBodyParams.cs | 2 +- .../streaming/jsonl/src/Generated/Basic.cs | 2 +- .../http/streaming/sse/src/Generated/Named.cs | 2 +- .../streaming/sse/src/Generated/Protocol.cs | 2 +- .../sse/src/Generated/ProtocolData.cs | 2 +- .../streaming/sse/src/Generated/Retrieve.cs | 2 +- .../streaming/sse/src/Generated/Unnamed.cs | 2 +- .../type/array/src/Generated/BooleanValue.cs | 2 +- .../type/array/src/Generated/DatetimeValue.cs | 2 +- .../type/array/src/Generated/DurationValue.cs | 2 +- .../type/array/src/Generated/Float32Value.cs | 2 +- .../type/array/src/Generated/Int32Value.cs | 2 +- .../type/array/src/Generated/Int64Value.cs | 2 +- .../type/array/src/Generated/ModelValue.cs | 2 +- .../src/Generated/NullableBooleanValue.cs | 2 +- .../array/src/Generated/NullableFloatValue.cs | 2 +- .../array/src/Generated/NullableInt32Value.cs | 2 +- .../array/src/Generated/NullableModelValue.cs | 2 +- .../src/Generated/NullableStringValue.cs | 2 +- .../type/array/src/Generated/StringValue.cs | 2 +- .../type/array/src/Generated/UnknownValue.cs | 2 +- .../dictionary/src/Generated/BooleanValue.cs | 2 +- .../dictionary/src/Generated/DatetimeValue.cs | 2 +- .../dictionary/src/Generated/DurationValue.cs | 2 +- .../dictionary/src/Generated/Float32Value.cs | 2 +- .../dictionary/src/Generated/Int32Value.cs | 2 +- .../dictionary/src/Generated/Int64Value.cs | 2 +- .../dictionary/src/Generated/ModelValue.cs | 2 +- .../src/Generated/NullableFloatValue.cs | 2 +- .../src/Generated/RecursiveModelValue.cs | 2 +- .../dictionary/src/Generated/StringValue.cs | 2 +- .../dictionary/src/Generated/UnknownValue.cs | 2 +- .../enum/extensible/src/Generated/String.cs | 2 +- .../type/enum/fixed/src/Generated/String.cs | 2 +- .../Generated/ExtendsDifferentSpreadFloat.cs | 2 +- .../Generated/ExtendsDifferentSpreadModel.cs | 2 +- .../ExtendsDifferentSpreadModelArray.cs | 2 +- .../Generated/ExtendsDifferentSpreadString.cs | 2 +- .../src/Generated/ExtendsFloat.cs | 2 +- .../src/Generated/ExtendsModel.cs | 2 +- .../src/Generated/ExtendsModelArray.cs | 2 +- .../src/Generated/ExtendsString.cs | 2 +- .../src/Generated/ExtendsUnknown.cs | 2 +- .../src/Generated/ExtendsUnknownDerived.cs | 2 +- .../Generated/ExtendsUnknownDiscriminated.cs | 2 +- .../src/Generated/IsFloat.cs | 2 +- .../src/Generated/IsModel.cs | 2 +- .../src/Generated/IsModelArray.cs | 2 +- .../src/Generated/IsString.cs | 2 +- .../src/Generated/IsUnknown.cs | 2 +- .../src/Generated/IsUnknownDerived.cs | 2 +- .../src/Generated/IsUnknownDiscriminated.cs | 2 +- .../src/Generated/MultipleSpread.cs | 2 +- .../src/Generated/SpreadDifferentFloat.cs | 2 +- .../src/Generated/SpreadDifferentModel.cs | 2 +- .../Generated/SpreadDifferentModelArray.cs | 2 +- .../src/Generated/SpreadDifferentString.cs | 2 +- .../src/Generated/SpreadFloat.cs | 2 +- .../src/Generated/SpreadModel.cs | 2 +- .../src/Generated/SpreadModelArray.cs | 2 +- .../SpreadRecordNonDiscriminatedUnion.cs | 2 +- .../SpreadRecordNonDiscriminatedUnion2.cs | 2 +- .../SpreadRecordNonDiscriminatedUnion3.cs | 2 +- .../src/Generated/SpreadRecordUnion.cs | 2 +- .../src/Generated/SpreadString.cs | 2 +- .../property/nullable/src/Generated/Bytes.cs | 2 +- .../nullable/src/Generated/CollectionsByte.cs | 2 +- .../src/Generated/CollectionsModel.cs | 2 +- .../src/Generated/CollectionsString.cs | 2 +- .../nullable/src/Generated/Datetime.cs | 2 +- .../nullable/src/Generated/Duration.cs | 2 +- .../property/nullable/src/Generated/String.cs | 2 +- .../src/Generated/BooleanLiteral.cs | 2 +- .../optionality/src/Generated/Bytes.cs | 2 +- .../src/Generated/CollectionsByte.cs | 2 +- .../src/Generated/CollectionsModel.cs | 2 +- .../optionality/src/Generated/Datetime.cs | 2 +- .../optionality/src/Generated/Duration.cs | 2 +- .../optionality/src/Generated/FloatLiteral.cs | 2 +- .../optionality/src/Generated/IntLiteral.cs | 2 +- .../optionality/src/Generated/PlainDate.cs | 2 +- .../optionality/src/Generated/PlainTime.cs | 2 +- .../src/Generated/RequiredAndOptional.cs | 2 +- .../optionality/src/Generated/String.cs | 2 +- .../src/Generated/StringLiteral.cs | 2 +- .../src/Generated/UnionFloatLiteral.cs | 2 +- .../src/Generated/UnionIntLiteral.cs | 2 +- .../src/Generated/UnionStringLiteral.cs | 2 +- .../value-types/src/Generated/Boolean.cs | 2 +- .../src/Generated/BooleanLiteral.cs | 2 +- .../value-types/src/Generated/Bytes.cs | 2 +- .../src/Generated/CollectionsInt.cs | 2 +- .../src/Generated/CollectionsModel.cs | 2 +- .../src/Generated/CollectionsString.cs | 2 +- .../value-types/src/Generated/Datetime.cs | 2 +- .../value-types/src/Generated/Decimal.cs | 2 +- .../value-types/src/Generated/Decimal128.cs | 2 +- .../src/Generated/DictionaryString.cs | 2 +- .../value-types/src/Generated/Duration.cs | 2 +- .../value-types/src/Generated/Enum.cs | 2 +- .../src/Generated/ExtensibleEnum.cs | 2 +- .../value-types/src/Generated/Float.cs | 2 +- .../value-types/src/Generated/FloatLiteral.cs | 2 +- .../property/value-types/src/Generated/Int.cs | 2 +- .../value-types/src/Generated/IntLiteral.cs | 2 +- .../value-types/src/Generated/Model.cs | 2 +- .../value-types/src/Generated/Never.cs | 2 +- .../value-types/src/Generated/String.cs | 2 +- .../src/Generated/StringLiteral.cs | 2 +- .../src/Generated/UnionEnumValue.cs | 2 +- .../src/Generated/UnionFloatLiteral.cs | 2 +- .../src/Generated/UnionIntLiteral.cs | 2 +- .../src/Generated/UnionStringLiteral.cs | 2 +- .../value-types/src/Generated/UnknownArray.cs | 2 +- .../value-types/src/Generated/UnknownDict.cs | 2 +- .../value-types/src/Generated/UnknownInt.cs | 2 +- .../src/Generated/UnknownString.cs | 2 +- .../http/type/scalar/src/Generated/Boolean.cs | 2 +- .../scalar/src/Generated/Decimal128Type.cs | 2 +- .../scalar/src/Generated/Decimal128Verify.cs | 2 +- .../type/scalar/src/Generated/DecimalType.cs | 2 +- .../scalar/src/Generated/DecimalVerify.cs | 2 +- .../http/type/scalar/src/Generated/String.cs | 2 +- .../http/type/scalar/src/Generated/Unknown.cs | 2 +- .../src/Generated/CustomDiscriminator.cs | 2 +- .../CustomDiscriminatorOperations.cs | 2 +- .../src/Generated/EnumDiscriminator.cs | 2 +- .../Generated/EnumDiscriminatorOperations.cs | 2 +- .../src/Generated/ExplicitDiscriminator.cs | 2 +- .../ExplicitDiscriminatorOperations.cs | 2 +- .../src/Generated/InjectedDiscriminator.cs | 2 +- .../InjectedDiscriminatorOperations.cs | 2 +- .../extends/src/Generated/Recursive.cs | 2 +- .../type/union/src/Generated/EnumsOnly.cs | 2 +- .../type/union/src/Generated/FloatsOnly.cs | 2 +- .../http/type/union/src/Generated/IntsOnly.cs | 2 +- .../type/union/src/Generated/MixedLiterals.cs | 2 +- .../type/union/src/Generated/MixedTypes.cs | 2 +- .../type/union/src/Generated/ModelsOnly.cs | 2 +- .../union/src/Generated/StringAndArray.cs | 2 +- .../union/src/Generated/StringExtensible.cs | 2 +- .../src/Generated/StringExtensibleNamed.cs | 2 +- .../type/union/src/Generated/StringsOnly.cs | 2 +- .../added/v2/src/Generated/InterfaceV2.cs | 2 +- .../removed/v1/src/Generated/InterfaceV1.cs | 2 +- .../v2Preview/src/Generated/InterfaceV1.cs | 2 +- .../v1/src/Generated/OldInterface.cs | 2 +- .../v2/src/Generated/NewInterface.cs | 2 +- 492 files changed, 6202 insertions(+), 3422 deletions(-) create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.ModelProxies.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.ModelProxies.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateShouldReadThroughProxyMethod(Cache).cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateToWireOptionsMethod.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateToXmlOptionsMethod.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/MrwSerializationTypeDefinitionTests/ModelProxyConversionsTakeClientOptions(Json).cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/MrwSerializationTypeDefinitionTests/ModelProxyConversionsTakeClientOptions(Json,Xml).cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/MrwSerializationTypeDefinitionTests/ModelProxyConversionsTakeClientOptions(Xml).cs rename packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/{XmlDeserializationMethodRoutesDualFormatNestedModelOnlyForXmlFormat.cs => XmlDeserializationMethodReadsDualFormatNestedModelWithXmlOptions.cs} (83%) create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Json,Xml,json).cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Json,Xml,xml).cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Json,json).cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Xml,xml).cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestHelpers/ClientPipelineWithoutModelProxies.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.cs diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/Abstractions/ClientPipelineApi.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/Abstractions/ClientPipelineApi.cs index c06c53292a0..2d307e860d9 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/Abstractions/ClientPipelineApi.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/Abstractions/ClientPipelineApi.cs @@ -37,6 +37,19 @@ public abstract MethodBodyStatement[] CreateMessage( public abstract ValueExpression KeyAuthorizationPolicy(ValueExpression credential, ValueExpression headerName, ValueExpression? keyPrefix = null); public abstract ValueExpression TokenAuthorizationPolicy(ValueExpression credential, ValueExpression scopes); public virtual ValueExpression? UserAgentPolicy(CSharpType clientType) => null; + + /// + /// Gets the model proxies configured on the client options, or null when the client options don't carry + /// model proxies. Generated clients add these proxies to the ModelReaderWriterOptions they use to read and + /// write models in their operations. + /// + /// The client options expression. + public virtual ValueExpression? GetModelProxies(ValueExpression clientOptions) => null; + + /// + /// Gets whether generated clients route model reads and writes through the proxies configured on their options. + /// + public bool SupportsModelProxies => GetModelProxies(Empty) is not null; public abstract ClientPipelineApi FromExpression(ValueExpression expression); public abstract ClientPipelineApi ToExpression(); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientPipelineProvider.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientPipelineProvider.cs index 6a93b77942e..c0d41e664bb 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientPipelineProvider.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientPipelineProvider.cs @@ -33,6 +33,9 @@ public ClientPipelineProvider(ValueExpression original) : base(typeof(ClientPipe public override ValueExpression Create(ValueExpression options, ValueExpression perRetryPolicies) => Static().Invoke(nameof(ClientPipeline.Create), [options, New.Array(ScmCodeModelGenerator.Instance.TypeFactory.ClientPipelineApi.PipelinePolicyType), perRetryPolicies, New.Array(ScmCodeModelGenerator.Instance.TypeFactory.ClientPipelineApi.PipelinePolicyType)]).As(); + public override ValueExpression? GetModelProxies(ValueExpression clientOptions) + => clientOptions.Property(nameof(ClientPipelineOptions.ModelProxies)); + public override MethodBodyStatement[] CreateMessage( HttpRequestOptionsApi requestOptions, ValueExpression uri, diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientProvider.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientProvider.cs index 391b2bbe5ff..7e1ab51e9e9 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientProvider.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientProvider.cs @@ -10,6 +10,7 @@ using System.Linq; using System.Threading; using Microsoft.TypeSpec.Generator.ClientModel.Primitives; +using Microsoft.TypeSpec.Generator.ClientModel.Snippets; using Microsoft.TypeSpec.Generator.ClientModel.Utilities; using Microsoft.TypeSpec.Generator.EmitterRpc; using Microsoft.TypeSpec.Generator.Expressions; @@ -41,6 +42,7 @@ private record ApiVersionFields(FieldProvider Field, PropertyProvider? Correspon private const string TokenProviderFieldName = "_tokenProvider"; private const string TokenCredentialFieldName = "_tokenCredential"; private const string EndpointFieldName = "_endpoint"; + private const string ModelReaderWriterOptionsFieldName = "_modelReaderWriterOptions"; private const string CredentialParamName = "credential"; private const string SettingsParamName = "settings"; private const string ClientSuffix = "Client"; @@ -182,6 +184,16 @@ public ClientProvider(InputClient inputClient) typeof(Uri), EndpointFieldName, this); + // Clients created through the mocking constructor skip the constructors that copy the client options' proxies, + // so the field starts with the shared wire options to keep their convenience methods working. + ModelReaderWriterOptionsField = ValueExpression.Empty.ToApi().SupportsModelProxies + ? new FieldProvider( + FieldModifiers.Private | FieldModifiers.ReadOnly, + typeof(ModelReaderWriterOptions), + ModelReaderWriterOptionsFieldName, + this, + initializationValue: ModelSerializationExtensionsSnippets.Wire) + : null; PipelineProperty = new( description: $"The HTTP pipeline for sending and receiving REST requests and responses.", modifiers: MethodSignatureModifiers.Public, @@ -515,6 +527,12 @@ private IReadOnlyList GetSubClientInternalConstructorParamete PipelineProperty.AsParameter }; + // The parent passes the options it built from its client options so subclient operations use the same proxies. + if (ModelReaderWriterOptionsField != null) + { + subClientParameters.Add(ModelReaderWriterOptionsField.AsParameter); + } + // Auth credentials are NOT included here — the parent passes its authenticated // pipeline, so the sub-client doesn't need separate credential parameters. subClientParameters.Add(_subClientEndpointParameter); @@ -624,6 +642,12 @@ private IReadOnlyList GetClientParameters() public PropertyProvider PipelineProperty { get; } public FieldProvider EndpointField { get; } + /// + /// Gets the field holding the the client uses to read and write models, or + /// null when the client pipeline options don't carry model proxies. + /// + public FieldProvider? ModelReaderWriterOptionsField { get; } + public IReadOnlyList SubClients => _subClients.Value; protected override string BuildRelativeFilePath() => Path.Combine("src", "Generated", $"{Name}.cs"); @@ -750,6 +774,11 @@ protected override FieldProvider[] BuildFields() { List fields = [EndpointField]; + if (ModelReaderWriterOptionsField != null) + { + fields.Add(ModelReaderWriterOptionsField); + } + if (_apiKeyAuthFields != null) { // No longer add AuthField (_keyCredential) — auth is handled via AuthenticationPolicy parameter in the internal constructor @@ -1361,6 +1390,13 @@ private MethodBodyStatement[] BuildPrimaryConstructorBody(IReadOnlyList().Create(clientOptionsParameter, perRetryPolicies)).Terminate()); } + // Creating the pipeline freezes the client options, so the proxies copied here can't change afterwards. + if (ModelReaderWriterOptionsField != null && + This.ToApi().GetModelProxies(clientOptionsParameter) is { } modelProxies) + { + body.Add(ModelReaderWriterOptionsField.Assign(ModelSerializationExtensionsSnippets.ToWireOptions(modelProxies)).Terminate()); + } + foreach (var f in Fields) { var fieldInfo = _apiVersionFields?.FirstOrDefault(fieldInfo => fieldInfo.Field == f); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/CollectionResultDefinition.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/CollectionResultDefinition.cs index 5b636e56dc5..cb3e17d6a45 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/CollectionResultDefinition.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/CollectionResultDefinition.cs @@ -29,6 +29,12 @@ public class CollectionResultDefinition : TypeProvider protected ClientProvider Client { get; } protected FieldProvider ClientField { get; } + /// + /// Gets the field holding the client's , or null when the client + /// doesn't carry model proxies. + /// + protected FieldProvider? ModelReaderWriterOptionsField { get; } + protected InputOperation Operation { get; } protected InputPagingServiceMetadata Paging { get; } @@ -76,6 +82,13 @@ public CollectionResultDefinition(ClientProvider client, InputPagingServiceMetho Client.Type, "_client", this); + ModelReaderWriterOptionsField = Client.ModelReaderWriterOptionsField != null + ? new FieldProvider( + FieldModifiers.Private | FieldModifiers.ReadOnly, + typeof(ModelReaderWriterOptions), + "_modelReaderWriterOptions", + this) + : null; Operation = serviceMethod.Operation; Paging = serviceMethod.PagingMetadata; IsAsync = isAsync; @@ -237,7 +250,10 @@ protected override IReadOnlyList BuildBodyDependencyTypes() return dependencies; } - protected override FieldProvider[] BuildFields() => [ClientField, .. RequestFields]; + protected override FieldProvider[] BuildFields() + => ModelReaderWriterOptionsField != null + ? [ClientField, ModelReaderWriterOptionsField, .. RequestFields] + : [ClientField, .. RequestFields]; protected override CSharpType[] BuildImplements() => (_modelType: ItemModelType, IsAsync) switch @@ -254,6 +270,12 @@ protected override ConstructorProvider[] BuildConstructors() "client", $"The {Client.Type.Name} client used to send requests.", Client.Type); + var modelReaderWriterOptionsParameter = ModelReaderWriterOptionsField != null + ? new ParameterProvider( + "modelReaderWriterOptions", + $"The options used to read the pages, including the model proxies configured on the client options.", + typeof(ModelReaderWriterOptions)) + : null; return [ new ConstructorProvider( @@ -261,30 +283,39 @@ protected override ConstructorProvider[] BuildConstructors() Type, $"Initializes a new instance of {Name}, which is used to iterate over the pages of a collection.", MethodSignatureModifiers.Public, - [ - clientParameter, - .. CreateRequestParameters - ]), - BuildConstructorBody(clientParameter), + modelReaderWriterOptionsParameter != null + ? [clientParameter, modelReaderWriterOptionsParameter, .. CreateRequestParameters] + : [clientParameter, .. CreateRequestParameters]), + BuildConstructorBody(clientParameter, modelReaderWriterOptionsParameter), this) ]; } private ValueExpression GetPropertyExpression(IReadOnlyList segments, ValueExpression response) { - return BuildGetPropertyExpression(segments, response.CastTo(ResponseModelType)); + return BuildGetPropertyExpression(segments, ToResponseModel(response)); } + // The cast operator can't take the client's options, so it would skip the configured model proxies. + private ValueExpression ToResponseModel(ValueExpression response) + => ModelReaderWriterOptionsField != null && MrwSerializationTypeDefinition.HasResponseConversion(ResponseModelType) + ? Static(ResponseModelType).Invoke(MrwSerializationTypeDefinition.FromResponseMethodName, [response, ModelReaderWriterOptionsField]) + : response.CastTo(ResponseModelType); + protected ValueExpression BuildGetPropertyExpression(IReadOnlyList segments, ValueExpression responseModel) { return ResponseModel.GetPropertyExpression(responseModel, segments); } - private MethodBodyStatement[] BuildConstructorBody(ParameterProvider clientParameter) + private MethodBodyStatement[] BuildConstructorBody(ParameterProvider clientParameter, ParameterProvider? modelReaderWriterOptionsParameter) { - var statements = new List(CreateRequestParameters.Count + 1); + var statements = new List(CreateRequestParameters.Count + 2); statements.Add(ClientField.Assign(clientParameter).Terminate()); + if (ModelReaderWriterOptionsField != null && modelReaderWriterOptionsParameter != null) + { + statements.Add(ModelReaderWriterOptionsField.Assign(modelReaderWriterOptionsParameter).Terminate()); + } for (int parameterNumber = 0; parameterNumber < CreateRequestParameters.Count; parameterNumber++) { @@ -502,7 +533,7 @@ private MethodBodyStatement[] BuildGetRawPagesForNextLink() MethodBodyStatement.EmptyLine, // Assign nextLinkUri from the result and check if it is null - AssignAndCheckNextPageVariable(result, result.CastTo(ResponseModelType), nextPageVariable), + AssignAndCheckNextPageVariable(result, ToResponseModel(result), nextPageVariable), // Update message for next iteration message.Assign(InvokeCreateRequestForNextLink(nextPageVariable)).Terminate() @@ -537,7 +568,7 @@ private MethodBodyStatement[] BuildGetRawPagesForContinuationToken() MethodBodyStatement.EmptyLine, // Assign nextLinkUri from the result and check if it is null - AssignAndCheckNextPageVariable(result, result.CastTo(ResponseModelType), nextTokenVariable), + AssignAndCheckNextPageVariable(result, ToResponseModel(result), nextTokenVariable), // Update message for next iteration message.Assign(InvokeCreateRequestForContinuationToken(nextTokenVariable)).Terminate() diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.ModelProxies.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.ModelProxies.cs new file mode 100644 index 00000000000..2a81b083a94 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.ModelProxies.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel.Primitives; +using System.Collections.Generic; +using Microsoft.TypeSpec.Generator.ClientModel.Snippets; +using Microsoft.TypeSpec.Generator.Expressions; +using Microsoft.TypeSpec.Generator.Primitives; +using Microsoft.TypeSpec.Generator.Providers; +using Microsoft.TypeSpec.Generator.Snippets; +using Microsoft.TypeSpec.Generator.Statements; +using static Microsoft.TypeSpec.Generator.Snippets.Snippet; + +namespace Microsoft.TypeSpec.Generator.ClientModel.Providers +{ + public sealed partial class ModelSerializationExtensionsDefinition + { + private const string IsBuildableMethodName = "IsBuildable"; + internal const string ToWireOptionsMethodName = "ToWireOptions"; + + private ProxyReadEligibilityDefinition? _proxyReadEligibility; + private ProxyReadEligibilityDefinition ProxyReadEligibility => _proxyReadEligibility ??= new(this, _t); + + protected override TypeProvider[] BuildNestedTypes() => [ProxyReadEligibility]; + + private MethodProvider[] BuildModelProxyMethods() + { + MethodProvider shouldReadThroughProxy = BuildShouldReadThroughProxyMethodProvider(); + return ValueExpression.Empty.ToApi().SupportsModelProxies + ? [shouldReadThroughProxy, BuildToWireOptionsMethodProvider()] + : [shouldReadThroughProxy]; + } + + // Clients keep the shared wire options when no proxies are configured so model reads and writes keep their fast paths. + private MethodProvider BuildToWireOptionsMethodProvider() + { + var modelProxiesParameter = new ParameterProvider("modelProxies", FormattableStringHelpers.Empty, typeof(IList)); + var signature = new MethodSignature( + Name: ToWireOptionsMethodName, + Modifiers: _methodModifiers, + Parameters: [modelProxiesParameter], + ReturnType: typeof(ModelReaderWriterOptions), + Description: null, + ReturnDescription: null); + + var body = new MethodBodyStatement[] + { + new IfStatement(modelProxiesParameter.Property(nameof(ICollection.Count)).Equal(Int(0))) + { + Return(WireOptionsField) + }, + Declare("options", typeof(ModelReaderWriterOptions), New.Instance(typeof(ModelReaderWriterOptions), ModelReaderWriterOptionsSnippets.WireFormat), out var options), + new ForEachStatement(typeof(ModelProxy), "proxy", modelProxiesParameter, false, out var proxy) + { + options.Property(nameof(ModelReaderWriterOptions.Proxies)).Invoke(nameof(IList.Add), proxy).Terminate() + }, + Return(options) + }; + + return new MethodProvider(signature, body, this, XmlDocProvider.Empty); + } + + // ShouldReadThroughProxy(this ModelReaderWriterOptions options, ModelReaderWriterContext context) + // => options.Proxies.Count > 0 && ProxyReadEligibility.IsBuildable(context); + private MethodProvider BuildShouldReadThroughProxyMethodProvider() + { + var optionsParameter = new ParameterProvider("options", FormattableStringHelpers.Empty, typeof(ModelReaderWriterOptions)); + var contextParameter = new ParameterProvider("context", FormattableStringHelpers.Empty, typeof(ModelReaderWriterContext)); + var signature = new MethodSignature( + Name: ModelSerializationExtensionsSnippets.ShouldReadThroughProxyMethodName, + Modifiers: _methodModifiers, + Parameters: [optionsParameter, contextParameter], + ReturnType: typeof(bool), + Description: null, + ReturnDescription: null, + GenericArguments: [_t]); + + var isBuildable = Static(ProxyReadEligibility.Type).Invoke(IsBuildableMethodName, [contextParameter]); + var body = Return(optionsParameter.As().ProxiesCount().GreaterThan(Int(0)).And(isBuildable)); + + return new MethodProvider(signature, body, this, XmlDocProvider.Empty); + } + + /// + /// Caches, per model type, whether the generated can build the type so + /// nested reads don't repeat the context lookup. Generated code only passes the library's own context, so the + /// result for a type never changes. + /// + private sealed class ProxyReadEligibilityDefinition : TypeProvider + { + private readonly ModelSerializationExtensionsDefinition _declaringType; + private readonly CSharpType _t; + private readonly FieldProvider _stateField; + + public ProxyReadEligibilityDefinition(ModelSerializationExtensionsDefinition declaringType, CSharpType t) + { + _declaringType = declaringType; + _t = t; + // 0 = unknown, 1 = buildable, 2 = not buildable. An int keeps the cached value tear-free. + _stateField = new FieldProvider(FieldModifiers.Private | FieldModifiers.Static, typeof(int), "s_state", this); + } + + protected override TypeProvider? BuildDeclaringTypeProvider() => _declaringType; + + protected override string BuildRelativeFilePath() => _declaringType.RelativeFilePath; + + protected override string BuildName() => "ProxyReadEligibility"; + + protected override TypeSignatureModifiers BuildDeclarationModifiers() + => TypeSignatureModifiers.Private | TypeSignatureModifiers.Static | TypeSignatureModifiers.Class; + + protected override CSharpType[] GetTypeArguments() => [_t]; + + protected override FieldProvider[] BuildFields() => [_stateField]; + + protected override MethodProvider[] BuildMethods() + { + var contextParameter = new ParameterProvider("context", FormattableStringHelpers.Empty, typeof(ModelReaderWriterContext)); + var signature = new MethodSignature( + Name: IsBuildableMethodName, + Modifiers: MethodSignatureModifiers.Public | MethodSignatureModifiers.Static, + Parameters: [contextParameter], + ReturnType: typeof(bool), + Description: null, + ReturnDescription: null); + + var tryGetTypeBuilder = contextParameter.Invoke( + nameof(ModelReaderWriterContext.TryGetTypeBuilder), + [TypeOf(_t), Identifier("_").AsArgument(isOut: true)]); + var body = new MethodBodyStatement[] + { + Declare("state", typeof(int), _stateField, out var state), + new IfStatement(state.Equal(Int(0))) + { + state.Assign(new TernaryConditionalExpression(tryGetTypeBuilder, Int(1), Int(2))).Terminate(), + _stateField.Assign(state).Terminate() + }, + Return(state.Equal(Int(1))) + }; + + return [new MethodProvider(signature, body, this, XmlDocProvider.Empty)]; + } + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.Xml.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.Xml.cs index 10af656e8df..e97bcd31e65 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.Xml.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.Xml.cs @@ -56,6 +56,7 @@ private MethodProvider[] BuildXmlExtensionMethods() BuildXmlGetTimeSpanMethodProvider(), BuildXmlGetBytesFromBase64MethodProvider(), BuildXmlGetUtf8BytesMethodProvider(), + BuildToXmlOptionsMethodProvider(), BuildXmlWriteStringValueDateTimeOffsetMethodProvider(), BuildXmlWriteStringValueTimeSpanMethodProvider(), BuildXmlWriteBase64StringValueMethodProvider(), @@ -81,6 +82,37 @@ private MethodProvider BuildXmlGetUtf8BytesMethodProvider() return new MethodProvider(signature, body, this, XmlDocProvider.Empty); } + // A model that also supports JSON reports "J" for the wire format. When an XML-only parent reads it with "W", + // its proxy-aware read must request XML explicitly while keeping the registered proxies. + private MethodProvider BuildToXmlOptionsMethodProvider() + { + var optionsParameter = new ParameterProvider("options", FormattableStringHelpers.Empty, typeof(ModelReaderWriterOptions)); + var signature = new MethodSignature( + Name: ModelSerializationExtensionsSnippets.ToXmlOptionsMethodName, + Modifiers: _methodModifiers, + Parameters: [optionsParameter], + ReturnType: typeof(ModelReaderWriterOptions), + Description: null, + ReturnDescription: null); + + var options = optionsParameter.As(); + var body = new MethodBodyStatement[] + { + new IfStatement(options.Format().Equal(ModelReaderWriterOptionsSnippets.XmlFormat)) + { + Return(options) + }, + Declare("xmlOptions", typeof(ModelReaderWriterOptions), New.Instance(typeof(ModelReaderWriterOptions), ModelReaderWriterOptionsSnippets.XmlFormat), out var xmlOptions), + new ForEachStatement(typeof(ModelProxy), "proxy", options.Property(nameof(ModelReaderWriterOptions.Proxies)), false, out var proxy) + { + xmlOptions.Property(nameof(ModelReaderWriterOptions.Proxies)).Invoke(nameof(IList.Add), proxy).Terminate() + }, + Return(xmlOptions) + }; + + return new MethodProvider(signature, body, this, XmlDocProvider.Empty); + } + private MethodProvider BuildXmlGetDateTimeOffsetMethodProvider() { var signature = new MethodSignature( diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.cs index 551f57ca7c3..fb1c921634b 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.cs @@ -191,7 +191,7 @@ protected override MethodProvider[] BuildMethods() BuildWriteObjectValueMethodGeneric(), BuildWriteObjectValueMethodProvider(), BuildGetUtf8BytesMethodProvider(), - BuildShouldReadThroughProxyMethodProvider(), + .. BuildModelProxyMethods(), .. BuildDynamicModelHelpers(), .. BuildXmlExtensionMethods(), ]; @@ -957,28 +957,6 @@ private MethodProvider BuildGetUtf8BytesMethodProvider() return new MethodProvider(signature, body, this, XmlDocProvider.Empty); } - private MethodProvider BuildShouldReadThroughProxyMethodProvider() - { - var optionsParameter = new ParameterProvider("options", FormattableStringHelpers.Empty, typeof(ModelReaderWriterOptions)); - var modelTypeParameter = new ParameterProvider("modelType", FormattableStringHelpers.Empty, typeof(Type)); - var contextParameter = new ParameterProvider("context", FormattableStringHelpers.Empty, typeof(ModelReaderWriterContext)); - var signature = new MethodSignature( - Name: ModelSerializationExtensionsSnippets.ShouldReadThroughProxyMethodName, - Modifiers: _methodModifiers, - Parameters: [optionsParameter, modelTypeParameter, contextParameter], - ReturnType: typeof(bool), - Description: null, - ReturnDescription: null); - - // Nested models can only be read through ModelReaderWriter when the context can build them. - var canBuildModel = contextParameter.Invoke( - nameof(ModelReaderWriterContext.TryGetTypeBuilder), - [modelTypeParameter, Identifier("_").AsArgument(isOut: true)]); - var body = Return(optionsParameter.As().ProxiesCount().GreaterThan(Int(0)).And(canBuildModel)); - - return new MethodProvider(signature, body, this, XmlDocProvider.Empty); - } - private MethodProvider BuildTryGetIndexMethodProvider() { var indexSliceParameter = diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.ModelProxies.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.ModelProxies.cs new file mode 100644 index 00000000000..3b138c479dc --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.ModelProxies.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.Json; +using Microsoft.TypeSpec.Generator.ClientModel.Primitives; +using Microsoft.TypeSpec.Generator.ClientModel.Snippets; +using Microsoft.TypeSpec.Generator.Expressions; +using Microsoft.TypeSpec.Generator.Primitives; +using Microsoft.TypeSpec.Generator.Providers; +using Microsoft.TypeSpec.Generator.Snippets; +using Microsoft.TypeSpec.Generator.Statements; +using static Microsoft.TypeSpec.Generator.Snippets.Snippet; + +namespace Microsoft.TypeSpec.Generator.ClientModel.Providers +{ + /// + /// Conversions that generated clients use instead of the cast operators so that the model proxies configured on the + /// client options apply to request bodies and responses. The cast operators can't take the client's options. + /// + public partial class MrwSerializationTypeDefinition + { + internal static string ToRequestContentMethodName + => $"To{ScmCodeModelGenerator.Instance.TypeFactory.RequestContentApi.RequestContentType.Name}"; + + internal static string FromResponseMethodName + => $"From{ScmCodeModelGenerator.Instance.TypeFactory.ClientResponseApi.ClientResponseType.Name}"; + + internal static bool HasRequestContentConversion(CSharpType type) + => GetModelSerialization(type)?.GeneratesRequestContentConversion == true; + + internal static bool HasResponseConversion(CSharpType type) + => GetModelSerialization(type)?.GeneratesResponseConversion == true; + + private static MrwSerializationTypeDefinition? GetModelSerialization(CSharpType type) + { + if (!ValueExpression.Empty.ToApi().SupportsModelProxies + || !ScmCodeModelGenerator.Instance.TypeFactory.CSharpTypeMap.TryGetValue(type, out var provider) + || provider is not ModelProvider || provider is SystemObjectModelProvider) + { + return null; + } + + return provider.SerializationProviders.OfType().FirstOrDefault(); + } + + private bool GeneratesRequestContentConversion + => !_inputModel.IsUnknownDiscriminatorModel && ScmCodeModelGenerator.Instance.TypeFactory.RootInputModels.Contains(_inputModel); + + private bool GeneratesResponseConversion + => !_inputModel.IsUnknownDiscriminatorModel && ScmCodeModelGenerator.Instance.TypeFactory.RootOutputModels.Contains(_inputModel); + + // internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) => BinaryContent.Create(this, options); + private MethodProvider BuildToRequestContentWithOptionsMethod() + { + var requestContentType = ScmCodeModelGenerator.Instance.TypeFactory.RequestContentApi.RequestContentType; + var optionsParameter = new ParameterProvider( + "options", + $"The options used to write the model, including the registered model proxies.", + typeof(ModelReaderWriterOptions)); + var modifiers = MethodSignatureModifiers.Internal; + if (AnyBaseModelSerialization(serialization => serialization.GeneratesRequestContentConversion)) + { + modifiers |= MethodSignatureModifiers.New; + } + + return new MethodProvider( + new MethodSignature( + ToRequestContentMethodName, + FormattableStringHelpers.FromString($"Converts the model to {requestContentType.Name} using the specified options."), + modifiers, + requestContentType, + null, + [optionsParameter]), + Return(RequestContentApiSnippets.Create(This, optionsParameter.As())), + this); + } + + // internal static T FromClientResult(ClientResult result, ModelReaderWriterOptions options) + // Reads through ModelReaderWriter when proxies apply; otherwise it matches the explicit cast operator, but passes + // the options to the deserializer so nested models still honor the proxies. + private MethodProvider GetFromClientResultWithOptionsMethod(bool supportsJson, bool supportsXml) + { + var clientResponseApi = ScmCodeModelGenerator.Instance.TypeFactory.ClientResponseApi; + var result = new ParameterProvider( + clientResponseApi.ResponseParameterName, + $"The {clientResponseApi.ClientResponseType:C} to deserialize the {Type:C} from.", + clientResponseApi.ClientResponseType); + var optionsParameter = new ParameterProvider( + "options", + $"The options used to read the model, including the registered model proxies.", + typeof(ModelReaderWriterOptions)); + var options = optionsParameter.As(); + + var modifiers = MethodSignatureModifiers.Internal | MethodSignatureModifiers.Static; + if (AnyBaseModelSerialization(serialization => serialization.GeneratesResponseConversion)) + { + modifiers |= MethodSignatureModifiers.New; + } + + // PipelineResponse response = result.GetRawResponse(); + var response = result.ToApi(); + var httpResponse = result.ToApi(); + MethodBodyStatement responseDeclaration = MethodBodyStatement.Empty; + if (response.Original != response.GetRawResponse().Original) + { + responseDeclaration = Declare("response", ScmCodeModelGenerator.Instance.TypeFactory.HttpResponseApi.HttpResponseType, response.GetRawResponse(), out var responseVar); + response = responseVar.ToApi(); + httpResponse = responseVar.ToApi(); + } + var content = response.Property(nameof(HttpResponseApi.Content)).As(); + + MethodBodyStatement[] body; + if (supportsJson && supportsXml) + { + var isJson = httpResponse.TryGetHeader(ContentTypeHeader, out var contentType) + .And(contentType!.StartsWith(Literal("application/json"), StringComparison.OrdinalIgnoreCase)); + body = + [ + responseDeclaration, + MethodBodyStatement.EmptyLine, + new IfStatement(isJson) { BuildJsonFromClientResultBody(content, options) }, + MethodBodyStatement.EmptyLine, + .. BuildXmlFromClientResultBody(response, content, options, options.ToXmlOptions()) + ]; + } + else if (supportsXml) + { + body = [responseDeclaration, .. BuildXmlFromClientResultBody(response, content, options, options)]; + } + else + { + body = [responseDeclaration, .. BuildJsonFromClientResultBody(content, options)]; + } + + return new MethodProvider( + new MethodSignature(FromResponseMethodName, null, modifiers, Type, null, [result, optionsParameter]), + body, + this); + } + + private MethodBodyStatement[] BuildJsonFromClientResultBody(ScopedApi content, ScopedApi options) + { + if (_model is ScmModelProvider { IsDynamicModel: true }) + { + return + [ + ReadThroughProxy(content, options, options), + Declare("data", typeof(BinaryData), content, out var data), + UsingDeclare("document", typeof(JsonDocument), data.As().Parse(ModelSerializationExtensionsSnippets.JsonDocumentOptions), out var dynamicDocument), + Return(GetDeserializationMethodInvocationForType(_model, dynamicDocument.As().RootElement(), data, options)) + ]; + } + + return + [ + ReadThroughProxy(content, options, options), + UsingDeclare("document", typeof(JsonDocument), content.Parse(ModelSerializationExtensionsSnippets.JsonDocumentOptions), out var document), + Return(GetDeserializationMethodInvocationForType(_model, document.As().RootElement(), null, options)) + ]; + } + + private MethodBodyStatement[] BuildXmlFromClientResultBody( + ClientResponseApi response, + ScopedApi content, + ScopedApi options, + ScopedApi readOptions) + => + [ + ReadThroughProxy(content, options, readOptions), + UsingDeclare("stream", typeof(Stream), response.Property(nameof(HttpResponseApi.ContentStream)), out var stream), + new IfStatement(stream.Equal(Null)) { Return(Default) }, + MethodBodyStatement.EmptyLine, + Return(GetDeserializationMethodInvocationForType(_model, XElementSnippets.Load(stream.As(), XmlLinqSnippets.PreserveWhitespace), null, options)) + ]; + + // if (options.ShouldReadThroughProxy(Context.Default)) { return ModelReaderWriter.Read(content, readOptions, Context.Default); } + private MethodBodyStatement ReadThroughProxy( + ScopedApi content, + ScopedApi options, + ScopedApi readOptions) + => new IfStatement(options.ShouldReadThroughProxy(Type)) + { + Return(ModelReaderWriterSnippets.Read(Type, content, readOptions)) + }; + + // A derived model's conversion has the same parameters as its base model's, so it must hide it explicitly. + private bool AnyBaseModelSerialization(Func predicate) + { + var visited = new HashSet(); + for (var baseModel = _model.BaseModelProvider; baseModel != null && visited.Add(baseModel); baseModel = baseModel.BaseModelProvider) + { + if (baseModel.SerializationProviders.OfType().Any(predicate)) + { + return true; + } + } + + return false; + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.Xml.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.Xml.cs index 83731c67e4d..1615fcf1e02 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.Xml.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.Xml.cs @@ -1119,10 +1119,10 @@ internal static ValueExpression DeserializeXmlValueCore( /// /// XML counterpart of . A model that also supports JSON - /// reports "J" as its wire format, so it is only read through when XML is - /// requested explicitly; otherwise the XML payload would be parsed as JSON. + /// reports "J" as its wire format, so its proxy-aware read requests XML explicitly; otherwise an XML-only parent + /// read with "W" would parse the child's XML payload as JSON. /// - private static ValueExpression GetProxyAwareXmlDeserializationMethodInvocation( + internal static ValueExpression GetProxyAwareXmlDeserializationMethodInvocation( CSharpType valueType, ScopedApi element, ScopedApi options) @@ -1134,15 +1134,11 @@ private static ValueExpression GetProxyAwareXmlDeserializationMethodInvocation( } var modelType = valueType.WithNullable(false); - var shouldReadThroughProxy = options.ShouldReadThroughProxy(modelType); - if (serialization.SupportsJson) - { - shouldReadThroughProxy = options.Format().Equal(ModelReaderWriterOptionsSnippets.XmlFormat).And(shouldReadThroughProxy); - } + var readOptions = serialization.SupportsJson ? options.ToXmlOptions() : options; return new TernaryConditionalExpression( - shouldReadThroughProxy, - ModelReaderWriterSnippets.Read(modelType, element.GetUtf8Bytes(), options), + options.ShouldReadThroughProxy(modelType), + ModelReaderWriterSnippets.Read(modelType, element.GetUtf8Bytes(), readOptions), deserialize); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs index 4670072444d..21468928dda 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs @@ -456,12 +456,19 @@ protected override MethodProvider[] BuildMethods() if (!_inputModel.IsUnknownDiscriminatorModel) { + bool supportsModelProxies = ValueExpression.Empty.ToApi().SupportsModelProxies; + // cast operators if (ScmCodeModelGenerator.Instance.TypeFactory.RootInputModels.Contains(_inputModel)) { methods.Add(BuildImplicitToBinaryContent()); + if (supportsModelProxies) + { + // Clients pass the options built from their configured model proxies. + methods.Add(BuildToRequestContentWithOptionsMethod()); + } // Add internal ToBinaryContent helper for format-specific serialization - if (_supportsJson && _supportsXml) + else if (_supportsJson && _supportsXml) { methods.Add(BuildToBinaryContentMethod()); } @@ -470,6 +477,10 @@ protected override MethodProvider[] BuildMethods() if (ScmCodeModelGenerator.Instance.TypeFactory.RootOutputModels.Contains(_inputModel)) { methods.Add(GetExplicitFromClientResultMethod(_supportsJson, _supportsXml)); + if (supportsModelProxies) + { + methods.Add(GetFromClientResultWithOptionsMethod(_supportsJson, _supportsXml)); + } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ScmMethodProviderCollection.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ScmMethodProviderCollection.cs index de8656fb70e..a90cc6e95c4 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ScmMethodProviderCollection.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ScmMethodProviderCollection.cs @@ -44,6 +44,16 @@ public class ScmMethodProviderCollection : IReadOnlyList private ScmMethodProvider? _legacyAsyncProtocol; private ClientProvider Client { get; } + + // The client's options carry the model proxies configured on its client options. Clients whose pipeline options + // don't carry model proxies keep using the shared wire options. + private bool SupportsModelProxies => Client.ModelReaderWriterOptionsField != null; + private ScopedApi ClientModelReaderWriterOptions => + Client.ModelReaderWriterOptionsField?.As() ?? ModelSerializationExtensionsSnippets.Wire; + + // Paging collections read their pages with the client's options, which follow the client argument. + private ValueExpression[] PagingCollectionOptionsArguments => + Client.ModelReaderWriterOptionsField is { } optionsField ? [optionsField] : []; protected InputServiceMethod ServiceMethod { get; } protected TypeProvider EnclosingType { get; } public IReadOnlyList MethodProviders => _methods ??= BuildMethods(); @@ -551,7 +561,7 @@ [.. GetMethodArguments(protocolMethod.Signature, paramDeclarations, convenienceB UsingDeclare("document", data.Parse(), out var document), DiscriminatedUnionSerialization.DeserializeValue( ServiceMethod.Response.Type!, responseBodyType.OutputType, document.RootElement(), - ModelSerializationExtensionsSnippets.Wire, out var value), + ClientModelReaderWriterOptions, out var value), Return(result.FromValue(value, result.GetRawResponse())) ]; } @@ -576,7 +586,7 @@ .. GetStackVariablesForReturnValueConversion(result, responseBodyType, isAsync, responseBodyType, jsonElement, data, - ScmCodeModelGenerator.Instance.ModelSerializationExtensionsDefinition.WireOptionsField.As(), + ClientModelReaderWriterOptions, SerializationFormat.Default), result.GetRawResponse())) }, @@ -634,7 +644,7 @@ private IEnumerable GetStackVariablesForProtocolParamConver // Serializes the body via Utf8JsonWriter to stay AOT/trim safe (avoids BinaryData.FromObjectAsJson, which trips IL2026/IL3050). void AddUtf8JsonContent(CSharpType serializationType, ValueExpression value, InputType? inputType = null) { - var options = ModelSerializationExtensionsSnippets.Wire; + var options = ClientModelReaderWriterOptions; var optionalBody = inputType != null && ServiceMethod.Operation.Parameters.OfType().FirstOrDefault() is { IsRequired: false }; ValueExpression initialization = optionalBody @@ -752,11 +762,16 @@ void AddUtf8JsonContent(CSharpType serializationType, ValueExpression value, Inp } } - if (TryGetFormatArgumentForDualFormatModel(bodyModel, bodyInputModel, out var format)) + if (TryGetFormatArgumentForDualFormatModel(bodyModel, bodyInputModel, out var format, out var isXml)) { // Create using declaration for BinaryContent var methodName = $"To{requestContentType.Name}"; - statements.Add(UsingDeclare("content", requestContentType, parameter.Invoke(methodName, format), out var content)); + // A dual-format model reports "J" for the wire format, so XML bodies request XML explicitly + // while keeping the proxies configured on the client options. + ValueExpression formatArgument = SupportsModelProxies + ? (isXml ? ClientModelReaderWriterOptions.ToXmlOptions() : ClientModelReaderWriterOptions) + : format; + statements.Add(UsingDeclare("content", requestContentType, parameter.Invoke(methodName, formatArgument), out var content)); declarations["content"] = content; } else if (bodyInputModel?.Usage.HasFlag(InputModelTypeUsage.MultipartFormData) == true) @@ -1011,11 +1026,13 @@ private List BuildXmlCollectionConversionForResult( rootElementVar.Elements(Literal(childName)), out ScopedApi item) .Add(arrayVar.As(listType).Add( - MrwSerializationTypeDefinition.GetDeserializationMethodInvocationForType( - elementType, - item, - null, - ModelSerializationExtensionsSnippets.Wire))), + SupportsModelProxies + ? MrwSerializationTypeDefinition.GetProxyAwareXmlDeserializationMethodInvocation(elementType, item, ClientModelReaderWriterOptions) + : MrwSerializationTypeDefinition.GetDeserializationMethodInvocationForType( + elementType, + item, + null, + ModelSerializationExtensionsSnippets.Wire))), defaultValue.Assign(arrayVar).Terminate() } }); @@ -1077,7 +1094,9 @@ private MethodBodyStatement GetElementConversion(CSharpType elementType, ScopedA { return AddElement( dictKey, - MrwSerializationTypeDefinition.GetDeserializationMethodInvocationForType(elementType, item, data, ModelSerializationExtensionsSnippets.Wire), + SupportsModelProxies + ? MrwSerializationTypeDefinition.GetProxyAwareDeserializationMethodInvocation(elementType, item, data, ClientModelReaderWriterOptions) + : MrwSerializationTypeDefinition.GetDeserializationMethodInvocationForType(elementType, item, data, ModelSerializationExtensionsSnippets.Wire), value); } } @@ -1211,6 +1230,13 @@ private ValueExpression GetResultConversion(ClientResponseApi result, HttpRespon { return response.Content().InvokeToString(); } + if (SupportsModelProxies && MrwSerializationTypeDefinition.HasResponseConversion(responseBodyType)) + { + // The cast operator can't take the client's options, so it would skip the configured model proxies. + return Static(responseBodyType.WithNullable(false)).Invoke( + MrwSerializationTypeDefinition.FromResponseMethodName, + [result, ClientModelReaderWriterOptions]); + } return result.CastTo(responseBodyType); } @@ -1622,7 +1648,7 @@ private IReadOnlyList GetMethodArguments( { if (!addedSpreadSource && declarations.TryGetValue("spread", out ValueExpression? spread)) { - AddArgument(protocolParam, spread); + AddArgument(protocolParam, ToRequestContent(spread, convenienceParam.SpreadSource.Type, isOptional: false)); addedSpreadSource = true; } } @@ -1653,8 +1679,8 @@ private IReadOnlyList GetMethodArguments( } else { - // Use implicit operator as fallback - AddArgument(protocolParam, convenienceParam); + // Use implicit operator as fallback, unless the client's options carry model proxies. + AddArgument(protocolParam, ToRequestContent(convenienceParam, convenienceParam.Type, isOptional: convenienceParam.DefaultValue != null)); } } } @@ -2104,6 +2130,7 @@ private IEnumerable GetPagingMethodBody( collection.Type, [ This, + .. PagingCollectionOptionsArguments, .. constructorArguments ])) ]; @@ -2113,6 +2140,7 @@ .. constructorArguments collection.Type, [ This, + .. PagingCollectionOptionsArguments, .. BuildCreateRequestArguments(createRequestSignature, parameters) ])); } @@ -2252,7 +2280,7 @@ private static CSharpType GetConvenienceStreamingItemType(InputStreamingType str : null; } - private static ValueExpression CreateStreamingResultExpression( + private ValueExpression CreateStreamingResultExpression( InputStreamingType streamingType, ValueExpression response, ValueExpression? cancellationToken, @@ -2270,7 +2298,7 @@ private static ValueExpression CreateStreamingResultExpression( payloadType, streamingType, "Unable to resolve SSE stream item type."); - var parser = CreateSseParser(payloadCSharpType); + var parser = CreateSseParser(payloadCSharpType, ClientModelReaderWriterOptions); var arguments = cancellationToken != null ? new ValueExpression[] { response, parser, terminalPredicate, cancellationToken } : [response, parser, terminalPredicate]; @@ -2307,7 +2335,7 @@ private static ValueExpression CreateStreamingResultExpression( ModelReaderWriterSnippets.Read( itemType, data, - ModelSerializationExtensionsSnippets.Wire)); + ClientModelReaderWriterOptions)); var jsonLinesArguments = cancellationToken != null ? new ValueExpression[] { @@ -2347,7 +2375,7 @@ private static ValueExpression CreateSseTerminalPredicate(InputStreamingType str return new FuncExpression([item.Declaration], isTerminal); } - private static ValueExpression CreateSseParser(CSharpType payloadCSharpType) + private static ValueExpression CreateSseParser(CSharpType payloadCSharpType, ScopedApi options) { var eventType = new VariableExpression(typeof(string), "_"); var data = new VariableExpression(typeof(ReadOnlySpan), "data"); @@ -2359,7 +2387,7 @@ private static ValueExpression CreateSseParser(CSharpType payloadCSharpType) ModelReaderWriterSnippets.Read( payloadCSharpType, binaryData, - ModelSerializationExtensionsSnippets.Wire)); + options)); } private CSharpType? GetResponseBodyType(InputType? responseType) @@ -2493,12 +2521,26 @@ private static bool ShouldUseJsonDocForDeserializingType(CSharpType type) return type.Equals(typeof(TimeSpan)) || type.Equals(typeof(BinaryData)); } + // The implicit operator can't take the client's options, so it would skip the configured model proxies. + private ValueExpression ToRequestContent(ValueExpression model, CSharpType modelType, bool isOptional) + { + if (!SupportsModelProxies || !MrwSerializationTypeDefinition.HasRequestContentConversion(modelType)) + { + return model; + } + + return (isOptional ? model.NullConditional() : model) + .Invoke(MrwSerializationTypeDefinition.ToRequestContentMethodName, ClientModelReaderWriterOptions); + } + private bool TryGetFormatArgumentForDualFormatModel( ModelProvider? bodyModel, InputModelType? bodyInputModel, - [NotNullWhen(true)] out ScopedApi? format) + [NotNullWhen(true)] out ScopedApi? format, + out bool isXml) { format = null; + isXml = false; // Find the first JSON or XML media type string? matchedMediaType = null; @@ -2523,7 +2565,8 @@ private bool TryGetFormatArgumentForDualFormatModel( bodyInputModel.Usage.HasFlag(InputModelTypeUsage.Xml)) { // Determine the format: XML or JSON - format = matchedMediaType.Contains(XmlMediaType, StringComparison.OrdinalIgnoreCase) + isXml = matchedMediaType.Contains(XmlMediaType, StringComparison.OrdinalIgnoreCase); + format = isXml ? ModelReaderWriterOptionsSnippets.XmlFormat : ModelReaderWriterOptionsSnippets.JsonFormat; return true; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.Xml.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.Xml.cs index 469c59e9dff..20c668ee824 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.Xml.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.Xml.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.ClientModel.Primitives; using System.Collections.Generic; using System.Xml; using System.Xml.Linq; @@ -48,5 +49,8 @@ public static InvokeMethodExpression GetBytesFromBase64(ScopedApi elem public static InvokeMethodExpression GetUtf8Bytes(ScopedApi element) => element.Invoke(GetUtf8BytesMethodName); + + public static ScopedApi ToXmlOptions(this ScopedApi options) + => options.Invoke(ToXmlOptionsMethodName).As(); } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.cs index 56da9ffe6fc..0e63ff075b4 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/ModelSerializationExtensionsSnippets.cs @@ -21,6 +21,7 @@ internal static partial class ModelSerializationExtensionsSnippets private const string WriteObjectValueMethodName = "WriteObjectValue"; internal const string ShouldReadThroughProxyMethodName = "ShouldReadThroughProxy"; internal const string GetUtf8BytesMethodName = "GetUtf8Bytes"; + internal const string ToXmlOptionsMethodName = "ToXmlOptions"; private const string GetCharMethodName = "GetChar"; private const string GetObjectMethodName = "GetObject"; private const string GetBytesFromBase64MethodName = "GetBytesFromBase64"; @@ -70,6 +71,9 @@ public static ValueExpression GetChar(this ScopedApi provider.Invoke(GetCharMethodName, [element]); public static ScopedApi ShouldReadThroughProxy(this ScopedApi options, CSharpType modelType) - => options.Invoke(ShouldReadThroughProxyMethodName, [TypeOf(modelType), ModelReaderWriterContextSnippets.Default]).As(); + => options.Invoke(ShouldReadThroughProxyMethodName, [ModelReaderWriterContextSnippets.Default], [modelType], false).As(); + + public static ScopedApi ToWireOptions(ValueExpression modelProxies) + => modelProxies.Invoke(ModelSerializationExtensionsDefinition.ToWireOptionsMethodName).As(); } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TreeXmlTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TreeXmlTests.cs index 8228c4d8044..cac155b462e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TreeXmlTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TreeXmlTests.cs @@ -222,7 +222,7 @@ public void ToBinaryContent_WithJsonFormat_ProducesJsonPayload() System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public); Assert.IsNotNull(method, "ToBinaryContent method should exist on Tree"); - var binaryContent = (BinaryContent)method!.Invoke(tree, new object[] { "J" })!; + var binaryContent = (BinaryContent)method!.Invoke(tree, new object[] { ModelReaderWriterOptions.Json })!; // Verify the MediaType is set correctly for JSON Assert.That(binaryContent.MediaType, @@ -240,7 +240,7 @@ public void ToBinaryContent_WithXmlFormat_ProducesXmlPayload() System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public); Assert.IsNotNull(method, "ToBinaryContent method should exist on Tree"); - var binaryContent = (BinaryContent)method!.Invoke(tree, new object[] { "X" })!; + var binaryContent = (BinaryContent)method!.Invoke(tree, new object[] { ModelReaderWriterOptions.Xml })!; // Verify the MediaType is null or empty for XML format Assert.That(string.IsNullOrEmpty(binaryContent.MediaType), Is.True, diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/ClientProviderCustomizationTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/ClientProviderCustomizationTests.cs index bdf17516e28..87c2b71b425 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/ClientProviderCustomizationTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/ClientProviderCustomizationTests.cs @@ -494,8 +494,7 @@ public async Task CanRemoveCachingField() // the sub-client caching field should not be present var fields = parentClientProvider!.Fields; - Assert.AreEqual(1, fields.Count); - Assert.AreEqual("_endpoint", fields[0].Name); + CollectionAssert.AreEqual(new[] { "_endpoint", "_modelReaderWriterOptions" }, fields.Select(f => f.Name)); var cachingField = fields.SingleOrDefault(f => f.Name == "_cachedDog"); Assert.IsNull(cachingField); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/ClientProviderTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/ClientProviderTests.cs index 1b9818460df..b3695a50d94 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/ClientProviderTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/ClientProviderTests.cs @@ -1082,9 +1082,10 @@ public void TestBuildConstructors_ForSubClient_NoAuth() var internalConstructor = constructors.FirstOrDefault( c => c.Signature?.Modifiers == MethodSignatureModifiers.Internal); Assert.IsNotNull(internalConstructor); - // in the no auth case, the ctor no longer has the credentail parameter therefore here we expect 2 parameters. + // in the no auth case, the ctor no longer has the credentail parameter therefore here we expect the pipeline, model reader writer options, and endpoint parameters. var ctorParams = internalConstructor?.Signature?.Parameters; - Assert.AreEqual(2, ctorParams?.Count); + Assert.AreEqual(3, ctorParams?.Count); + Assert.AreEqual("modelReaderWriterOptions", ctorParams?[1].Name); var mockingConstructor = constructors.FirstOrDefault( c => c.Signature?.Modifiers == MethodSignatureModifiers.Protected); @@ -1105,9 +1106,10 @@ public void TestBuildConstructors_ForSubClient_KeyAuthOrOAuth2Auth() var internalConstructor = constructors.FirstOrDefault( c => c.Signature?.Modifiers == MethodSignatureModifiers.Internal); Assert.IsNotNull(internalConstructor); - // when there is only one approach of auth, we still have 2 parameters in the ctor because we should not have auth parameter in sub-client + // when there is only one approach of auth, we still have 3 parameters in the ctor because we should not have auth parameter in sub-client var ctorParams = internalConstructor?.Signature?.Parameters; - Assert.AreEqual(2, ctorParams?.Count); + Assert.AreEqual(3, ctorParams?.Count); + Assert.AreEqual("modelReaderWriterOptions", ctorParams?[1].Name); var mockingConstructor = constructors.FirstOrDefault( c => c.Signature?.Modifiers == MethodSignatureModifiers.Protected); @@ -1127,15 +1129,60 @@ public void TestBuildConstructors_ForSubClient_BothAuth() var internalConstructor = constructors.FirstOrDefault( c => c.Signature?.Modifiers == MethodSignatureModifiers.Internal); Assert.IsNotNull(internalConstructor); - // when we have both auths, we still have 2 parameters in the ctor, because we should not have auth parameters in sub-client + // when we have both auths, we still have 3 parameters in the ctor, because we should not have auth parameters in sub-client var ctorParams = internalConstructor?.Signature?.Parameters; - Assert.AreEqual(2, ctorParams?.Count); + Assert.AreEqual(3, ctorParams?.Count); + Assert.AreEqual("modelReaderWriterOptions", ctorParams?[1].Name); var mockingConstructor = constructors.FirstOrDefault( c => c.Signature?.Modifiers == MethodSignatureModifiers.Protected); Assert.IsNotNull(mockingConstructor); } + // Pipelines whose client options don't carry model proxies, such as Azure.Core's, keep the cast operators and the + // shared wire options. + [Test] + public void ClientWithoutModelProxiesKeepsCastConversions() + { + var item = InputFactory.Model("Item"); + var page = InputFactory.Model("Page", properties: [InputFactory.Property("items", InputFactory.Array(item))]); + var listMethod = InputFactory.PagingServiceMethod( + "List", + InputFactory.Operation("List", responses: [InputFactory.OperationResponse([200], page)]), + pagingMetadata: InputFactory.PagingMetadata(["items"], null, null)); + var updateMethod = InputFactory.BasicServiceMethod( + "Update", + InputFactory.Operation( + "Update", + parameters: [InputFactory.BodyParameter("body", item, isRequired: true)], + responses: [InputFactory.OperationResponse([200], item)]), + parameters: [InputFactory.MethodParameter("body", item, isRequired: true, location: InputRequestLocation.Body)], + response: InputFactory.ServiceMethodResponse(item, null)); + var parent = InputFactory.Client("ParentClient", methods: [listMethod, updateMethod]); + var child = InputFactory.Client("ChildClient", parent: parent, initializedBy: InputClientInitializedBy.Parent); + MockHelpers.LoadMockGenerator( + inputModels: () => [item, page], + clients: () => [parent, child], + clientPipelineApi: ClientPipelineWithoutModelProxies.Instance); + + var typeProviders = ScmCodeModelGenerator.Instance.OutputLibrary.TypeProviders; + var parentClient = typeProviders.OfType().Single(c => c.Name == "ParentClient"); + Assert.IsNull(parentClient.ModelReaderWriterOptionsField); + var collectionResults = typeProviders.OfType().ToArray(); + Assert.AreEqual(4, collectionResults.Length); + + var parentCode = new TypeProviderWriter(parentClient).Write().Content; + StringAssert.Contains("this.Update(body, cancellationToken.ToRequestOptions())", parentCode); + StringAssert.Contains("(global::Sample.Models.Item)result", parentCode); + StringAssert.Contains("new global::Sample.ChildClient(Pipeline, _endpoint)", parentCode); + foreach (var code in collectionResults.Select(c => new TypeProviderWriter(c).Write().Content).Append(parentCode)) + { + StringAssert.DoesNotContain("_modelReaderWriterOptions", code); + StringAssert.DoesNotContain("FromClientResult", code); + StringAssert.DoesNotContain("ToWireOptions", code); + } + } + /// /// Tests that when a client has a default endpoint and auth, we generate a simplified constructor /// that accepts auth + options (using the default endpoint). diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NewOptionalNonBodyParameterAddedWithModelBody.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NewOptionalNonBodyParameterAddedWithModelBody.cs index 9e9679f33bf..6e88d1da721 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NewOptionalNonBodyParameterAddedWithModelBody.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NewOptionalNonBodyParameterAddedWithModelBody.cs @@ -34,7 +34,7 @@ public partial class TestClient { global::Sample.Argument.AssertNotNull(body, nameof(body)); - global::System.ClientModel.ClientResult result = this.GetData(param1, body, param3, cancellationToken.ToRequestOptions()); + global::System.ClientModel.ClientResult result = this.GetData(param1, body.ToBinaryContent(_modelReaderWriterOptions), param3, cancellationToken.ToRequestOptions()); using global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(result.GetRawResponse().Content); string value = document.RootElement.GetString(); return global::System.ClientModel.ClientResult.FromValue(value, result.GetRawResponse()); @@ -44,7 +44,7 @@ public partial class TestClient { global::Sample.Argument.AssertNotNull(body, nameof(body)); - global::System.ClientModel.ClientResult result = await this.GetDataAsync(param1, body, param3, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + global::System.ClientModel.ClientResult result = await this.GetDataAsync(param1, body.ToBinaryContent(_modelReaderWriterOptions), param3, cancellationToken.ToRequestOptions()).ConfigureAwait(false); using global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(result.GetRawResponse().Content); string value = document.RootElement.GetString(); return global::System.ClientModel.ClientResult.FromValue(value, result.GetRawResponse()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(False,False).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(False,False).cs index ae1a9f09775..897f4fd1b5c 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(False,False).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(False,False).cs @@ -13,22 +13,22 @@ public partial class TestClient { public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string token, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, options); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, maxPageSize, token, options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, maxPageSize, token, options); } public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize = default, string token = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, token, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, token, cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, string token = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, token, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, token, cancellationToken.ToRequestOptions()); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(False,True).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(False,True).cs index 6e3f4c5554c..beab5706967 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(False,True).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(False,True).cs @@ -14,22 +14,46 @@ public partial class TestClient { public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string token, bool? filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, bool? filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize = default, string token = default, bool? filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, string token = default, bool? filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } #pragma warning disable AZC0002 // Back-compat overload preserves the previous method signature where CancellationToken was the trailing parameter. Making it optional would introduce an ambiguous call with the new method. diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(StringFilter).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(StringFilter).cs index fdaeabe90aa..529bb27dfc4 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(StringFilter).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(StringFilter).cs @@ -14,22 +14,46 @@ public partial class TestClient { public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string token, string filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, string filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize = default, string token = default, string filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, string token = default, string filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(StringFilter,ProtocolOnly).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(StringFilter,ProtocolOnly).cs index ac88463442b..2ba5b6376ac 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(StringFilter,ProtocolOnly).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(StringFilter,ProtocolOnly).cs @@ -11,12 +11,24 @@ public partial class TestClient { public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize = default, string token = default, string filter = default, global::System.ClientModel.Primitives.RequestOptions options = null) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, string token = default, string filter = default, global::System.ClientModel.Primitives.RequestOptions options = null) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,False).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,False).cs index ae1a9f09775..897f4fd1b5c 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,False).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,False).cs @@ -13,22 +13,22 @@ public partial class TestClient { public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string token, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, options); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, maxPageSize, token, options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, maxPageSize, token, options); } public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize = default, string token = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, token, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, token, cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, string token = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, token, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, token, cancellationToken.ToRequestOptions()); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,False,CustomProtocol).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,False,CustomProtocol).cs index 555087dd466..040b65527eb 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,False,CustomProtocol).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,False,CustomProtocol).cs @@ -13,22 +13,22 @@ public partial class TestClient { public partial global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string resumeToken, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, resumeToken, options); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, maxPageSize, resumeToken, options); } public partial global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string resumeToken, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, resumeToken, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, maxPageSize, resumeToken, options); } public global::System.ClientModel.CollectionResult GetItems(int? maxPageSize = default, string token = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, token, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, token, cancellationToken.ToRequestOptions()); } public global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, string token = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, token, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, token, cancellationToken.ToRequestOptions()); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,False,NoDefaults).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,False,NoDefaults).cs index b3a4029e96a..275c48d66bf 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,False,NoDefaults).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,False,NoDefaults).cs @@ -15,20 +15,20 @@ public partial class TestClient [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string token, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, options); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, maxPageSize, token, options); } [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, maxPageSize, token, options); } #pragma warning disable AZC0002 // Back-compat overload preserves the previous method signature where CancellationToken was the trailing parameter. Making it optional would introduce an ambiguous call with the new method. [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize, string token, global::System.Threading.CancellationToken cancellationToken) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, token, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, token, cancellationToken.ToRequestOptions()); } #pragma warning restore AZC0002 // Back-compat overload preserves the previous method signature where CancellationToken was the trailing parameter. Making it optional would introduce an ambiguous call with the new method. @@ -36,28 +36,28 @@ public partial class TestClient [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, global::System.Threading.CancellationToken cancellationToken) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, token, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, token, cancellationToken.ToRequestOptions()); } #pragma warning restore AZC0002 // Back-compat overload preserves the previous method signature where CancellationToken was the trailing parameter. Making it optional would introduce an ambiguous call with the new method. public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, default, options); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, maxPageSize, default, options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, default, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, maxPageSize, default, options); } public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, default, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, default, cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, default, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, default, cancellationToken.ToRequestOptions()); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,True).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,True).cs index 3fb3a199c67..320e2eaf609 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,True).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,True).cs @@ -14,22 +14,46 @@ public partial class TestClient { public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string token, bool? filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, bool? filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize = default, string token = default, bool? filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, string token = default, bool? filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,True,NoDefaults).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,True,NoDefaults).cs index 3fb3a199c67..320e2eaf609 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,True,NoDefaults).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/BackCompatibility_NextLinkContinuationToken(True,True,NoDefaults).cs @@ -14,22 +14,46 @@ public partial class TestClient { public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string token, bool? filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, bool? filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize = default, string token = default, bool? filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, string token = default, bool? filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/ExperimentalPolyfilledCustomDeclarationsCompile(ParentClient).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/ExperimentalPolyfilledCustomDeclarationsCompile(ParentClient).cs index d952d70a908..2c47b0dc630 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/ExperimentalPolyfilledCustomDeclarationsCompile(ParentClient).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/ExperimentalPolyfilledCustomDeclarationsCompile(ParentClient).cs @@ -11,6 +11,7 @@ namespace Sample public partial class ParentClient { private readonly global::System.Uri _endpoint; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions = global::Sample.ModelSerializationExtensions.WireOptions; #pragma warning disable CUSTOM_CLIENT // This generated code depends on experimental functionality. private global::Sample.ChildClient _cachedChildClient; #pragma warning restore CUSTOM_CLIENT // This generated code depends on experimental functionality. @@ -38,6 +39,7 @@ internal ParentClient(global::System.ClientModel.Primitives.AuthenticationPolicy { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.ParentClient).Assembly) }, Array.Empty()); } + _modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); } public ParentClient(global::System.Uri endpoint, global::Sample.SampleClientOptions options) : this(null, endpoint, options) @@ -49,7 +51,7 @@ public ParentClient(global::System.Uri endpoint, global::Sample.SampleClientOpti #pragma warning disable CUSTOM_CLIENT // This generated code depends on experimental functionality. public virtual global::Sample.ChildClient GetChildClient() { - return (global::System.Threading.Volatile.Read(ref _cachedChildClient) ?? (global::System.Threading.Interlocked.CompareExchange(ref _cachedChildClient, new global::Sample.ChildClient(Pipeline, _endpoint), null) ?? _cachedChildClient)); + return (global::System.Threading.Volatile.Read(ref _cachedChildClient) ?? (global::System.Threading.Interlocked.CompareExchange(ref _cachedChildClient, new global::Sample.ChildClient(Pipeline, _modelReaderWriterOptions, _endpoint), null) ?? _cachedChildClient)); } #pragma warning restore CUSTOM_CLIENT // This generated code depends on experimental functionality. } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceClient_GeneratesExpectedClient.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceClient_GeneratesExpectedClient.cs index 7aa404c1406..8497a2df049 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceClient_GeneratesExpectedClient.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceClient_GeneratesExpectedClient.cs @@ -13,6 +13,7 @@ namespace Sample public partial class TestClient { private readonly global::System.Uri _endpoint; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions = global::Sample.ModelSerializationExtensions.WireOptions; private readonly string _subscriptionId; private readonly string _serviceAApiVersion; private readonly string _serviceBApiVersion; @@ -44,6 +45,7 @@ internal TestClient(global::System.ClientModel.Primitives.AuthenticationPolicy a { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } + _modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); _serviceAApiVersion = options.ServiceAApiVersion; _serviceBApiVersion = options.ServiceBApiVersion; } @@ -56,12 +58,12 @@ public TestClient(global::System.Uri endpoint, string subscriptionId, global::Sa public virtual global::Sample.ServiceA.ServiceA GetServiceAClient() { - return (global::System.Threading.Volatile.Read(ref _cachedServiceA) ?? (global::System.Threading.Interlocked.CompareExchange(ref _cachedServiceA, new global::Sample.ServiceA.ServiceA(Pipeline, _endpoint, _serviceAApiVersion, _subscriptionId), null) ?? _cachedServiceA)); + return (global::System.Threading.Volatile.Read(ref _cachedServiceA) ?? (global::System.Threading.Interlocked.CompareExchange(ref _cachedServiceA, new global::Sample.ServiceA.ServiceA(Pipeline, _modelReaderWriterOptions, _endpoint, _serviceAApiVersion, _subscriptionId), null) ?? _cachedServiceA)); } public virtual global::Sample.ServiceB.ServiceB GetServiceBClient() { - return (global::System.Threading.Volatile.Read(ref _cachedServiceB) ?? (global::System.Threading.Interlocked.CompareExchange(ref _cachedServiceB, new global::Sample.ServiceB.ServiceB(Pipeline, _endpoint, _serviceBApiVersion, _subscriptionId), null) ?? _cachedServiceB)); + return (global::System.Threading.Volatile.Read(ref _cachedServiceB) ?? (global::System.Threading.Interlocked.CompareExchange(ref _cachedServiceB, new global::Sample.ServiceB.ServiceB(Pipeline, _modelReaderWriterOptions, _endpoint, _serviceBApiVersion, _subscriptionId), null) ?? _cachedServiceB)); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceClient_WithThreeServices_GeneratesExpectedClient.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceClient_WithThreeServices_GeneratesExpectedClient.cs index f0dc227b3eb..3a7677f34ef 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceClient_WithThreeServices_GeneratesExpectedClient.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceClient_WithThreeServices_GeneratesExpectedClient.cs @@ -14,6 +14,7 @@ namespace Sample public partial class TestClient { private readonly global::System.Uri _endpoint; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions = global::Sample.ModelSerializationExtensions.WireOptions; private readonly string _subscriptionId; private readonly string _computeApiVersion; private readonly string _keyVaultApiVersion; @@ -47,6 +48,7 @@ internal TestClient(global::System.ClientModel.Primitives.AuthenticationPolicy a { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } + _modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); _computeApiVersion = options.ComputeApiVersion; _keyVaultApiVersion = options.KeyVaultApiVersion; _storageApiVersion = options.StorageApiVersion; @@ -60,17 +62,17 @@ public TestClient(global::System.Uri endpoint, string subscriptionId, global::Sa public virtual global::Sample.KeyVault.KeyVault GetKeyVaultClient() { - return (global::System.Threading.Volatile.Read(ref _cachedKeyVault) ?? (global::System.Threading.Interlocked.CompareExchange(ref _cachedKeyVault, new global::Sample.KeyVault.KeyVault(Pipeline, _endpoint, _keyVaultApiVersion, _subscriptionId), null) ?? _cachedKeyVault)); + return (global::System.Threading.Volatile.Read(ref _cachedKeyVault) ?? (global::System.Threading.Interlocked.CompareExchange(ref _cachedKeyVault, new global::Sample.KeyVault.KeyVault(Pipeline, _modelReaderWriterOptions, _endpoint, _keyVaultApiVersion, _subscriptionId), null) ?? _cachedKeyVault)); } public virtual global::Sample.Storage.Storage GetStorageClient() { - return (global::System.Threading.Volatile.Read(ref _cachedStorage) ?? (global::System.Threading.Interlocked.CompareExchange(ref _cachedStorage, new global::Sample.Storage.Storage(Pipeline, _endpoint, _storageApiVersion, _subscriptionId), null) ?? _cachedStorage)); + return (global::System.Threading.Volatile.Read(ref _cachedStorage) ?? (global::System.Threading.Interlocked.CompareExchange(ref _cachedStorage, new global::Sample.Storage.Storage(Pipeline, _modelReaderWriterOptions, _endpoint, _storageApiVersion, _subscriptionId), null) ?? _cachedStorage)); } public virtual global::Sample.Compute.Compute GetComputeClient() { - return (global::System.Threading.Volatile.Read(ref _cachedCompute) ?? (global::System.Threading.Interlocked.CompareExchange(ref _cachedCompute, new global::Sample.Compute.Compute(Pipeline, _endpoint, _computeApiVersion, _subscriptionId), null) ?? _cachedCompute)); + return (global::System.Threading.Volatile.Read(ref _cachedCompute) ?? (global::System.Threading.Interlocked.CompareExchange(ref _cachedCompute, new global::Sample.Compute.Compute(Pipeline, _modelReaderWriterOptions, _endpoint, _computeApiVersion, _subscriptionId), null) ?? _cachedCompute)); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceCombinedClient_GeneratesExpectedClient.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceCombinedClient_GeneratesExpectedClient.cs index 56c1c6cf460..bd72bf5682c 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceCombinedClient_GeneratesExpectedClient.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceCombinedClient_GeneratesExpectedClient.cs @@ -13,6 +13,7 @@ namespace Sample public partial class TestClient { private readonly global::System.Uri _endpoint; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions = global::Sample.ModelSerializationExtensions.WireOptions; private readonly string _serviceAApiVersion; private readonly string _serviceBApiVersion; @@ -39,6 +40,7 @@ internal TestClient(global::System.ClientModel.Primitives.AuthenticationPolicy a { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } + _modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); _serviceAApiVersion = options.ServiceAApiVersion; _serviceBApiVersion = options.ServiceBApiVersion; } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceCombinedClient_WithThreeServices_GeneratesExpectedClient.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceCombinedClient_WithThreeServices_GeneratesExpectedClient.cs index 7a3f23c4d82..09a4b52be6c 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceCombinedClient_WithThreeServices_GeneratesExpectedClient.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/MultiServiceCombinedClient_WithThreeServices_GeneratesExpectedClient.cs @@ -13,6 +13,7 @@ namespace Sample public partial class TestClient { private readonly global::System.Uri _endpoint; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions = global::Sample.ModelSerializationExtensions.WireOptions; private readonly string _computeApiVersion; private readonly string _keyVaultApiVersion; private readonly string _storageApiVersion; @@ -40,6 +41,7 @@ internal TestClient(global::System.ClientModel.Primitives.AuthenticationPolicy a { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } + _modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); _computeApiVersion = options.ComputeApiVersion; _keyVaultApiVersion = options.KeyVaultApiVersion; _storageApiVersion = options.StorageApiVersion; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingAccountsForCustomMethods(False).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingAccountsForCustomMethods(False).cs index 709385dd863..0d4209016da 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingAccountsForCustomMethods(False).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingAccountsForCustomMethods(False).cs @@ -15,25 +15,25 @@ public partial class TestClient [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string token, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, options); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, maxPageSize, token, options); } [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, maxPageSize, token, options); } [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize, string token, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, token, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, token, cancellationToken.ToRequestOptions()); } [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, token, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, token, cancellationToken.ToRequestOptions()); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingImplementsRenamedPartials(False).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingImplementsRenamedPartials(False).cs index 50e5e5adbab..694031a05a1 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingImplementsRenamedPartials(False).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingImplementsRenamedPartials(False).cs @@ -13,32 +13,32 @@ public partial class TestClient { public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, default, options); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, maxPageSize, default, options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, default, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, maxPageSize, default, options); } public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, default, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, default, cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, default, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, default, cancellationToken.ToRequestOptions()); } public partial global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string resumeToken, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, resumeToken, options); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, maxPageSize, resumeToken, options); } public partial global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string resumeToken, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, resumeToken, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, maxPageSize, resumeToken, options); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingPreservesTokenlessPartial.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingPreservesTokenlessPartial.cs index 5b7ff52d201..f266093e3e9 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingPreservesTokenlessPartial.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingPreservesTokenlessPartial.cs @@ -13,22 +13,22 @@ public partial class TestClient { public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string token, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, options); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, maxPageSize, token, options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, maxPageSize, token, options); } public partial global::System.ClientModel.CollectionResult GetItems(int? maxPageSize, global::System.Threading.CancellationToken cancellationToken) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, default, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, default, cancellationToken.ToRequestOptions()); } public partial global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize, global::System.Threading.CancellationToken cancellationToken) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, default, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, maxPageSize, default, cancellationToken.ToRequestOptions()); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingRetainsTokenForLongerArgumentCollision.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingRetainsTokenForLongerArgumentCollision.cs index 4b8127255a5..42aeb59672c 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingRetainsTokenForLongerArgumentCollision.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingRetainsTokenForLongerArgumentCollision.cs @@ -13,22 +13,46 @@ public partial class TestClient { public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string token, object filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, object filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize = default, string token = default, object filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, string token = default, object filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingRetainsTokenForOptionalArgumentCollision.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingRetainsTokenForOptionalArgumentCollision.cs index a56aa14b538..00b9fb32c19 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingRetainsTokenForOptionalArgumentCollision.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingRetainsTokenForOptionalArgumentCollision.cs @@ -13,22 +13,46 @@ public partial class TestClient { public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string token, string filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, string filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize = default, string token = default, string filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, string token = default, string filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingUsesBetterLiteralConversion.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingUsesBetterLiteralConversion.cs index d35b0f69db9..8867ba8a53f 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingUsesBetterLiteralConversion.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/NextLinkPagingUsesBetterLiteralConversion.cs @@ -15,20 +15,38 @@ public partial class TestClient [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, string token, object filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, object filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, token, filter, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + options); } #pragma warning disable AZC0002 // Back-compat overload preserves the previous method signature where CancellationToken was the trailing parameter. Making it optional would introduce an ambiguous call with the new method. [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize, string token, object filter, global::System.Threading.CancellationToken cancellationToken) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } #pragma warning restore AZC0002 // Back-compat overload preserves the previous method signature where CancellationToken was the trailing parameter. Making it optional would introduce an ambiguous call with the new method. @@ -36,7 +54,13 @@ public partial class TestClient [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize, string token, object filter, global::System.Threading.CancellationToken cancellationToken) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + token, + filter, + cancellationToken.ToRequestOptions()); } #pragma warning restore AZC0002 // Back-compat overload preserves the previous method signature where CancellationToken was the trailing parameter. Making it optional would introduce an ambiguous call with the new method. @@ -70,22 +94,46 @@ public partial class TestClient public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(int? maxPageSize, object filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, maxPageSize, default, filter, options); + return new global::Sample.TestClientGetItemsCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + default, + filter, + options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(int? maxPageSize, object filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, maxPageSize, default, filter, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult( + this, + _modelReaderWriterOptions, + maxPageSize, + default, + filter, + options); } public virtual global::System.ClientModel.CollectionResult GetItems(int? maxPageSize = default, object filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, maxPageSize, default, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + default, + filter, + cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(int? maxPageSize = default, object filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, maxPageSize, default, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT( + this, + _modelReaderWriterOptions, + maxPageSize, + default, + filter, + cancellationToken.ToRequestOptions()); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,False,False,0).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,False,False,0).cs index 395de44a9d8..a2c2eef505e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,False,False,0).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,False,False,0).cs @@ -11,3 +11,4 @@ { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } +_modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,False,True,0).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,False,True,0).cs index 395de44a9d8..a2c2eef505e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,False,True,0).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,False,True,0).cs @@ -11,3 +11,4 @@ { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } +_modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,True,False,0).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,True,False,0).cs index 395de44a9d8..a2c2eef505e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,True,False,0).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,True,False,0).cs @@ -11,3 +11,4 @@ { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } +_modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,True,True,0).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,True,True,0).cs index 395de44a9d8..a2c2eef505e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,True,True,0).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,True,True,0).cs @@ -11,3 +11,4 @@ { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } +_modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,False,False,0).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,False,False,0).cs index 395de44a9d8..a2c2eef505e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,False,False,0).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,False,False,0).cs @@ -11,3 +11,4 @@ { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } +_modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,False,True,0).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,False,True,0).cs index 395de44a9d8..a2c2eef505e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,False,True,0).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,False,True,0).cs @@ -11,3 +11,4 @@ { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } +_modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,True,False,0).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,True,False,0).cs index 395de44a9d8..a2c2eef505e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,True,False,0).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,True,False,0).cs @@ -11,3 +11,4 @@ { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } +_modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,True,True,0).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,True,True,0).cs index 395de44a9d8..a2c2eef505e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,True,True,0).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,True,True,0).cs @@ -11,3 +11,4 @@ { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } +_modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/ValidateConstructorsWhenUnsupportedAuth.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/ValidateConstructorsWhenUnsupportedAuth.cs index 89829df5a76..56c1158f003 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/ValidateConstructorsWhenUnsupportedAuth.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/ValidateConstructorsWhenUnsupportedAuth.cs @@ -28,6 +28,7 @@ internal TestClient(global::System.ClientModel.Primitives.AuthenticationPolicy a { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } + _modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); } internal TestClient(global::System.Uri endpoint, global::Sample.TestClientOptions options) : this(null, endpoint, options) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/XmlDocsAreWritten.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/XmlDocsAreWritten.cs index 7166e071f8c..ba454f3291d 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/XmlDocsAreWritten.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/XmlDocsAreWritten.cs @@ -14,6 +14,7 @@ namespace Sample public partial class TestClient { private readonly global::System.Uri _endpoint; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions = global::Sample.ModelSerializationExtensions.WireOptions; private readonly string _queryParam; /// Initializes a new instance of TestClient for mocking. @@ -52,6 +53,7 @@ internal TestClient(global::System.ClientModel.Primitives.AuthenticationPolicy a { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } + _modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); } /// Initializes a new instance of TestClient. diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/CollectionResultDefinitionTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/CollectionResultDefinitionTests.cs index 140debd49f1..9b452da8876 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/CollectionResultDefinitionTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/CollectionResultDefinitionTests.cs @@ -80,8 +80,8 @@ public void TestCanMutateDefinition() var ctor = constructors[0]; var ctorParameters = ctor.Signature.Parameters; - // should now only have the client name parameter - Assert.AreEqual(1, ctorParameters.Count); + // should now only have the client and the client's model reader writer options parameters + CollectionAssert.AreEqual(new[] { "client", "modelReaderWriterOptions" }, ctorParameters.Select(p => p.Name)); } [Test] diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBody.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBody.cs index 4233475bb27..51074e72ea4 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBody.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBody.cs @@ -13,12 +13,14 @@ namespace Sample internal partial class CatClientGetCatsCollectionResult : global::System.ClientModel.Primitives.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _myToken; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResult(global::Sample.CatClient client, string myToken, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string myToken, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _myToken = myToken; _options = options; } @@ -32,7 +34,7 @@ public CatClientGetCatsCollectionResult(global::Sample.CatClient client, string global::System.ClientModel.ClientResult result = this.GetNextResponse(message); yield return result; - nextToken = ((global::Sample.Models.Page)result).NextPage; + nextToken = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextPage; if (string.IsNullOrEmpty(nextToken)) { yield break; @@ -43,7 +45,7 @@ public CatClientGetCatsCollectionResult(global::Sample.CatClient client, string public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - string nextPage = ((global::Sample.Models.Page)page).NextPage; + string nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextPage; if (!string.IsNullOrEmpty(nextPage)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage)); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBodyAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBodyAsync.cs index 5f5cff04a6f..3f879ce89bd 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBodyAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBodyAsync.cs @@ -14,12 +14,14 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResult : global::System.ClientModel.Primitives.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _myToken; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, string myToken, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string myToken, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _myToken = myToken; _options = options; } @@ -33,7 +35,7 @@ public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, st global::System.ClientModel.ClientResult result = await this.GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextToken = ((global::Sample.Models.Page)result).NextPage; + nextToken = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextPage; if (string.IsNullOrEmpty(nextToken)) { yield break; @@ -44,7 +46,7 @@ public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, st public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - string nextPage = ((global::Sample.Models.Page)page).NextPage; + string nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextPage; if (!string.IsNullOrEmpty(nextPage)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage)); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBodyOfT.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBodyOfT.cs index 4f36757aac3..7776e52967d 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBodyOfT.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBodyOfT.cs @@ -13,12 +13,14 @@ namespace Sample internal partial class CatClientGetCatsCollectionResultOfT : global::System.ClientModel.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _myToken; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, string myToken, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string myToken, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _myToken = myToken; _options = options; } @@ -32,7 +34,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, stri global::System.ClientModel.ClientResult result = this.GetNextResponse(message); yield return result; - nextToken = ((global::Sample.Models.Page)result).NextPage; + nextToken = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextPage; if (string.IsNullOrEmpty(nextToken)) { yield break; @@ -43,7 +45,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, stri public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - string nextPage = ((global::Sample.Models.Page)page).NextPage; + string nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextPage; if (!string.IsNullOrEmpty(nextPage)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage)); @@ -56,7 +58,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, stri protected override global::System.Collections.Generic.IEnumerable GetValuesFromPage(global::System.ClientModel.ClientResult page) { - return ((global::Sample.Models.Page)page).Cats; + return global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).Cats; } private global::System.ClientModel.ClientResult GetNextResponse(global::System.ClientModel.Primitives.PipelineMessage message) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBodyOfTAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBodyOfTAsync.cs index 9b5efe704c7..54a3cb6a1d0 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBodyOfTAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInBodyOfTAsync.cs @@ -14,12 +14,14 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResultOfT : global::System.ClientModel.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _myToken; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, string myToken, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string myToken, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _myToken = myToken; _options = options; } @@ -33,7 +35,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.ClientResult result = await this.GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextToken = ((global::Sample.Models.Page)result).NextPage; + nextToken = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextPage; if (string.IsNullOrEmpty(nextToken)) { yield break; @@ -44,7 +46,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - string nextPage = ((global::Sample.Models.Page)page).NextPage; + string nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextPage; if (!string.IsNullOrEmpty(nextPage)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage)); @@ -57,7 +59,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, protected override async global::System.Collections.Generic.IAsyncEnumerable GetValuesFromPageAsync(global::System.ClientModel.ClientResult page) { - foreach (global::Sample.Models.Cat item in ((global::Sample.Models.Page)page).Cats) + foreach (global::Sample.Models.Cat item in global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).Cats) { yield return item; await global::System.Threading.Tasks.Task.Yield(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeader.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeader.cs index e9a9ca657c9..080ff3a27d2 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeader.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeader.cs @@ -12,12 +12,14 @@ namespace Sample internal partial class CatClientGetCatsCollectionResult : global::System.ClientModel.Primitives.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _myToken; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResult(global::Sample.CatClient client, string myToken, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string myToken, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _myToken = myToken; _options = options; } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeaderAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeaderAsync.cs index 1eb510af463..f919a54e97a 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeaderAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeaderAsync.cs @@ -13,12 +13,14 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResult : global::System.ClientModel.Primitives.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _myToken; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, string myToken, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string myToken, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _myToken = myToken; _options = options; } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeaderOfT.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeaderOfT.cs index 37b39ba49df..26709189485 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeaderOfT.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeaderOfT.cs @@ -13,12 +13,14 @@ namespace Sample internal partial class CatClientGetCatsCollectionResultOfT : global::System.ClientModel.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _myToken; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, string myToken, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string myToken, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _myToken = myToken; _options = options; } @@ -58,7 +60,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, stri protected override global::System.Collections.Generic.IEnumerable GetValuesFromPage(global::System.ClientModel.ClientResult page) { - return ((global::Sample.Models.Page)page).Cats; + return global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).Cats; } private global::System.ClientModel.ClientResult GetNextResponse(global::System.ClientModel.Primitives.PipelineMessage message) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeaderOfTAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeaderOfTAsync.cs index 100adfd6448..0c615b2123d 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeaderOfTAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/ContinuationTokenInHeaderOfTAsync.cs @@ -14,12 +14,14 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResultOfT : global::System.ClientModel.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _myToken; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, string myToken, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string myToken, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _myToken = myToken; _options = options; } @@ -59,7 +61,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, protected override async global::System.Collections.Generic.IAsyncEnumerable GetValuesFromPageAsync(global::System.ClientModel.ClientResult page) { - foreach (global::Sample.Models.Cat item in ((global::Sample.Models.Page)page).Cats) + foreach (global::Sample.Models.Cat item in global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).Cats) { yield return item; await global::System.Threading.Tasks.Task.Yield(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBody.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBody.cs index df0444e754e..31c998e4f45 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBody.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBody.cs @@ -13,12 +13,14 @@ namespace Sample internal partial class CatClientGetCatsCollectionResult : global::System.ClientModel.Primitives.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _myToken; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResult(global::Sample.CatClient client, string myToken, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string myToken, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _myToken = myToken; _options = options; } @@ -32,7 +34,7 @@ public CatClientGetCatsCollectionResult(global::Sample.CatClient client, string global::System.ClientModel.ClientResult result = this.GetNextResponse(message); yield return result; - nextToken = ((global::Sample.Models.Page)result).NestedNext?.NextPage; + nextToken = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NestedNext?.NextPage; if (string.IsNullOrEmpty(nextToken)) { yield break; @@ -43,7 +45,7 @@ public CatClientGetCatsCollectionResult(global::Sample.CatClient client, string public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - string nextPage = ((global::Sample.Models.Page)page).NestedNext?.NextPage; + string nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NestedNext?.NextPage; if (!string.IsNullOrEmpty(nextPage)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage)); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBodyAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBodyAsync.cs index 96c501d3cae..656e66f4c4c 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBodyAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBodyAsync.cs @@ -14,12 +14,14 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResult : global::System.ClientModel.Primitives.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _myToken; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, string myToken, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string myToken, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _myToken = myToken; _options = options; } @@ -33,7 +35,7 @@ public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, st global::System.ClientModel.ClientResult result = await this.GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextToken = ((global::Sample.Models.Page)result).NestedNext?.NextPage; + nextToken = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NestedNext?.NextPage; if (string.IsNullOrEmpty(nextToken)) { yield break; @@ -44,7 +46,7 @@ public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, st public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - string nextPage = ((global::Sample.Models.Page)page).NestedNext?.NextPage; + string nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NestedNext?.NextPage; if (!string.IsNullOrEmpty(nextPage)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage)); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBodyOfT.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBodyOfT.cs index 0859204216f..0cd136061f3 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBodyOfT.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBodyOfT.cs @@ -13,12 +13,14 @@ namespace Sample internal partial class CatClientGetCatsCollectionResultOfT : global::System.ClientModel.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _myToken; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, string myToken, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string myToken, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _myToken = myToken; _options = options; } @@ -32,7 +34,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, stri global::System.ClientModel.ClientResult result = this.GetNextResponse(message); yield return result; - nextToken = ((global::Sample.Models.Page)result).NestedNext?.NextPage; + nextToken = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NestedNext?.NextPage; if (string.IsNullOrEmpty(nextToken)) { yield break; @@ -43,7 +45,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, stri public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - string nextPage = ((global::Sample.Models.Page)page).NestedNext?.NextPage; + string nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NestedNext?.NextPage; if (!string.IsNullOrEmpty(nextPage)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage)); @@ -56,7 +58,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, stri protected override global::System.Collections.Generic.IEnumerable GetValuesFromPage(global::System.ClientModel.ClientResult page) { - return ((global::Sample.Models.Page)page).NestedItems?.Cats; + return global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NestedItems?.Cats; } private global::System.ClientModel.ClientResult GetNextResponse(global::System.ClientModel.Primitives.PipelineMessage message) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBodyOfTAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBodyOfTAsync.cs index 8d76e7e615b..63aad8bdc4e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBodyOfTAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ContinuationTokenTests/NestedContinuationTokenInBodyOfTAsync.cs @@ -14,12 +14,14 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResultOfT : global::System.ClientModel.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _myToken; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, string myToken, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string myToken, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _myToken = myToken; _options = options; } @@ -33,7 +35,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.ClientResult result = await this.GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextToken = ((global::Sample.Models.Page)result).NestedNext?.NextPage; + nextToken = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NestedNext?.NextPage; if (string.IsNullOrEmpty(nextToken)) { yield break; @@ -44,7 +46,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - string nextPage = ((global::Sample.Models.Page)page).NestedNext?.NextPage; + string nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NestedNext?.NextPage; if (!string.IsNullOrEmpty(nextPage)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage)); @@ -57,7 +59,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, protected override async global::System.Collections.Generic.IAsyncEnumerable GetValuesFromPageAsync(global::System.ClientModel.ClientResult page) { - foreach (global::Sample.Models.Cat item in ((global::Sample.Models.Page)page).NestedItems?.Cats) + foreach (global::Sample.Models.Cat item in global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NestedItems?.Cats) { yield return item; await global::System.Threading.Tasks.Task.Yield(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationToken.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationToken.cs index be79971e212..9ba3d6b071f 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationToken.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationToken.cs @@ -11,12 +11,14 @@ namespace Sample internal partial class CatClientGetCatsCollectionResult : global::System.ClientModel.Primitives.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _animalKind; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResult(global::Sample.CatClient client, string animalKind, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string animalKind, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _animalKind = animalKind; _options = options; } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationTokenAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationTokenAsync.cs index 622d18d500d..a5dd9478cf3 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationTokenAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationTokenAsync.cs @@ -12,12 +12,14 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResult : global::System.ClientModel.Primitives.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _animalKind; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, string animalKind, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string animalKind, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _animalKind = animalKind; _options = options; } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationTokenOfT.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationTokenOfT.cs index 2dee0b1ed72..b2073ed3f87 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationTokenOfT.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationTokenOfT.cs @@ -12,12 +12,14 @@ namespace Sample internal partial class CatClientGetCatsCollectionResultOfT : global::System.ClientModel.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _animalKind; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, string animalKind, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string animalKind, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _animalKind = animalKind; _options = options; } @@ -35,7 +37,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, stri protected override global::System.Collections.Generic.IEnumerable GetValuesFromPage(global::System.ClientModel.ClientResult page) { - return ((global::Sample.Models.Page)page).Cats; + return global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).Cats; } private global::System.ClientModel.ClientResult GetNextResponse(global::System.ClientModel.Primitives.PipelineMessage message) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationTokenOfTAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationTokenOfTAsync.cs index 6c82884dc73..c4a0108c22f 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationTokenOfTAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/ListPageableTests/NoNextLinkOrContinuationTokenOfTAsync.cs @@ -13,12 +13,14 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResultOfT : global::System.ClientModel.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _animalKind; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, string animalKind, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, string animalKind, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _animalKind = animalKind; _options = options; } @@ -36,7 +38,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, protected override async global::System.Collections.Generic.IAsyncEnumerable GetValuesFromPageAsync(global::System.ClientModel.ClientResult page) { - foreach (global::Sample.Models.Cat item in ((global::Sample.Models.Page)page).Cats) + foreach (global::Sample.Models.Cat item in global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).Cats) { yield return item; await global::System.Threading.Tasks.Task.Yield(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBody.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBody.cs index 6c2fbb79051..ef0384b8aba 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBody.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBody.cs @@ -13,11 +13,13 @@ namespace Sample internal partial class CatClientGetCatsCollectionResult : global::System.ClientModel.Primitives.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -30,7 +32,7 @@ public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global: global::System.ClientModel.ClientResult result = this.GetNextResponse(message); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextCat; if ((nextPageUri == null)) { yield break; @@ -41,7 +43,7 @@ public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global: public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBodyAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBodyAsync.cs index 86d2adfba2f..2e9105837db 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBodyAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBodyAsync.cs @@ -14,11 +14,13 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResult : global::System.ClientModel.Primitives.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -31,7 +33,7 @@ public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, gl global::System.ClientModel.ClientResult result = await this.GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextCat; if ((nextPageUri == null)) { yield break; @@ -42,7 +44,7 @@ public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, gl public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBodyOfT.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBodyOfT.cs index ea15f35606f..8d5c1ae1ded 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBodyOfT.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBodyOfT.cs @@ -13,11 +13,13 @@ namespace Sample internal partial class CatClientGetCatsCollectionResultOfT : global::System.ClientModel.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -30,7 +32,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, glob global::System.ClientModel.ClientResult result = this.GetNextResponse(message); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextCat; if ((nextPageUri == null)) { yield break; @@ -41,7 +43,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, glob public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); @@ -54,7 +56,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, glob protected override global::System.Collections.Generic.IEnumerable GetValuesFromPage(global::System.ClientModel.ClientResult page) { - return ((global::Sample.Models.Page)page).Cats; + return global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).Cats; } private global::System.ClientModel.ClientResult GetNextResponse(global::System.ClientModel.Primitives.PipelineMessage message) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBodyOfTAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBodyOfTAsync.cs index 6e4695ff104..661f6cc8fcf 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBodyOfTAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/InheritedNextLinkInBodyOfTAsync.cs @@ -14,11 +14,13 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResultOfT : global::System.ClientModel.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -31,7 +33,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.ClientResult result = await this.GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextCat; if ((nextPageUri == null)) { yield break; @@ -42,7 +44,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); @@ -55,7 +57,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, protected override async global::System.Collections.Generic.IAsyncEnumerable GetValuesFromPageAsync(global::System.ClientModel.ClientResult page) { - foreach (global::Sample.Models.Cat item in ((global::Sample.Models.Page)page).Cats) + foreach (global::Sample.Models.Cat item in global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).Cats) { yield return item; await global::System.Threading.Tasks.Task.Yield(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBody.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBody.cs index 72bdccbd446..36da54c549c 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBody.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBody.cs @@ -13,11 +13,13 @@ namespace Sample internal partial class CatClientGetCatsCollectionResult : global::System.ClientModel.Primitives.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -30,7 +32,7 @@ public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global: global::System.ClientModel.ClientResult result = this.GetNextResponse(message); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NestedNext?.NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NestedNext?.NextCat; if ((nextPageUri == null)) { yield break; @@ -41,7 +43,7 @@ public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global: public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NestedNext?.NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NestedNext?.NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBodyAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBodyAsync.cs index cbcf2b4ee78..3a6e9a751fe 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBodyAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBodyAsync.cs @@ -14,11 +14,13 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResult : global::System.ClientModel.Primitives.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -31,7 +33,7 @@ public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, gl global::System.ClientModel.ClientResult result = await this.GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NestedNext?.NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NestedNext?.NextCat; if ((nextPageUri == null)) { yield break; @@ -42,7 +44,7 @@ public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, gl public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NestedNext?.NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NestedNext?.NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBodyOfT.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBodyOfT.cs index d5b0b644c1d..6b60b50a4e6 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBodyOfT.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBodyOfT.cs @@ -13,11 +13,13 @@ namespace Sample internal partial class CatClientGetCatsCollectionResultOfT : global::System.ClientModel.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -30,7 +32,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, glob global::System.ClientModel.ClientResult result = this.GetNextResponse(message); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NestedNext?.NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NestedNext?.NextCat; if ((nextPageUri == null)) { yield break; @@ -41,7 +43,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, glob public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NestedNext?.NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NestedNext?.NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); @@ -54,7 +56,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, glob protected override global::System.Collections.Generic.IEnumerable GetValuesFromPage(global::System.ClientModel.ClientResult page) { - return ((global::Sample.Models.Page)page).NestedItems?.Cats; + return global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NestedItems?.Cats; } private global::System.ClientModel.ClientResult GetNextResponse(global::System.ClientModel.Primitives.PipelineMessage message) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBodyOfTAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBodyOfTAsync.cs index b4fce30004f..5116da15bfd 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBodyOfTAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NestedNextLinkInBodyOfTAsync.cs @@ -14,11 +14,13 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResultOfT : global::System.ClientModel.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -31,7 +33,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.ClientResult result = await this.GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NestedNext?.NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NestedNext?.NextCat; if ((nextPageUri == null)) { yield break; @@ -42,7 +44,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NestedNext?.NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NestedNext?.NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); @@ -55,7 +57,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, protected override async global::System.Collections.Generic.IAsyncEnumerable GetValuesFromPageAsync(global::System.ClientModel.ClientResult page) { - foreach (global::Sample.Models.Cat item in ((global::Sample.Models.Page)page).NestedItems?.Cats) + foreach (global::Sample.Models.Cat item in global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NestedItems?.Cats) { yield return item; await global::System.Threading.Tasks.Task.Yield(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBody.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBody.cs index 6c2fbb79051..ef0384b8aba 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBody.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBody.cs @@ -13,11 +13,13 @@ namespace Sample internal partial class CatClientGetCatsCollectionResult : global::System.ClientModel.Primitives.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -30,7 +32,7 @@ public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global: global::System.ClientModel.ClientResult result = this.GetNextResponse(message); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextCat; if ((nextPageUri == null)) { yield break; @@ -41,7 +43,7 @@ public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global: public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyAsync.cs index 86d2adfba2f..2e9105837db 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyAsync.cs @@ -14,11 +14,13 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResult : global::System.ClientModel.Primitives.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -31,7 +33,7 @@ public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, gl global::System.ClientModel.ClientResult result = await this.GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextCat; if ((nextPageUri == null)) { yield break; @@ -42,7 +44,7 @@ public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, gl public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyOfT.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyOfT.cs index ea15f35606f..8d5c1ae1ded 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyOfT.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyOfT.cs @@ -13,11 +13,13 @@ namespace Sample internal partial class CatClientGetCatsCollectionResultOfT : global::System.ClientModel.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -30,7 +32,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, glob global::System.ClientModel.ClientResult result = this.GetNextResponse(message); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextCat; if ((nextPageUri == null)) { yield break; @@ -41,7 +43,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, glob public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); @@ -54,7 +56,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, glob protected override global::System.Collections.Generic.IEnumerable GetValuesFromPage(global::System.ClientModel.ClientResult page) { - return ((global::Sample.Models.Page)page).Cats; + return global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).Cats; } private global::System.ClientModel.ClientResult GetNextResponse(global::System.ClientModel.Primitives.PipelineMessage message) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyOfTAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyOfTAsync.cs index 6e4695ff104..661f6cc8fcf 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyOfTAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyOfTAsync.cs @@ -14,11 +14,13 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResultOfT : global::System.ClientModel.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -31,7 +33,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.ClientResult result = await this.GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextCat; if ((nextPageUri == null)) { yield break; @@ -42,7 +44,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); @@ -55,7 +57,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, protected override async global::System.Collections.Generic.IAsyncEnumerable GetValuesFromPageAsync(global::System.ClientModel.ClientResult page) { - foreach (global::Sample.Models.Cat item in ((global::Sample.Models.Page)page).Cats) + foreach (global::Sample.Models.Cat item in global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).Cats) { yield return item; await global::System.Threading.Tasks.Task.Yield(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeader.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeader.cs index 98111f0fd7a..ed5c1a9ec95 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeader.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeader.cs @@ -12,11 +12,13 @@ namespace Sample internal partial class CatClientGetCatsCollectionResult : global::System.ClientModel.Primitives.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeaderAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeaderAsync.cs index 75cf7c29d55..5bc9f54447e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeaderAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeaderAsync.cs @@ -13,11 +13,13 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResult : global::System.ClientModel.Primitives.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeaderOfT.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeaderOfT.cs index 5cd6bbca8d5..d15681fbda5 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeaderOfT.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeaderOfT.cs @@ -13,11 +13,13 @@ namespace Sample internal partial class CatClientGetCatsCollectionResultOfT : global::System.ClientModel.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -56,7 +58,7 @@ public CatClientGetCatsCollectionResultOfT(global::Sample.CatClient client, glob protected override global::System.Collections.Generic.IEnumerable GetValuesFromPage(global::System.ClientModel.ClientResult page) { - return ((global::Sample.Models.Page)page).Cats; + return global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).Cats; } private global::System.ClientModel.ClientResult GetNextResponse(global::System.ClientModel.Primitives.PipelineMessage message) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeaderOfTAsync.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeaderOfTAsync.cs index 7f242e4f7a5..1187be9f8ba 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeaderOfTAsync.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInHeaderOfTAsync.cs @@ -14,11 +14,13 @@ namespace Sample internal partial class CatClientGetCatsAsyncCollectionResultOfT : global::System.ClientModel.AsyncCollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -57,7 +59,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Sample.CatClient client, protected override async global::System.Collections.Generic.IAsyncEnumerable GetValuesFromPageAsync(global::System.ClientModel.ClientResult page) { - foreach (global::Sample.Models.Cat item in ((global::Sample.Models.Page)page).Cats) + foreach (global::Sample.Models.Cat item in global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).Cats) { yield return item; await global::System.Threading.Tasks.Task.Yield(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NormalizedDateTimeReinjectedParameterFiltersNextLinkArguments.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NormalizedDateTimeReinjectedParameterFiltersNextLinkArguments.cs index 980673e8da3..eea2d2be048 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NormalizedDateTimeReinjectedParameterFiltersNextLinkArguments.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NormalizedDateTimeReinjectedParameterFiltersNextLinkArguments.cs @@ -13,13 +13,15 @@ namespace Sample internal partial class CatClientGetCatsCollectionResult : global::System.ClientModel.Primitives.CollectionResult { private readonly global::Sample.CatClient _client; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions; private readonly global::System.DateTimeOffset _startsOn; private readonly string _startsOn0; private readonly global::System.ClientModel.Primitives.RequestOptions _options; - public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.DateTimeOffset startsOn, string startsOn0, global::System.ClientModel.Primitives.RequestOptions options) + public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global::System.ClientModel.Primitives.ModelReaderWriterOptions modelReaderWriterOptions, global::System.DateTimeOffset startsOn, string startsOn0, global::System.ClientModel.Primitives.RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _startsOn = startsOn; _startsOn0 = startsOn0; _options = options; @@ -34,7 +36,7 @@ public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global: global::System.ClientModel.ClientResult result = this.GetNextResponse(message); yield return result; - nextPageUri = ((global::Sample.Models.Page)result).NextCat; + nextPageUri = global::Sample.Models.Page.FromClientResult(result, _modelReaderWriterOptions).NextCat; if ((nextPageUri == null)) { yield break; @@ -45,7 +47,7 @@ public CatClientGetCatsCollectionResult(global::Sample.CatClient client, global: public override global::System.ClientModel.ContinuationToken GetContinuationToken(global::System.ClientModel.ClientResult page) { - global::System.Uri nextPage = ((global::Sample.Models.Page)page).NextCat; + global::System.Uri nextPage = global::Sample.Models.Page.FromClientResult(page, _modelReaderWriterOptions).NextCat; if ((nextPage != null)) { return global::System.ClientModel.ContinuationToken.FromBytes(global::System.BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/ModelSerializationExtensionsDefinitionTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/ModelSerializationExtensionsDefinitionTests.cs index f3dea8438e8..1a691f8f4d5 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/ModelSerializationExtensionsDefinitionTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/ModelSerializationExtensionsDefinitionTests.cs @@ -777,18 +777,56 @@ public void ValidateWriteFileBinaryContentMethod() } // Snapshot of the helper that decides whether nested models are read through ModelReaderWriter: - // only when proxies are registered and the context can build the requested type. + // only when proxies are registered and the context can build the requested type. The per-type cache + // keeps the context lookup off the hot path after the first read of each nested model type. [Test] public void ValidateShouldReadThroughProxyMethod() { MockHelpers.LoadMockGenerator(); var definition = new ModelSerializationExtensionsDefinition(); - var writer = new TypeProviderWriter(new FilteredMethodsTypeProvider(definition, name => name == "ShouldReadThroughProxy")); - var file = writer.Write(); + var helper = new TypeProviderWriter(new FilteredMethodsTypeProvider(definition, name => name == "ShouldReadThroughProxy")).Write(); + var cache = new TypeProviderWriter(definition.NestedTypes.Single(t => t.Name == "ProxyReadEligibility")).Write(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), helper.Content); + Assert.AreEqual(Helpers.GetExpectedFromFile("Cache"), cache.Content); + } + + // Snapshot of the helper that reads dual-format nested models with XML options while keeping registered proxies. + [Test] + public void ValidateToXmlOptionsMethod() + { + var xmlModel = InputFactory.Model( + "TestXmlModel", + usage: InputModelTypeUsage.Input | InputModelTypeUsage.Xml, + properties: [InputFactory.Property("Name", InputPrimitiveType.String)]); + MockHelpers.LoadMockGenerator(inputModels: () => [xmlModel]); + + var definition = new ModelSerializationExtensionsDefinition(); + var file = new TypeProviderWriter(new FilteredMethodsTypeProvider(definition, name => name == "ToXmlOptions")).Write(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); + } + + // Clients build their options from the configured model proxies once, keeping the shared wire options + // when none are configured. + [Test] + public void ValidateToWireOptionsMethod() + { + MockHelpers.LoadMockGenerator(); + + var definition = new ModelSerializationExtensionsDefinition(); + var file = new TypeProviderWriter(new FilteredMethodsTypeProvider(definition, name => name == "ToWireOptions")).Write(); Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); } + [Test] + public void ToWireOptionsMethodIsNotGeneratedWithoutModelProxies() + { + MockHelpers.LoadMockGenerator(clientPipelineApi: ClientPipelineWithoutModelProxies.Instance); + + var definition = new ModelSerializationExtensionsDefinition(); + Assert.IsFalse(definition.Methods.Any(m => m.Signature.Name == "ToWireOptions")); + } + // Snapshot of the WriteObjectValue switch — verifies nested JSON models resolve registered proxies // and keep writing the model directly when none are registered. [Test] diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateShouldReadThroughProxyMethod(Cache).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateShouldReadThroughProxyMethod(Cache).cs new file mode 100644 index 00000000000..66d380b87fb --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateShouldReadThroughProxyMethod(Cache).cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace Sample +{ + private static class ProxyReadEligibility + { + private static int s_state; + + public static bool IsBuildable(global::System.ClientModel.Primitives.ModelReaderWriterContext context) + { + int state = s_state; + if ((state == 0)) + { + state = context.TryGetTypeBuilder(typeof(T), out _) ? 1 : 2; + s_state = state; + } + return (state == 1); + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateShouldReadThroughProxyMethod.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateShouldReadThroughProxyMethod.cs index e70a14b5b81..49aa131b96c 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateShouldReadThroughProxyMethod.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateShouldReadThroughProxyMethod.cs @@ -2,16 +2,15 @@ #nullable disable -using System; using System.ClientModel.Primitives; namespace Sample { public partial class ModelSerializationExtensions { - public static bool ShouldReadThroughProxy(this global::System.ClientModel.Primitives.ModelReaderWriterOptions options, global::System.Type modelType, global::System.ClientModel.Primitives.ModelReaderWriterContext context) + public static bool ShouldReadThroughProxy(this global::System.ClientModel.Primitives.ModelReaderWriterOptions options, global::System.ClientModel.Primitives.ModelReaderWriterContext context) { - return ((options.Proxies.Count > 0) && context.TryGetTypeBuilder(modelType, out _)); + return ((options.Proxies.Count > 0) && global::Sample.ModelSerializationExtensions.ProxyReadEligibility.IsBuildable(context)); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateToWireOptionsMethod.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateToWireOptionsMethod.cs new file mode 100644 index 00000000000..3d0eabe2502 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateToWireOptionsMethod.cs @@ -0,0 +1,26 @@ +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Collections.Generic; + +namespace Sample +{ + public partial class ModelSerializationExtensions + { + public static global::System.ClientModel.Primitives.ModelReaderWriterOptions ToWireOptions(this global::System.Collections.Generic.IList modelProxies) + { + if ((modelProxies.Count == 0)) + { + return WireOptions; + } + global::System.ClientModel.Primitives.ModelReaderWriterOptions options = new global::System.ClientModel.Primitives.ModelReaderWriterOptions("W"); + foreach (global::System.ClientModel.Primitives.ModelProxy proxy in modelProxies) + { + options.Proxies.Add(proxy); + } + return options; + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateToXmlOptionsMethod.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateToXmlOptionsMethod.cs new file mode 100644 index 00000000000..020c1db5bf2 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/ModelSerializationExtensionsDefinitionTests/ValidateToXmlOptionsMethod.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace Sample +{ + public partial class ModelSerializationExtensions + { + public static global::System.ClientModel.Primitives.ModelReaderWriterOptions ToXmlOptions(this global::System.ClientModel.Primitives.ModelReaderWriterOptions options) + { + if ((options.Format == "X")) + { + return options; + } + global::System.ClientModel.Primitives.ModelReaderWriterOptions xmlOptions = new global::System.ClientModel.Primitives.ModelReaderWriterOptions("X"); + foreach (global::System.ClientModel.Primitives.ModelProxy proxy in options.Proxies) + { + xmlOptions.Proxies.Add(proxy); + } + return xmlOptions; + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/MrwSerializationTypeDefinitionTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/MrwSerializationTypeDefinitionTests.cs index 800a7b3e4de..ad707aa7cf2 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/MrwSerializationTypeDefinitionTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/MrwSerializationTypeDefinitionTests.cs @@ -22,14 +22,15 @@ namespace Microsoft.TypeSpec.Generator.ClientModel.Tests.Providers.MrwSerializat { internal class MrwSerializationTypeDefinitionTests { - internal static (ModelProvider Model, MrwSerializationTypeDefinition Serialization) CreateModelAndSerialization(InputModelType inputModel, bool isRootInput = true, bool isRootOutput = true) + internal static (ModelProvider Model, MrwSerializationTypeDefinition Serialization) CreateModelAndSerialization(InputModelType inputModel, bool isRootInput = true, bool isRootOutput = true, ClientPipelineApi? clientPipelineApi = null) { MockHelpers.LoadMockGenerator(); var model = ScmCodeModelGenerator.Instance.TypeFactory.CreateModel(inputModel); var generator = MockHelpers.LoadMockGenerator( inputModels: () => [inputModel], createSerializationsCore: (inputType, typeProvider) => - inputType is InputModelType modelType ? [new MrwSerializationTypeDefinition(modelType, (typeProvider as ModelProvider)!)] : []); + inputType is InputModelType modelType ? [new MrwSerializationTypeDefinition(modelType, (typeProvider as ModelProvider)!)] : [], + clientPipelineApi: clientPipelineApi); if (isRootInput) { generator.Object.TypeFactory.RootInputModels.Add(inputModel); @@ -1526,7 +1527,7 @@ public void TestBuildToBinaryContentMethod_DualFormatModel_MethodGenerated() { // Create a model that supports both JSON and XML var inputModel = InputFactory.Model("DualFormatModel", usage: InputModelTypeUsage.Json | InputModelTypeUsage.Xml); - var (model, serialization) = CreateModelAndSerialization(inputModel); + var (model, serialization) = CreateModelAndSerialization(inputModel, clientPipelineApi: ClientPipelineWithoutModelProxies.Instance); // Verify the ToBinaryContent method is generated var toBinaryContentMethod = serialization.Methods.FirstOrDefault(m => @@ -1544,7 +1545,7 @@ public void TestBuildToBinaryContentMethod_JsonOnlyModel_MethodNotGenerated() { // Create a model that supports only JSON var inputModel = InputFactory.Model("JsonOnlyModel", usage: InputModelTypeUsage.Json); - var (model, serialization) = CreateModelAndSerialization(inputModel); + var (model, serialization) = CreateModelAndSerialization(inputModel, clientPipelineApi: ClientPipelineWithoutModelProxies.Instance); // Verify the ToBinaryContent method is NOT generated var toBinaryContentMethod = serialization.Methods.FirstOrDefault(m => @@ -1552,6 +1553,8 @@ public void TestBuildToBinaryContentMethod_JsonOnlyModel_MethodNotGenerated() m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Internal)); Assert.IsNull(toBinaryContentMethod, "ToBinaryContent method should not be generated for JSON-only models"); + Assert.IsFalse(serialization.Methods.Any(m => m.Signature.Name == "FromClientResult"), + "FromClientResult should not be generated when the client options don't carry model proxies"); } [Test] @@ -1559,7 +1562,7 @@ public void TestBuildToBinaryContentMethod_XmlOnlyModel_MethodNotGenerated() { // Create a model that supports only XML var inputModel = InputFactory.Model("XmlOnlyModel", usage: InputModelTypeUsage.Xml); - var (model, serialization) = CreateModelAndSerialization(inputModel); + var (model, serialization) = CreateModelAndSerialization(inputModel, clientPipelineApi: ClientPipelineWithoutModelProxies.Instance); // Verify the ToBinaryContent method is NOT generated var toBinaryContentMethod = serialization.Methods.FirstOrDefault(m => @@ -1569,6 +1572,51 @@ public void TestBuildToBinaryContentMethod_XmlOnlyModel_MethodNotGenerated() Assert.IsNull(toBinaryContentMethod, "ToBinaryContent method should not be generated for XML-only models"); } + // Clients convert request bodies and responses with the options built from their configured model proxies, + // which the cast operators can't take. + [TestCase(InputModelTypeUsage.Json)] + [TestCase(InputModelTypeUsage.Xml)] + [TestCase(InputModelTypeUsage.Json | InputModelTypeUsage.Xml)] + public void ModelProxyConversionsTakeClientOptions(InputModelTypeUsage usage) + { + var inputModel = InputFactory.Model("TestModel", usage: usage); + var (_, serialization) = CreateModelAndSerialization(inputModel); + + var conversions = serialization.Methods + .Where(m => m.Signature.Name is "ToBinaryContent" or "FromClientResult") + .ToArray(); + Assert.AreEqual(2, conversions.Length); + Assert.IsTrue(conversions.All(m => m.Signature.Parameters[^1].Type.Equals(typeof(ModelReaderWriterOptions)))); + + using var writer = new CodeWriter(); + foreach (var conversion in conversions) + { + writer.WriteMethod(conversion); + } + Assert.AreEqual(Helpers.GetExpectedFromFile(usage.ToString().Replace(", ", ",")), writer.ToString(false)); + } + + [Test] + public void DerivedModelProxyConversionsHideBaseConversions() + { + var baseModel = InputFactory.Model("BaseModel"); + var derivedModel = InputFactory.Model("DerivedModel", baseModel: baseModel); + var generator = MockHelpers.LoadMockGenerator( + inputModels: () => [baseModel, derivedModel], + createSerializationsCore: (inputType, typeProvider) => + inputType is InputModelType modelType ? [new MrwSerializationTypeDefinition(modelType, (typeProvider as ModelProvider)!)] : []); + generator.Object.TypeFactory.RootInputModels.UnionWith([baseModel, derivedModel]); + generator.Object.TypeFactory.RootOutputModels.UnionWith([baseModel, derivedModel]); + + var derived = ScmCodeModelGenerator.Instance.TypeFactory.CreateModel(derivedModel)!; + var conversions = derived.SerializationProviders.OfType().Single().Methods + .Where(m => m.Signature.Name is "ToBinaryContent" or "FromClientResult") + .ToArray(); + + Assert.AreEqual(2, conversions.Length); + Assert.IsTrue(conversions.All(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.New))); + } + [Test] public void TestDeserializationOfByteArrayPropertyUsesGetBytesFromBase64() { diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DeserializationTests/NestedModelReadsRouteThroughModelProxies.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DeserializationTests/NestedModelReadsRouteThroughModelProxies.cs index 2bb01040ff6..4ae6a5a48ee 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DeserializationTests/NestedModelReadsRouteThroughModelProxies.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DeserializationTests/NestedModelReadsRouteThroughModelProxies.cs @@ -27,7 +27,7 @@ public partial class TestModel : global::System.ClientModel.Primitives.IJsonMode { if (prop.NameEquals("nested"u8)) { - nested = options.ShouldReadThroughProxy(typeof(global::Sample.Models.NestedModel), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.NestedModel.DeserializeNestedModel(prop.Value, options); + nested = options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.NestedModel.DeserializeNestedModel(prop.Value, options); continue; } if (prop.NameEquals("nestedList"u8)) @@ -39,7 +39,7 @@ public partial class TestModel : global::System.ClientModel.Primitives.IJsonMode global::System.Collections.Generic.List array = new global::System.Collections.Generic.List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(options.ShouldReadThroughProxy(typeof(global::Sample.Models.NestedModel), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(item.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.NestedModel.DeserializeNestedModel(item, options)); + array.Add(options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(item.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.NestedModel.DeserializeNestedModel(item, options)); } nestedList = array; continue; @@ -53,7 +53,7 @@ public partial class TestModel : global::System.ClientModel.Primitives.IJsonMode global::System.Collections.Generic.Dictionary dictionary = new global::System.Collections.Generic.Dictionary(); foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(typeof(global::Sample.Models.NestedModel), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.NestedModel.DeserializeNestedModel(prop0.Value, options)); + dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.NestedModel.DeserializeNestedModel(prop0.Value, options)); } nestedDictionary = dictionary; continue; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeArrayProperties.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeArrayProperties.cs index d235ba2f7fe..b3aa16f1ee0 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeArrayProperties.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeArrayProperties.cs @@ -36,7 +36,7 @@ public partial class DynamicModel global::System.Collections.Generic.List array = new global::System.Collections.Generic.List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(options.ShouldReadThroughProxy(typeof(global::Sample.Models.Cat), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(item.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(item, options)); + array.Add(options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(item.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(item, options)); } cats = array; continue; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeDictionaryProperties.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeDictionaryProperties.cs index 0f23a3358e0..8009ff19b72 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeDictionaryProperties.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeDictionaryProperties.cs @@ -36,7 +36,7 @@ public partial class DynamicModel global::System.Collections.Generic.Dictionary dictionary = new global::System.Collections.Generic.Dictionary(); foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(typeof(global::Sample.Models.Cat), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(prop0.Value, options)); + dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(prop0.Value, options)); } cats = dictionary; continue; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelPropertyType.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelPropertyType.cs index 4906ed18a98..a82c4aa434f 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelPropertyType.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelPropertyType.cs @@ -31,7 +31,7 @@ public partial class DynamicModel { continue; } - cat = options.ShouldReadThroughProxy(typeof(global::Sample.Models.Cat), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(prop.Value, options); + cat = options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(prop.Value, options); continue; } if (prop.NameEquals("anything"u8)) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelWithAP.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelWithAP.cs index 56119499181..af5ba38c354 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelWithAP.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/DynamicModelSerializationTests/DeserializeModelWithAP.cs @@ -32,7 +32,7 @@ public partial class DynamicModel { continue; } - cats = options.ShouldReadThroughProxy(typeof(global::Sample.Models.Cat), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(prop.Value, options); + cats = options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(prop.Value, options); continue; } switch (prop.Value.ValueKind) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/MrwSerializationTypeDefinitionTests/ModelProxyConversionsTakeClientOptions(Json).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/MrwSerializationTypeDefinitionTests/ModelProxyConversionsTakeClientOptions(Json).cs new file mode 100644 index 00000000000..6fa27714559 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/MrwSerializationTypeDefinitionTests/ModelProxyConversionsTakeClientOptions(Json).cs @@ -0,0 +1,14 @@ +internal global::System.ClientModel.BinaryContent ToBinaryContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) +{ + return global::System.ClientModel.BinaryContent.Create(this, options); +} +internal static global::Sample.Models.TestModel FromClientResult(global::System.ClientModel.ClientResult result, global::System.ClientModel.Primitives.ModelReaderWriterOptions options) +{ + global::System.ClientModel.Primitives.PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(global::Sample.SampleContext.Default)) + { + return global::System.ClientModel.Primitives.ModelReaderWriter.Read(response.Content, options, global::Sample.SampleContext.Default); + } + using global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(response.Content, global::Sample.ModelSerializationExtensions.JsonDocumentOptions); + return global::Sample.Models.TestModel.DeserializeTestModel(document.RootElement, options); +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/MrwSerializationTypeDefinitionTests/ModelProxyConversionsTakeClientOptions(Json,Xml).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/MrwSerializationTypeDefinitionTests/ModelProxyConversionsTakeClientOptions(Json,Xml).cs new file mode 100644 index 00000000000..1036495ee0e --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/MrwSerializationTypeDefinitionTests/ModelProxyConversionsTakeClientOptions(Json,Xml).cs @@ -0,0 +1,30 @@ +internal global::System.ClientModel.BinaryContent ToBinaryContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) +{ + return global::System.ClientModel.BinaryContent.Create(this, options); +} +internal static global::Sample.Models.TestModel FromClientResult(global::System.ClientModel.ClientResult result, global::System.ClientModel.Primitives.ModelReaderWriterOptions options) +{ + global::System.ClientModel.Primitives.PipelineResponse response = result.GetRawResponse(); + + if ((response.Headers.TryGetValue("Content-Type", out string value) && value.StartsWith("application/json", global::System.StringComparison.OrdinalIgnoreCase))) + { + if (options.ShouldReadThroughProxy(global::Sample.SampleContext.Default)) + { + return global::System.ClientModel.Primitives.ModelReaderWriter.Read(response.Content, options, global::Sample.SampleContext.Default); + } + using global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(response.Content, global::Sample.ModelSerializationExtensions.JsonDocumentOptions); + return global::Sample.Models.TestModel.DeserializeTestModel(document.RootElement, options); + } + + if (options.ShouldReadThroughProxy(global::Sample.SampleContext.Default)) + { + return global::System.ClientModel.Primitives.ModelReaderWriter.Read(response.Content, options.ToXmlOptions(), global::Sample.SampleContext.Default); + } + using global::System.IO.Stream stream = response.ContentStream; + if ((stream == null)) + { + return default; + } + + return global::Sample.Models.TestModel.DeserializeTestModel(global::System.Xml.Linq.XElement.Load(stream, global::System.Xml.Linq.LoadOptions.PreserveWhitespace), options); +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/MrwSerializationTypeDefinitionTests/ModelProxyConversionsTakeClientOptions(Xml).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/MrwSerializationTypeDefinitionTests/ModelProxyConversionsTakeClientOptions(Xml).cs new file mode 100644 index 00000000000..d3531f5d42f --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/MrwSerializationTypeDefinitionTests/ModelProxyConversionsTakeClientOptions(Xml).cs @@ -0,0 +1,19 @@ +internal global::System.ClientModel.BinaryContent ToBinaryContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) +{ + return global::System.ClientModel.BinaryContent.Create(this, options); +} +internal static global::Sample.Models.TestModel FromClientResult(global::System.ClientModel.ClientResult result, global::System.ClientModel.Primitives.ModelReaderWriterOptions options) +{ + global::System.ClientModel.Primitives.PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(global::Sample.SampleContext.Default)) + { + return global::System.ClientModel.Primitives.ModelReaderWriter.Read(response.Content, options, global::Sample.SampleContext.Default); + } + using global::System.IO.Stream stream = response.ContentStream; + if ((stream == null)) + { + return default; + } + + return global::Sample.Models.TestModel.DeserializeTestModel(global::System.Xml.Linq.XElement.Load(stream, global::System.Xml.Linq.LoadOptions.PreserveWhitespace), options); +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodHandlesNestedModel.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodHandlesNestedModel.cs index e521a30a63d..b243a6a489a 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodHandlesNestedModel.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodHandlesNestedModel.cs @@ -41,7 +41,7 @@ public partial class OuterModel : global::System.ClientModel.Primitives.IPersist string localName = child.Name.LocalName; if ((localName == "inner")) { - inner = options.ShouldReadThroughProxy(typeof(global::Sample.Models.InnerModel), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(child.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.InnerModel.DeserializeInnerModel(child, options); + inner = options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(child.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.InnerModel.DeserializeInnerModel(child, options); continue; } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodRoutesDualFormatNestedModelOnlyForXmlFormat.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodReadsDualFormatNestedModelWithXmlOptions.cs similarity index 83% rename from packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodRoutesDualFormatNestedModelOnlyForXmlFormat.cs rename to packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodReadsDualFormatNestedModelWithXmlOptions.cs index 81ab46a1ebe..f5928d857cf 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodRoutesDualFormatNestedModelOnlyForXmlFormat.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/TestData/XmlDeserializationTests/XmlDeserializationMethodReadsDualFormatNestedModelWithXmlOptions.cs @@ -41,7 +41,7 @@ public partial class OuterModel : global::System.ClientModel.Primitives.IPersist string localName = child.Name.LocalName; if ((localName == "inner")) { - inner = ((options.Format == "X") && options.ShouldReadThroughProxy(typeof(global::Sample.Models.InnerModel), global::Sample.SampleContext.Default)) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(child.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.InnerModel.DeserializeInnerModel(child, options); + inner = options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(child.GetUtf8Bytes(), options.ToXmlOptions(), global::Sample.SampleContext.Default) : global::Sample.Models.InnerModel.DeserializeInnerModel(child, options); continue; } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/XmlDeserializationTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/XmlDeserializationTests.cs index bd38cb35a91..2bf6cdbbf53 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/XmlDeserializationTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/XmlDeserializationTests.cs @@ -142,10 +142,10 @@ public async Task XmlDeserializationMethodHandlesNestedModel() Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); } - // A nested model that also supports JSON reports "J" for the wire format, so it is only read through - // ModelReaderWriter proxies when the options explicitly request XML. + // A nested model that also supports JSON reports "J" for the wire format, so an XML-only parent reads it through + // ModelReaderWriter with XML options that keep the registered proxies, regardless of whether it was read with "W" or "X". [Test] - public void XmlDeserializationMethodRoutesDualFormatNestedModelOnlyForXmlFormat() + public void XmlDeserializationMethodReadsDualFormatNestedModelWithXmlOptions() { var innerModel = InputFactory.Model( "InnerModel", diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs index 7d13a87b25a..d24276b9b11 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs @@ -1605,10 +1605,16 @@ public void PagingAndStreamingArgumentsFollowCreateRequestSignature( construction.Type.ToString().Contains("CollectionResult", StringComparison.Ordinal)).ArgumentList!.Arguments; CollectionAssert.AreEqual( new[] { omitPathParameter ? "null" : "targetDBName", "sourceIPAddress", "cancellationToken.ToRequestOptions()" }, - arguments.Skip(isStreaming ? 0 : 1).Select(argument => argument.Expression.ToString())); + arguments.Skip(isStreaming ? 0 : 2).Select(argument => argument.Expression.ToString())); CollectionAssert.AreEqual( omitPathParameter ? new[] { "targetDBName", "sourceIPAddress", "options" } : new string?[] { null, null, null }, - arguments.Skip(isStreaming ? 0 : 1).Select(argument => argument.NameColon?.Name.Identifier.ValueText)); + arguments.Skip(isStreaming ? 0 : 2).Select(argument => argument.NameColon?.Name.Identifier.ValueText)); + if (!isStreaming) + { + CollectionAssert.AreEqual( + new[] { "this", "_modelReaderWriterOptions" }, + arguments.Take(2).Select(argument => argument.Expression.ToString())); + } } } @@ -4463,7 +4469,7 @@ public void ConvenienceMethod_DualFormatModel_XmlContentType_CallsToBinaryConten var serviceMethod = InputFactory.BasicServiceMethod("UpdateModel", operation, parameters: [methodBodyParam]); var inputClient = InputFactory.Client("TestClient", methods: [serviceMethod]); - MockHelpers.LoadMockGenerator(clients: () => [inputClient], inputModels: () => [dualFormatModel]); + MockHelpers.LoadMockGenerator(clients: () => [inputClient], inputModels: () => [dualFormatModel], clientPipelineApi: ClientPipelineWithoutModelProxies.Instance); var client = ScmCodeModelGenerator.Instance.TypeFactory.CreateClient(inputClient); var methodCollection = new ScmMethodProviderCollection(serviceMethod, client!); @@ -4496,7 +4502,7 @@ public void ConvenienceMethod_DualFormatModel_JsonContentType_CallsToBinaryConte var serviceMethod = InputFactory.BasicServiceMethod("UpdateModel", operation, parameters: [methodBodyParam]); var inputClient = InputFactory.Client("TestClient", methods: [serviceMethod]); - MockHelpers.LoadMockGenerator(clients: () => [inputClient], inputModels: () => [dualFormatModel]); + MockHelpers.LoadMockGenerator(clients: () => [inputClient], inputModels: () => [dualFormatModel], clientPipelineApi: ClientPipelineWithoutModelProxies.Instance); var client = ScmCodeModelGenerator.Instance.TypeFactory.CreateClient(inputClient); var methodCollection = new ScmMethodProviderCollection(serviceMethod, client!); @@ -4529,7 +4535,7 @@ public void ConvenienceMethod_SingleFormatModel_UsesImplicitOperator() var serviceMethod = InputFactory.BasicServiceMethod("UpdateModel", operation, parameters: [methodBodyParam]); var inputClient = InputFactory.Client("TestClient", methods: [serviceMethod]); - MockHelpers.LoadMockGenerator(clients: () => [inputClient], inputModels: () => [jsonOnlyModel]); + MockHelpers.LoadMockGenerator(clients: () => [inputClient], inputModels: () => [jsonOnlyModel], clientPipelineApi: ClientPipelineWithoutModelProxies.Instance); var client = ScmCodeModelGenerator.Instance.TypeFactory.CreateClient(inputClient); var methodCollection = new ScmMethodProviderCollection(serviceMethod, client!); @@ -4545,6 +4551,46 @@ public void ConvenienceMethod_SingleFormatModel_UsesImplicitOperator() Assert.AreEqual(expectedMethodBody, methodBody); } + // With model proxies on the client options, convenience methods convert request bodies and responses with the + // client's options because the cast operators can't take them. + [TestCase(InputModelTypeUsage.Json, "application/json")] + [TestCase(InputModelTypeUsage.Json | InputModelTypeUsage.Xml, "application/json")] + [TestCase(InputModelTypeUsage.Json | InputModelTypeUsage.Xml, "application/xml")] + [TestCase(InputModelTypeUsage.Xml, "application/xml")] + public void ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(InputModelTypeUsage format, string contentType) + { + var model = InputFactory.Model("TestModel", usage: InputModelTypeUsage.Input | InputModelTypeUsage.Output | format); + var bodyParam = InputFactory.BodyParameter("body", model, isRequired: true); + var methodBodyParam = InputFactory.MethodParameter("body", model, isRequired: true, location: InputRequestLocation.Body); + + var operation = InputFactory.Operation( + "UpdateModel", + parameters: [bodyParam], + requestMediaTypes: [contentType], + responses: [InputFactory.OperationResponse([200], bodytype: model, contentTypes: [contentType])]); + + var serviceMethod = InputFactory.BasicServiceMethod( + "UpdateModel", + operation, + parameters: [methodBodyParam], + response: InputFactory.ServiceMethodResponse(model, null)); + var inputClient = InputFactory.Client("TestClient", methods: [serviceMethod]); + + MockHelpers.LoadMockGenerator(clients: () => [inputClient], inputModels: () => [model]); + + var client = ScmCodeModelGenerator.Instance.TypeFactory.CreateClient(inputClient); + var methodCollection = new ScmMethodProviderCollection(serviceMethod, client!); + + var convenienceMethod = methodCollection.FirstOrDefault(m => + m.Signature.Parameters.All(p => p.Name != "options") && + m.Signature.Name == "UpdateModel"); + + Assert.IsNotNull(convenienceMethod); + var methodBody = convenienceMethod!.BodyStatements!.ToDisplayString(); + var parameters = $"{format.ToString().Replace(", ", ",")},{contentType.Substring("application/".Length)}"; + Assert.AreEqual(Helpers.GetExpectedFromFile(parameters), methodBody); + } + [Test] public void ConvenienceMethod_XmlListBody_UsesXmlFromEnumerable() { diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ClientSettingsProviderTests/TestSettingsConstructor_WithStringEndpoint.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ClientSettingsProviderTests/TestSettingsConstructor_WithStringEndpoint.cs index b34c34bc1fa..4ab54d222b4 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ClientSettingsProviderTests/TestSettingsConstructor_WithStringEndpoint.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ClientSettingsProviderTests/TestSettingsConstructor_WithStringEndpoint.cs @@ -11,6 +11,7 @@ namespace Sample public partial class TestClient { private readonly global::System.Uri _endpoint; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions = global::Sample.ModelSerializationExtensions.WireOptions; protected TestClient() { @@ -33,6 +34,7 @@ internal TestClient(global::System.ClientModel.Primitives.AuthenticationPolicy a { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } + _modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); } public TestClient(string endpoint = default, global::Sample.TestClientOptions options) : this(null, endpoint, options) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ClientSettingsProviderTests/TestSettingsConstructor_WithUrlEndpoint.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ClientSettingsProviderTests/TestSettingsConstructor_WithUrlEndpoint.cs index ad76eb92090..acbdcefda30 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ClientSettingsProviderTests/TestSettingsConstructor_WithUrlEndpoint.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ClientSettingsProviderTests/TestSettingsConstructor_WithUrlEndpoint.cs @@ -11,6 +11,7 @@ namespace Sample public partial class TestClient { private readonly global::System.Uri _endpoint; + private readonly global::System.ClientModel.Primitives.ModelReaderWriterOptions _modelReaderWriterOptions = global::Sample.ModelSerializationExtensions.WireOptions; protected TestClient() { @@ -35,6 +36,7 @@ internal TestClient(global::System.ClientModel.Primitives.AuthenticationPolicy a { Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty()); } + _modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); } public TestClient(global::System.Uri endpoint, global::Sample.TestClientOptions options) : this(null, endpoint, options) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(kind,value).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(kind,value).cs index 854a11ca5db..f860a34ec88 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(kind,value).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(kind,value).cs @@ -54,9 +54,9 @@ internal static void SerializePetsUnion(global::System.Text.Json.Utf8JsonWriter switch (discriminator.GetString()) { case "feline": - return options.ShouldReadThroughProxy(typeof(global::Sample.Models.Cat), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(discriminator0, options); + return options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(discriminator0, options); case "canine": - return options.ShouldReadThroughProxy(typeof(global::Sample.Models.Dog), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Dog.DeserializeDog(discriminator0, options); + return options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Dog.DeserializeDog(discriminator0, options); default: throw new global::System.Text.Json.JsonException("Unknown discriminator value for union 'pets'."); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(type,data).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(type,data).cs index 77698d8e418..46cf97bc6fd 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(type,data).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/DiscriminatedUnionSerializationTests/WritesContextualEnvelopeSerialization(type,data).cs @@ -54,9 +54,9 @@ internal static void SerializePetsUnion(global::System.Text.Json.Utf8JsonWriter switch (discriminator.GetString()) { case "feline": - return options.ShouldReadThroughProxy(typeof(global::Sample.Models.Cat), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(discriminator0, options); + return options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Cat.DeserializeCat(discriminator0, options); case "canine": - return options.ShouldReadThroughProxy(typeof(global::Sample.Models.Dog), global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Dog.DeserializeDog(discriminator0, options); + return options.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, global::Sample.SampleContext.Default) : global::Sample.Models.Dog.DeserializeDog(discriminator0, options); default: throw new global::System.Text.Json.JsonException("Unknown discriminator value for union 'pets'."); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/CombinedMissingOperationParamsAndNonBodyModelParams.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/CombinedMissingOperationParamsAndNonBodyModelParams.cs index d8060badd68..848561f6e4a 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/CombinedMissingOperationParamsAndNonBodyModelParams.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/CombinedMissingOperationParamsAndNonBodyModelParams.cs @@ -1,4 +1,4 @@ global::Sample.Argument.AssertNotNullOrEmpty(id, nameof(id)); global::Sample.Argument.AssertNotNull(request, nameof(request)); -return this.TestOp(id, request.XCustomHeader, request, request.QueryParam, options: cancellationToken.ToRequestOptions()); +return this.TestOp(id, request.XCustomHeader, request.ToBinaryContent(_modelReaderWriterOptions), request.QueryParam, options: cancellationToken.ToRequestOptions()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Json,Xml,json).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Json,Xml,json).cs new file mode 100644 index 00000000000..1687bb6124c --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Json,Xml,json).cs @@ -0,0 +1,5 @@ +global::Sample.Argument.AssertNotNull(body, nameof(body)); + +using global::System.ClientModel.BinaryContent content = body.ToBinaryContent(_modelReaderWriterOptions); +global::System.ClientModel.ClientResult result = this.UpdateModel(content, cancellationToken.ToRequestOptions()); +return global::System.ClientModel.ClientResult.FromValue(global::Sample.Models.TestModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Json,Xml,xml).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Json,Xml,xml).cs new file mode 100644 index 00000000000..b49f5985306 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Json,Xml,xml).cs @@ -0,0 +1,5 @@ +global::Sample.Argument.AssertNotNull(body, nameof(body)); + +using global::System.ClientModel.BinaryContent content = body.ToBinaryContent(_modelReaderWriterOptions.ToXmlOptions()); +global::System.ClientModel.ClientResult result = this.UpdateModel(content, cancellationToken.ToRequestOptions()); +return global::System.ClientModel.ClientResult.FromValue(global::Sample.Models.TestModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Json,json).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Json,json).cs new file mode 100644 index 00000000000..2ed794103f1 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Json,json).cs @@ -0,0 +1,4 @@ +global::Sample.Argument.AssertNotNull(body, nameof(body)); + +global::System.ClientModel.ClientResult result = this.UpdateModel(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); +return global::System.ClientModel.ClientResult.FromValue(global::Sample.Models.TestModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Xml,xml).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Xml,xml).cs new file mode 100644 index 00000000000..2ed794103f1 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(Xml,xml).cs @@ -0,0 +1,4 @@ +global::Sample.Argument.AssertNotNull(body, nameof(body)); + +global::System.ClientModel.ClientResult result = this.UpdateModel(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); +return global::System.ClientModel.ClientResult.FromValue(global::Sample.Models.TestModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_XmlListResponse_UsesXDocumentDeserialization.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_XmlListResponse_UsesXDocumentDeserialization.cs index 53582ce29b2..bc8e8eb9165 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_XmlListResponse_UsesXDocumentDeserialization.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_XmlListResponse_UsesXDocumentDeserialization.cs @@ -9,7 +9,7 @@ global::System.Collections.Generic.List array = new global::System.Collections.Generic.List(); foreach (var item in element.Elements("SignedIdentifier")) { - array.Add(global::Sample.Models.SignedIdentifier.DeserializeSignedIdentifier(item, global::Sample.ModelSerializationExtensions.WireOptions)); + array.Add(_modelReaderWriterOptions.ShouldReadThroughProxy(global::Sample.SampleContext.Default) ? global::System.ClientModel.Primitives.ModelReaderWriter.Read(item.GetUtf8Bytes(), _modelReaderWriterOptions, global::Sample.SampleContext.Default) : global::Sample.Models.SignedIdentifier.DeserializeSignedIdentifier(item, _modelReaderWriterOptions)); } value = array; } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/JsonLinesResponseGeneratesUnbufferedAsyncStreamingResult.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/JsonLinesResponseGeneratesUnbufferedAsyncStreamingResult.cs index 499ecf8a0f9..ebe5d46dd1c 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/JsonLinesResponseGeneratesUnbufferedAsyncStreamingResult.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/JsonLinesResponseGeneratesUnbufferedAsyncStreamingResult.cs @@ -2,5 +2,5 @@ { using global::System.ClientModel.Primitives.PipelineMessage message = this.CreateReceiveRequest(cancellationToken.ToRequestOptions()); message.BufferResponse = false; - return global::System.ClientModel.AsyncStreamingResult.CreateJsonLines(await Pipeline.ProcessMessageAsync(message, cancellationToken.ToRequestOptions()).ConfigureAwait(false), data => global::System.ClientModel.Primitives.ModelReaderWriter.Read(data, global::Sample.ModelSerializationExtensions.WireOptions, global::Sample.SampleContext.Default), cancellationToken); + return global::System.ClientModel.AsyncStreamingResult.CreateJsonLines(await Pipeline.ProcessMessageAsync(message, cancellationToken.ToRequestOptions()).ConfigureAwait(false), data => global::System.ClientModel.Primitives.ModelReaderWriter.Read(data, _modelReaderWriterOptions, global::Sample.SampleContext.Default), cancellationToken); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingOmitsOnlyContinuationToken(False).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingOmitsOnlyContinuationToken(False).cs index 42f3a465600..7bf1a12c6c1 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingOmitsOnlyContinuationToken(False).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingOmitsOnlyContinuationToken(False).cs @@ -1,16 +1,16 @@ public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(string token, string filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, token, filter, options); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, token, filter, options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(string token, string filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, token, filter, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, token, filter, options); } public virtual global::System.ClientModel.CollectionResult GetItems(string token = default, string filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, token, filter, cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(string token = default, string filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, token, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, token, filter, cancellationToken.ToRequestOptions()); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingOmitsOnlyContinuationToken(True).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingOmitsOnlyContinuationToken(True).cs index 5e2afbc8181..cec84475a17 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingOmitsOnlyContinuationToken(True).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingOmitsOnlyContinuationToken(True).cs @@ -1,16 +1,16 @@ public virtual global::System.ClientModel.Primitives.CollectionResult GetItems(string filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsCollectionResult(this, default, filter, options); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, default, filter, options); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(string filter, global::System.ClientModel.Primitives.RequestOptions options) { - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, default, filter, options); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, default, filter, options); } public virtual global::System.ClientModel.CollectionResult GetItems(string filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, default, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, default, filter, cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(string filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, default, filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, default, filter, cancellationToken.ToRequestOptions()); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag(CustomMethods).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag(CustomMethods).cs index 41bd43ab2b5..e51d961adb7 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag(CustomMethods).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag(CustomMethods).cs @@ -2,23 +2,23 @@ { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsCollectionResult(this, options.Token, options.Filter, requestOptions); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, options.Token, options.Filter, requestOptions); } public partial global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(global::Sample.Models.GetItemsOptions options, global::System.ClientModel.Primitives.RequestOptions requestOptions) { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, options.Token, options.Filter, requestOptions); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, options.Token, options.Filter, requestOptions); } public partial global::System.ClientModel.CollectionResult GetItems(global::Sample.Models.GetItemsOptions options, global::System.Threading.CancellationToken cancellationToken) { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, options.Token, options.Filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, options.Token, options.Filter, cancellationToken.ToRequestOptions()); } public partial global::System.ClientModel.AsyncCollectionResult GetItemsAsync(global::Sample.Models.GetItemsOptions options, global::System.Threading.CancellationToken cancellationToken) { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, options.Token, options.Filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, options.Token, options.Filter, cancellationToken.ToRequestOptions()); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag(False).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag(False).cs index 575e297bfed..36c5ab81eb1 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag(False).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag(False).cs @@ -2,23 +2,23 @@ { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsCollectionResult(this, token, options.Filter, requestOptions); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, token, options.Filter, requestOptions); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(global::Sample.Models.GetItemsOptions options, string token, global::System.ClientModel.Primitives.RequestOptions requestOptions) { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, token, options.Filter, requestOptions); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, token, options.Filter, requestOptions); } public virtual global::System.ClientModel.CollectionResult GetItems(global::Sample.Models.GetItemsOptions options, string token = default, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, token, options.Filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, token, options.Filter, cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(global::Sample.Models.GetItemsOptions options, string token = default, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, token, options.Filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, token, options.Filter, cancellationToken.ToRequestOptions()); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag(True).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag(True).cs index 8d6eda54023..5ab10504c91 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag(True).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag(True).cs @@ -2,23 +2,23 @@ { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsCollectionResult(this, default, options.Filter, requestOptions); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, default, options.Filter, requestOptions); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(global::Sample.Models.GetItemsOptions options, global::System.ClientModel.Primitives.RequestOptions requestOptions) { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, default, options.Filter, requestOptions); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, default, options.Filter, requestOptions); } public virtual global::System.ClientModel.CollectionResult GetItems(global::Sample.Models.GetItemsOptions options, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, default, options.Filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, default, options.Filter, cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(global::Sample.Models.GetItemsOptions options, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, default, options.Filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, default, options.Filter, cancellationToken.ToRequestOptions()); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag.cs index 8de338d62ca..b57ec56eb50 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NextLinkPagingPreservesContinuationTokenOptionsBag.cs @@ -2,23 +2,23 @@ { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsCollectionResult(this, options.Token, options.Filter, requestOptions); + return new global::Sample.TestClientGetItemsCollectionResult(this, _modelReaderWriterOptions, options.Token, options.Filter, requestOptions); } public virtual global::System.ClientModel.Primitives.AsyncCollectionResult GetItemsAsync(global::Sample.Models.GetItemsOptions options, global::System.ClientModel.Primitives.RequestOptions requestOptions) { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, options.Token, options.Filter, requestOptions); + return new global::Sample.TestClientGetItemsAsyncCollectionResult(this, _modelReaderWriterOptions, options.Token, options.Filter, requestOptions); } public virtual global::System.ClientModel.CollectionResult GetItems(global::Sample.Models.GetItemsOptions options, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsCollectionResultOfT(this, options.Token, options.Filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsCollectionResultOfT(this, _modelReaderWriterOptions, options.Token, options.Filter, cancellationToken.ToRequestOptions()); } public virtual global::System.ClientModel.AsyncCollectionResult GetItemsAsync(global::Sample.Models.GetItemsOptions options, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(options, nameof(options)); - return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, options.Token, options.Filter, cancellationToken.ToRequestOptions()); + return new global::Sample.TestClientGetItemsAsyncCollectionResultOfT(this, _modelReaderWriterOptions, options.Token, options.Filter, cancellationToken.ToRequestOptions()); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/OptionsBagOverride_PagingMethodExpandsBagForCollectionResult(Convenience).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/OptionsBagOverride_PagingMethodExpandsBagForCollectionResult(Convenience).cs index ae6b47c9f0a..67b9c3f3561 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/OptionsBagOverride_PagingMethodExpandsBagForCollectionResult(Convenience).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/OptionsBagOverride_PagingMethodExpandsBagForCollectionResult(Convenience).cs @@ -1,3 +1,3 @@ global::Sample.Argument.AssertNotNull(options, nameof(options)); -return new global::Sample.TestClientGetWidgetsCollectionResultOfT(this, options.Id, options.Filter, cancellationToken.ToRequestOptions()); +return new global::Sample.TestClientGetWidgetsCollectionResultOfT(this, _modelReaderWriterOptions, options.Id, options.Filter, cancellationToken.ToRequestOptions()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/OptionsBagOverride_PagingMethodExpandsBagForCollectionResult(Protocol).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/OptionsBagOverride_PagingMethodExpandsBagForCollectionResult(Protocol).cs index 632c2a8b25f..fd8a6b4d4a5 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/OptionsBagOverride_PagingMethodExpandsBagForCollectionResult(Protocol).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/OptionsBagOverride_PagingMethodExpandsBagForCollectionResult(Protocol).cs @@ -1,3 +1,3 @@ global::Sample.Argument.AssertNotNull(options, nameof(options)); -return new global::Sample.TestClientGetWidgetsCollectionResult(this, options.Id, options.Filter, requestOptions); +return new global::Sample.TestClientGetWidgetsCollectionResult(this, _modelReaderWriterOptions, options.Id, options.Filter, requestOptions); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestHelpers/ClientPipelineWithoutModelProxies.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestHelpers/ClientPipelineWithoutModelProxies.cs new file mode 100644 index 00000000000..e6b7d1b7c8d --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestHelpers/ClientPipelineWithoutModelProxies.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.TypeSpec.Generator.ClientModel.Providers; +using Microsoft.TypeSpec.Generator.Expressions; + +namespace Microsoft.TypeSpec.Generator.ClientModel.Tests +{ + /// + /// A System.ClientModel pipeline whose client options don't carry model proxies, matching pipelines such as + /// Azure.Core's that generate the pre-proxy client conversions. + /// + internal record ClientPipelineWithoutModelProxies : ClientPipelineProvider + { + private static ClientPipelineApi? _instance; + internal static new ClientPipelineApi Instance => _instance ??= new ClientPipelineWithoutModelProxies(Empty); + + public ClientPipelineWithoutModelProxies(ValueExpression original) : base(original) + { + } + + public override ValueExpression? GetModelProxies(ValueExpression clientOptions) => null; + + public override ClientPipelineApi FromExpression(ValueExpression expression) + => new ClientPipelineWithoutModelProxies(expression); + + public override ClientPipelineApi ToExpression() => this; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Local.Tests/ModelProxyTests.cs b/packages/http-client-csharp/generator/TestProjects/Local.Tests/ModelProxyTests.cs index eae6be1bd88..7656aa34afb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local.Tests/ModelProxyTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local.Tests/ModelProxyTests.cs @@ -2,10 +2,16 @@ // Licensed under the MIT License. using System; +using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Linq; +using System.Net; +using System.Net.Http; +using System.Text; using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; using NUnit.Framework; using SampleTypeSpec; @@ -124,17 +130,107 @@ public void NestedXmlModelReadsUseRegisteredProxy() Assert.AreEqual(1, itemProxy.ReadCount); } + // An XML-only parent read with "W" resolves its own format to XML but passes "W" to nested reads. A nested model that + // also supports JSON reports "J" for "W", so its proxy-aware read must still request XML and keep the proxies. + [TestCase("W")] + [TestCase("X")] + public void NestedDualFormatXmlModelReadsUseRegisteredProxy(string format) + { + var proxy = new TreeXmlProxy(); + var options = new ModelReaderWriterOptions(format); + options.Proxies.Add(proxy); + + var container = ModelReaderWriter.Read( + BinaryData.FromString("""treet1105"""), + options, + SampleTypeSpecContext.Default); + + Assert.AreEqual("proxy:t1", container!.Tree.Id); + Assert.AreEqual(5, container.Tree.Age); + Assert.AreEqual(1, proxy.ReadCount); + Assert.AreEqual("X", proxy.LastReadFormat); + } + + // Clients copy the proxies configured on their options into the options they use for every operation. + [Test] + public void ClientResponsesUseClientOptionsProxies() + { + var proxy = new ThingProxy(); + var handler = new StubHandler(("""{"name":"hi"}""", "application/json")); + + var result = CreateClient(handler, proxy).SayHi("head", "query"); + + Assert.AreEqual("proxy:hi", result.Value.Rename); + Assert.AreEqual(1, proxy.ReadCount); + } + + [Test] + public void ClientRequestBodiesUseClientOptionsProxies() + { + var proxy = new ThingProxy(); + var handler = new StubHandler(("""{"requiredModel":{"name":"response"}}""", "application/json")); + var action = new RoundTripModel( + "value", + 1, + [], + new Dictionary(), + CreateThing("request"), + BinaryData.FromString("1"), + new Dictionary(), + new ModelWithRequiredNullableProperties(null, null, null), + BinaryData.FromBytes([1])); + + var result = CreateClient(handler, proxy).HelloAgain("p2", "p1", action); + + using var request = JsonDocument.Parse(handler.RequestBodies.Single()); + Assert.AreEqual("request", request.RootElement.GetProperty("requiredModel").GetProperty("proxied").GetString()); + Assert.AreEqual("proxy:response", result.Value.RequiredModel.Rename); + Assert.AreEqual(1, proxy.WriteCount); + Assert.AreEqual(1, proxy.ReadCount); + } + + [Test] + public void ClientPagesUseClientOptionsProxies() + { + var proxy = new ThingProxy(); + var handler = new StubHandler( + ("""{"things":[{"name":"first"}],"next":"https://example.com/link?page=2"}""", "application/json"), + ("""{"things":[{"name":"second"}]}""", "application/json")); + + var items = CreateClient(handler, proxy).GetWithNextLink().ToArray(); + + Assert.AreEqual(new[] { "proxy:first", "proxy:second" }, items.Select(item => item.Rename)); + Assert.AreEqual(2, handler.RequestBodies.Count); + } + + [Test] + public void SubClientResponsesUseClientOptionsProxies() + { + var proxy = new TreeXmlProxy(); + var handler = new StubHandler(("""treet1105""", "application/xml")); + + var result = CreateClient(handler, proxy).GetPlantOperationsClient().GetTree(); + + Assert.AreEqual("proxy:t1", result.Value.Id); + Assert.AreEqual(1, proxy.ReadCount); + Assert.AreEqual("X", proxy.LastReadFormat); + } + [Test] public void ShouldReadThroughProxyRequiresProxiesAndBuildableModel() { var options = new ModelReaderWriterOptions("W"); - Assert.IsFalse(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default)); + Assert.IsFalse(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)); options.Proxies.Add(new ThingProxy()); - Assert.IsTrue(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default)); - // Internal models are not registered in the generated context, so they keep the static deserializer. - Assert.IsFalse(options.ShouldReadThroughProxy(typeof(PageThing), SampleTypeSpecContext.Default)); + // Repeat each check so the cached per-type answer is exercised as well as the first lookup. + for (int i = 0; i < 2; i++) + { + Assert.IsTrue(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)); + // Internal models are not registered in the generated context, so they keep the static deserializer. + Assert.IsFalse(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)); + } } private static ModelReaderWriterOptions CreateOptions(ModelProxy proxy) @@ -144,6 +240,40 @@ private static ModelReaderWriterOptions CreateOptions(ModelProxy proxy) return options; } + private static SampleTypeSpecClient CreateClient(StubHandler handler, ModelProxy proxy) + { + var options = new SampleTypeSpecClientOptions + { + Transport = new HttpClientPipelineTransport(new HttpClient(handler)), + RetryPolicy = new ClientRetryPolicy(0) + }; + options.ModelProxies.Add(proxy); + return new SampleTypeSpecClient(new Uri("https://example.com"), new ApiKeyCredential("key"), options); + } + + // Returns the queued responses in order and records each request body. + private sealed class StubHandler : HttpMessageHandler + { + private readonly Queue<(string Content, string ContentType)> _responses; + + public StubHandler(params (string Content, string ContentType)[] responses) + { + _responses = new(responses); + } + + public List RequestBodies { get; } = []; + + protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) + { + RequestBodies.Add(request.Content?.ReadAsStringAsync(cancellationToken).GetAwaiter().GetResult() ?? string.Empty); + var (content, contentType) = _responses.Dequeue(); + return new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent(content, Encoding.UTF8, contentType) }; + } + + protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) + => Task.FromResult(Send(request, cancellationToken)); + } + // PageThing is internal, so it is not buildable through the generated context; read it through its own interface. private static PageThing ReadPage(string json, ModelReaderWriterOptions options) => ((IPersistableModel)new PageThing([])).Create(BinaryData.FromString(json), options)!; @@ -191,16 +321,28 @@ protected override XmlItem Transform(XmlItem model) } } + private sealed class TreeXmlProxy : XmlTestProxy + { + protected override Tree Transform(Tree model) + { + model.Id = $"proxy:{model.Id}"; + return model; + } + } + // XML proxies only implement IPersistableModel; reads transform the model's own XML deserialization. private abstract class XmlTestProxy : ModelProxy where T : class { public int ReadCount { get; private set; } + public string? LastReadFormat { get; private set; } + protected abstract T Transform(T model); public override T Create(BinaryData data, ModelReaderWriterOptions options) { ReadCount++; + LastReadFormat = options.Format; return Transform(ModelReaderWriter.Read(data, ModelReaderWriterOptions.Xml, SampleTypeSpecContext.Default)!); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/Sample-TypeSpec.tsp b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/Sample-TypeSpec.tsp index 6ef2fff1458..3138c18007c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/Sample-TypeSpec.tsp +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/Sample-TypeSpec.tsp @@ -1012,6 +1012,20 @@ interface PlantOperations { @header contentType: "application/json"; @body body: Tree; }; + + @doc("Get an XML-only container that nests a tree, which also supports JSON") + @get + @route("/tree/container") + getTreeContainer(): { + @header contentType: "application/xml"; + @body body: XmlTreeContainer; + }; +} + +@doc("XML-only container whose nested tree also supports JSON") +model XmlTreeContainer { + @doc("The nested tree") + tree: Tree; } model MetricsClientParams { diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/AnimalOperations.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/AnimalOperations.cs index 10d3b31fe97..d2ea05ce7ea 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/AnimalOperations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/AnimalOperations.cs @@ -17,6 +17,7 @@ namespace SampleTypeSpec public partial class AnimalOperations { private readonly Uri _endpoint; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions = ModelSerializationExtensions.WireOptions; /// Initializes a new instance of AnimalOperations for mocking. protected AnimalOperations() @@ -25,11 +26,13 @@ protected AnimalOperations() /// Initializes a new instance of AnimalOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. + /// /// Service endpoint. - internal AnimalOperations(ClientPipeline pipeline, Uri endpoint) + internal AnimalOperations(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) { _endpoint = endpoint; Pipeline = pipeline; + _modelReaderWriterOptions = modelReaderWriterOptions; } /// The HTTP pipeline for sending and receiving REST requests and responses. @@ -86,8 +89,8 @@ public virtual ClientResult UpdatePetAsAnimal(Animal animal, Cancellatio { Argument.AssertNotNull(animal, nameof(animal)); - ClientResult result = UpdatePetAsAnimal(animal, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Animal)result, result.GetRawResponse()); + ClientResult result = UpdatePetAsAnimal(animal.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(Animal.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Update a pet as an animal. @@ -99,8 +102,8 @@ public virtual async Task> UpdatePetAsAnimalAsync(Animal an { Argument.AssertNotNull(animal, nameof(animal)); - ClientResult result = await UpdatePetAsAnimalAsync(animal, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Animal)result, result.GetRawResponse()); + ClientResult result = await UpdatePetAsAnimalAsync(animal.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(Animal.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -154,8 +157,8 @@ public virtual ClientResult UpdateDogAsAnimal(Animal animal, Cancellatio { Argument.AssertNotNull(animal, nameof(animal)); - ClientResult result = UpdateDogAsAnimal(animal, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Animal)result, result.GetRawResponse()); + ClientResult result = UpdateDogAsAnimal(animal.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(Animal.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Update a dog as an animal. @@ -167,8 +170,8 @@ public virtual async Task> UpdateDogAsAnimalAsync(Animal an { Argument.AssertNotNull(animal, nameof(animal)); - ClientResult result = await UpdateDogAsAnimalAsync(animal, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Animal)result, result.GetRawResponse()); + ClientResult result = await UpdateDogAsAnimalAsync(animal.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(Animal.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllAsyncCollectionResult.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllAsyncCollectionResult.cs index 34376fe00e5..379d60c8ceb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllAsyncCollectionResult.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllAsyncCollectionResult.cs @@ -17,15 +17,18 @@ internal partial class ExperimentalSamplesGetAllAsyncCollectionResult : AsyncCol #pragma warning disable SAMPLE0009 // This generated code depends on experimental functionality. private readonly ExperimentalSamples _client; #pragma warning restore SAMPLE0009 // This generated code depends on experimental functionality. + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of ExperimentalSamplesGetAllAsyncCollectionResult, which is used to iterate over the pages of a collection. /// The ExperimentalSamples client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. #pragma warning disable SAMPLE0009 // This generated code depends on experimental functionality. - public ExperimentalSamplesGetAllAsyncCollectionResult(ExperimentalSamples client, RequestOptions options) + public ExperimentalSamplesGetAllAsyncCollectionResult(ExperimentalSamples client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } #pragma warning restore SAMPLE0009 // This generated code depends on experimental functionality. diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllAsyncCollectionResultOfT.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllAsyncCollectionResultOfT.cs index bf4c99cfe70..628f8dd7899 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllAsyncCollectionResultOfT.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllAsyncCollectionResultOfT.cs @@ -18,15 +18,18 @@ internal partial class ExperimentalSamplesGetAllAsyncCollectionResultOfT : Async #pragma warning disable SAMPLE0009 // This generated code depends on experimental functionality. private readonly ExperimentalSamples _client; #pragma warning restore SAMPLE0009 // This generated code depends on experimental functionality. + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of ExperimentalSamplesGetAllAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. /// The ExperimentalSamples client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. #pragma warning disable SAMPLE0009 // This generated code depends on experimental functionality. - public ExperimentalSamplesGetAllAsyncCollectionResultOfT(ExperimentalSamples client, RequestOptions options) + public ExperimentalSamplesGetAllAsyncCollectionResultOfT(ExperimentalSamples client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } #pragma warning restore SAMPLE0009 // This generated code depends on experimental functionality. @@ -57,7 +60,7 @@ public override ContinuationToken GetContinuationToken(ClientResult page) #pragma warning disable SAMPLE0009 // This generated code depends on experimental functionality. protected override async IAsyncEnumerable GetValuesFromPageAsync(ClientResult page) { - foreach (PreviewDetails item in ((PagePreviewDetails)page).Items) + foreach (PreviewDetails item in PagePreviewDetails.FromClientResult(page, _modelReaderWriterOptions).Items) { yield return item; await Task.Yield(); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllCollectionResult.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllCollectionResult.cs index 240b3bec9f6..2b7962ff33b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllCollectionResult.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllCollectionResult.cs @@ -16,15 +16,18 @@ internal partial class ExperimentalSamplesGetAllCollectionResult : CollectionRes #pragma warning disable SAMPLE0009 // This generated code depends on experimental functionality. private readonly ExperimentalSamples _client; #pragma warning restore SAMPLE0009 // This generated code depends on experimental functionality. + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of ExperimentalSamplesGetAllCollectionResult, which is used to iterate over the pages of a collection. /// The ExperimentalSamples client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. #pragma warning disable SAMPLE0009 // This generated code depends on experimental functionality. - public ExperimentalSamplesGetAllCollectionResult(ExperimentalSamples client, RequestOptions options) + public ExperimentalSamplesGetAllCollectionResult(ExperimentalSamples client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } #pragma warning restore SAMPLE0009 // This generated code depends on experimental functionality. diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllCollectionResultOfT.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllCollectionResultOfT.cs index 2b869e36f2b..162465f2e08 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllCollectionResultOfT.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/ExperimentalSamplesGetAllCollectionResultOfT.cs @@ -17,15 +17,18 @@ internal partial class ExperimentalSamplesGetAllCollectionResultOfT : Collection #pragma warning disable SAMPLE0009 // This generated code depends on experimental functionality. private readonly ExperimentalSamples _client; #pragma warning restore SAMPLE0009 // This generated code depends on experimental functionality. + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of ExperimentalSamplesGetAllCollectionResultOfT, which is used to iterate over the pages of a collection. /// The ExperimentalSamples client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. #pragma warning disable SAMPLE0009 // This generated code depends on experimental functionality. - public ExperimentalSamplesGetAllCollectionResultOfT(ExperimentalSamples client, RequestOptions options) + public ExperimentalSamplesGetAllCollectionResultOfT(ExperimentalSamples client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } #pragma warning restore SAMPLE0009 // This generated code depends on experimental functionality. @@ -56,7 +59,7 @@ public override ContinuationToken GetContinuationToken(ClientResult page) #pragma warning disable SAMPLE0009 // This generated code depends on experimental functionality. protected override IEnumerable GetValuesFromPage(ClientResult page) { - return ((PagePreviewDetails)page).Items; + return PagePreviewDetails.FromClientResult(page, _modelReaderWriterOptions).Items; } #pragma warning restore SAMPLE0009 // This generated code depends on experimental functionality. diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResult.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResult.cs index 5f90a26974c..cacfc0b1846 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResult.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResult.cs @@ -16,16 +16,19 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResult : AsyncCollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _token; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResult, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResult(SampleTypeSpecClient client, string token, RequestOptions options) + public SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResult(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, string token, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _token = token; _options = options; } @@ -41,7 +44,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() ClientResult result = await GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextToken = ((ListWithContinuationTokenResult)result).NextToken; + nextToken = ListWithContinuationTokenResult.FromClientResult(result, _modelReaderWriterOptions).NextToken; if (string.IsNullOrEmpty(nextToken)) { yield break; @@ -55,7 +58,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - string nextPage = ((ListWithContinuationTokenResult)page).NextToken; + string nextPage = ListWithContinuationTokenResult.FromClientResult(page, _modelReaderWriterOptions).NextToken; if (!string.IsNullOrEmpty(nextPage)) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResultOfT.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResultOfT.cs index 8d9683bab41..5507f61a871 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResultOfT.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResultOfT.cs @@ -16,16 +16,19 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResultOfT : AsyncCollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _token; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResultOfT(SampleTypeSpecClient client, string token, RequestOptions options) + public SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResultOfT(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, string token, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _token = token; _options = options; } @@ -41,7 +44,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() ClientResult result = await GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextToken = ((ListWithContinuationTokenResult)result).NextToken; + nextToken = ListWithContinuationTokenResult.FromClientResult(result, _modelReaderWriterOptions).NextToken; if (string.IsNullOrEmpty(nextToken)) { yield break; @@ -55,7 +58,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - string nextPage = ((ListWithContinuationTokenResult)page).NextToken; + string nextPage = ListWithContinuationTokenResult.FromClientResult(page, _modelReaderWriterOptions).NextToken; if (!string.IsNullOrEmpty(nextPage)) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); @@ -71,7 +74,7 @@ public override ContinuationToken GetContinuationToken(ClientResult page) /// The values from the specified page. protected override async IAsyncEnumerable GetValuesFromPageAsync(ClientResult page) { - foreach (Thing item in ((ListWithContinuationTokenResult)page).Things) + foreach (Thing item in ListWithContinuationTokenResult.FromClientResult(page, _modelReaderWriterOptions).Things) { yield return item; await Task.Yield(); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenCollectionResult.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenCollectionResult.cs index da17822ee6c..d98eceba304 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenCollectionResult.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenCollectionResult.cs @@ -15,16 +15,19 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithContinuationTokenCollectionResult : CollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _token; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithContinuationTokenCollectionResult, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithContinuationTokenCollectionResult(SampleTypeSpecClient client, string token, RequestOptions options) + public SampleTypeSpecClientGetWithContinuationTokenCollectionResult(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, string token, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _token = token; _options = options; } @@ -40,7 +43,7 @@ public override IEnumerable GetRawPages() ClientResult result = GetNextResponse(message); yield return result; - nextToken = ((ListWithContinuationTokenResult)result).NextToken; + nextToken = ListWithContinuationTokenResult.FromClientResult(result, _modelReaderWriterOptions).NextToken; if (string.IsNullOrEmpty(nextToken)) { yield break; @@ -54,7 +57,7 @@ public override IEnumerable GetRawPages() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - string nextPage = ((ListWithContinuationTokenResult)page).NextToken; + string nextPage = ListWithContinuationTokenResult.FromClientResult(page, _modelReaderWriterOptions).NextToken; if (!string.IsNullOrEmpty(nextPage)) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenCollectionResultOfT.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenCollectionResultOfT.cs index ab20b9a9354..9c35772ecf1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenCollectionResultOfT.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenCollectionResultOfT.cs @@ -15,16 +15,19 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithContinuationTokenCollectionResultOfT : CollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _token; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithContinuationTokenCollectionResultOfT, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithContinuationTokenCollectionResultOfT(SampleTypeSpecClient client, string token, RequestOptions options) + public SampleTypeSpecClientGetWithContinuationTokenCollectionResultOfT(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, string token, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _token = token; _options = options; } @@ -40,7 +43,7 @@ public override IEnumerable GetRawPages() ClientResult result = GetNextResponse(message); yield return result; - nextToken = ((ListWithContinuationTokenResult)result).NextToken; + nextToken = ListWithContinuationTokenResult.FromClientResult(result, _modelReaderWriterOptions).NextToken; if (string.IsNullOrEmpty(nextToken)) { yield break; @@ -54,7 +57,7 @@ public override IEnumerable GetRawPages() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - string nextPage = ((ListWithContinuationTokenResult)page).NextToken; + string nextPage = ListWithContinuationTokenResult.FromClientResult(page, _modelReaderWriterOptions).NextToken; if (!string.IsNullOrEmpty(nextPage)) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); @@ -70,7 +73,7 @@ public override ContinuationToken GetContinuationToken(ClientResult page) /// The values from the specified page. protected override IEnumerable GetValuesFromPage(ClientResult page) { - return ((ListWithContinuationTokenResult)page).Things; + return ListWithContinuationTokenResult.FromClientResult(page, _modelReaderWriterOptions).Things; } /// Sends the request in the pipeline message and returns the response. diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResult.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResult.cs index d0de57b47ec..056ed8e2e30 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResult.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResult.cs @@ -16,16 +16,19 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResult : AsyncCollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _token; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResult, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResult(SampleTypeSpecClient client, string token, RequestOptions options) + public SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResult(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, string token, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _token = token; _options = options; } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResultOfT.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResultOfT.cs index e234c85759e..8527bab5937 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResultOfT.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResultOfT.cs @@ -16,16 +16,19 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResultOfT : AsyncCollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _token; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResultOfT(SampleTypeSpecClient client, string token, RequestOptions options) + public SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResultOfT(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, string token, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _token = token; _options = options; } @@ -73,7 +76,7 @@ public override ContinuationToken GetContinuationToken(ClientResult page) /// The values from the specified page. protected override async IAsyncEnumerable GetValuesFromPageAsync(ClientResult page) { - foreach (Thing item in ((ListWithContinuationTokenHeaderResponseResult)page).Things) + foreach (Thing item in ListWithContinuationTokenHeaderResponseResult.FromClientResult(page, _modelReaderWriterOptions).Things) { yield return item; await Task.Yield(); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResult.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResult.cs index 7e8c2afe4c8..153a4f10835 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResult.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResult.cs @@ -15,16 +15,19 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResult : CollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _token; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResult, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResult(SampleTypeSpecClient client, string token, RequestOptions options) + public SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResult(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, string token, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _token = token; _options = options; } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResultOfT.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResultOfT.cs index bc0cbbc2e7d..7f7b1a8c8cf 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResultOfT.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResultOfT.cs @@ -15,16 +15,19 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResultOfT : CollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly string _token; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResultOfT, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResultOfT(SampleTypeSpecClient client, string token, RequestOptions options) + public SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResultOfT(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, string token, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _token = token; _options = options; } @@ -72,7 +75,7 @@ public override ContinuationToken GetContinuationToken(ClientResult page) /// The values from the specified page. protected override IEnumerable GetValuesFromPage(ClientResult page) { - return ((ListWithContinuationTokenHeaderResponseResult)page).Things; + return ListWithContinuationTokenHeaderResponseResult.FromClientResult(page, _modelReaderWriterOptions).Things; } /// Sends the request in the pipeline message and returns the response. diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkAsyncCollectionResult.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkAsyncCollectionResult.cs index b1a35c06dc3..16b95fc0377 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkAsyncCollectionResult.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkAsyncCollectionResult.cs @@ -16,14 +16,17 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithNextLinkAsyncCollectionResult : AsyncCollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithNextLinkAsyncCollectionResult, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithNextLinkAsyncCollectionResult(SampleTypeSpecClient client, RequestOptions options) + public SampleTypeSpecClientGetWithNextLinkAsyncCollectionResult(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -38,7 +41,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() ClientResult result = await GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextPageUri = ((ListWithNextLinkResult)result).Next; + nextPageUri = ListWithNextLinkResult.FromClientResult(result, _modelReaderWriterOptions).Next; if (nextPageUri == null) { yield break; @@ -52,7 +55,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - Uri nextPage = ((ListWithNextLinkResult)page).Next; + Uri nextPage = ListWithNextLinkResult.FromClientResult(page, _modelReaderWriterOptions).Next; if (nextPage != null) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkAsyncCollectionResultOfT.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkAsyncCollectionResultOfT.cs index 77f0df84b9f..4d594a30cd3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkAsyncCollectionResultOfT.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkAsyncCollectionResultOfT.cs @@ -16,14 +16,17 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithNextLinkAsyncCollectionResultOfT : AsyncCollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithNextLinkAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithNextLinkAsyncCollectionResultOfT(SampleTypeSpecClient client, RequestOptions options) + public SampleTypeSpecClientGetWithNextLinkAsyncCollectionResultOfT(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -38,7 +41,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() ClientResult result = await GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - nextPageUri = ((ListWithNextLinkResult)result).Next; + nextPageUri = ListWithNextLinkResult.FromClientResult(result, _modelReaderWriterOptions).Next; if (nextPageUri == null) { yield break; @@ -52,7 +55,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - Uri nextPage = ((ListWithNextLinkResult)page).Next; + Uri nextPage = ListWithNextLinkResult.FromClientResult(page, _modelReaderWriterOptions).Next; if (nextPage != null) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); @@ -68,7 +71,7 @@ public override ContinuationToken GetContinuationToken(ClientResult page) /// The values from the specified page. protected override async IAsyncEnumerable GetValuesFromPageAsync(ClientResult page) { - foreach (Thing item in ((ListWithNextLinkResult)page).Things) + foreach (Thing item in ListWithNextLinkResult.FromClientResult(page, _modelReaderWriterOptions).Things) { yield return item; await Task.Yield(); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkCollectionResult.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkCollectionResult.cs index e9b516f5892..308c01b5cb5 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkCollectionResult.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkCollectionResult.cs @@ -15,14 +15,17 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithNextLinkCollectionResult : CollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithNextLinkCollectionResult, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithNextLinkCollectionResult(SampleTypeSpecClient client, RequestOptions options) + public SampleTypeSpecClientGetWithNextLinkCollectionResult(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -37,7 +40,7 @@ public override IEnumerable GetRawPages() ClientResult result = GetNextResponse(message); yield return result; - nextPageUri = ((ListWithNextLinkResult)result).Next; + nextPageUri = ListWithNextLinkResult.FromClientResult(result, _modelReaderWriterOptions).Next; if (nextPageUri == null) { yield break; @@ -51,7 +54,7 @@ public override IEnumerable GetRawPages() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - Uri nextPage = ((ListWithNextLinkResult)page).Next; + Uri nextPage = ListWithNextLinkResult.FromClientResult(page, _modelReaderWriterOptions).Next; if (nextPage != null) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkCollectionResultOfT.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkCollectionResultOfT.cs index 651d9e3487f..6ff9bfdaad7 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkCollectionResultOfT.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithNextLinkCollectionResultOfT.cs @@ -15,14 +15,17 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithNextLinkCollectionResultOfT : CollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithNextLinkCollectionResultOfT, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithNextLinkCollectionResultOfT(SampleTypeSpecClient client, RequestOptions options) + public SampleTypeSpecClientGetWithNextLinkCollectionResultOfT(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -37,7 +40,7 @@ public override IEnumerable GetRawPages() ClientResult result = GetNextResponse(message); yield return result; - nextPageUri = ((ListWithNextLinkResult)result).Next; + nextPageUri = ListWithNextLinkResult.FromClientResult(result, _modelReaderWriterOptions).Next; if (nextPageUri == null) { yield break; @@ -51,7 +54,7 @@ public override IEnumerable GetRawPages() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - Uri nextPage = ((ListWithNextLinkResult)page).Next; + Uri nextPage = ListWithNextLinkResult.FromClientResult(page, _modelReaderWriterOptions).Next; if (nextPage != null) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage.IsAbsoluteUri ? nextPage.AbsoluteUri : nextPage.OriginalString)); @@ -67,7 +70,7 @@ public override ContinuationToken GetContinuationToken(ClientResult page) /// The values from the specified page. protected override IEnumerable GetValuesFromPage(ClientResult page) { - return ((ListWithNextLinkResult)page).Things; + return ListWithNextLinkResult.FromClientResult(page, _modelReaderWriterOptions).Things; } /// Sends the request in the pipeline message and returns the response. diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingAsyncCollectionResult.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingAsyncCollectionResult.cs index da4c0c20dc0..0c467e33857 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingAsyncCollectionResult.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingAsyncCollectionResult.cs @@ -15,14 +15,17 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithPagingAsyncCollectionResult : AsyncCollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithPagingAsyncCollectionResult, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithPagingAsyncCollectionResult(SampleTypeSpecClient client, RequestOptions options) + public SampleTypeSpecClientGetWithPagingAsyncCollectionResult(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingAsyncCollectionResultOfT.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingAsyncCollectionResultOfT.cs index aa1a1cdf328..11b3d19cbdd 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingAsyncCollectionResultOfT.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingAsyncCollectionResultOfT.cs @@ -15,14 +15,17 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithPagingAsyncCollectionResultOfT : AsyncCollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithPagingAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithPagingAsyncCollectionResultOfT(SampleTypeSpecClient client, RequestOptions options) + public SampleTypeSpecClientGetWithPagingAsyncCollectionResultOfT(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -47,7 +50,7 @@ public override ContinuationToken GetContinuationToken(ClientResult page) /// The values from the specified page. protected override async IAsyncEnumerable GetValuesFromPageAsync(ClientResult page) { - foreach (Thing item in ((PageThing)page).Items) + foreach (Thing item in PageThing.FromClientResult(page, _modelReaderWriterOptions).Items) { yield return item; await Task.Yield(); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingCollectionResult.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingCollectionResult.cs index 42a964869c8..348ae2759b5 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingCollectionResult.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingCollectionResult.cs @@ -14,14 +14,17 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithPagingCollectionResult : CollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithPagingCollectionResult, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithPagingCollectionResult(SampleTypeSpecClient client, RequestOptions options) + public SampleTypeSpecClientGetWithPagingCollectionResult(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingCollectionResultOfT.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingCollectionResultOfT.cs index fb3d1444543..7cf2649300f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingCollectionResultOfT.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithPagingCollectionResultOfT.cs @@ -14,14 +14,17 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithPagingCollectionResultOfT : CollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithPagingCollectionResultOfT, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithPagingCollectionResultOfT(SampleTypeSpecClient client, RequestOptions options) + public SampleTypeSpecClientGetWithPagingCollectionResultOfT(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -46,7 +49,7 @@ public override ContinuationToken GetContinuationToken(ClientResult page) /// The values from the specified page. protected override IEnumerable GetValuesFromPage(ClientResult page) { - return ((PageThing)page).Items; + return PageThing.FromClientResult(page, _modelReaderWriterOptions).Items; } /// Sends the request in the pipeline message and returns the response. diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResult.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResult.cs index f41c7b3d264..e3389166c14 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResult.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResult.cs @@ -16,14 +16,17 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResult : AsyncCollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResult, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResult(SampleTypeSpecClient client, RequestOptions options) + public SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResult(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -38,7 +41,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() ClientResult result = await GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - string nextPageString = ((ListWithStringNextLinkResult)result).Next; + string nextPageString = ListWithStringNextLinkResult.FromClientResult(result, _modelReaderWriterOptions).Next; if (string.IsNullOrEmpty(nextPageString)) { yield break; @@ -53,7 +56,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - string nextPage = ((ListWithStringNextLinkResult)page).Next; + string nextPage = ListWithStringNextLinkResult.FromClientResult(page, _modelReaderWriterOptions).Next; if (!string.IsNullOrEmpty(nextPage)) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT.cs index 7f48abdf7f7..66f6e6203b6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT.cs @@ -16,14 +16,17 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT : AsyncCollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT(SampleTypeSpecClient client, RequestOptions options) + public SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -38,7 +41,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() ClientResult result = await GetNextResponseAsync(message).ConfigureAwait(false); yield return result; - string nextPageString = ((ListWithStringNextLinkResult)result).Next; + string nextPageString = ListWithStringNextLinkResult.FromClientResult(result, _modelReaderWriterOptions).Next; if (string.IsNullOrEmpty(nextPageString)) { yield break; @@ -53,7 +56,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - string nextPage = ((ListWithStringNextLinkResult)page).Next; + string nextPage = ListWithStringNextLinkResult.FromClientResult(page, _modelReaderWriterOptions).Next; if (!string.IsNullOrEmpty(nextPage)) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); @@ -69,7 +72,7 @@ public override ContinuationToken GetContinuationToken(ClientResult page) /// The values from the specified page. protected override async IAsyncEnumerable GetValuesFromPageAsync(ClientResult page) { - foreach (Thing item in ((ListWithStringNextLinkResult)page).Things) + foreach (Thing item in ListWithStringNextLinkResult.FromClientResult(page, _modelReaderWriterOptions).Things) { yield return item; await Task.Yield(); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkCollectionResult.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkCollectionResult.cs index 1da5ae62fa4..408882693e6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkCollectionResult.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkCollectionResult.cs @@ -15,14 +15,17 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithStringNextLinkCollectionResult : CollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithStringNextLinkCollectionResult, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithStringNextLinkCollectionResult(SampleTypeSpecClient client, RequestOptions options) + public SampleTypeSpecClientGetWithStringNextLinkCollectionResult(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -37,7 +40,7 @@ public override IEnumerable GetRawPages() ClientResult result = GetNextResponse(message); yield return result; - string nextPageString = ((ListWithStringNextLinkResult)result).Next; + string nextPageString = ListWithStringNextLinkResult.FromClientResult(result, _modelReaderWriterOptions).Next; if (string.IsNullOrEmpty(nextPageString)) { yield break; @@ -52,7 +55,7 @@ public override IEnumerable GetRawPages() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - string nextPage = ((ListWithStringNextLinkResult)page).Next; + string nextPage = ListWithStringNextLinkResult.FromClientResult(page, _modelReaderWriterOptions).Next; if (!string.IsNullOrEmpty(nextPage)) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkCollectionResultOfT.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkCollectionResultOfT.cs index 462d2612bed..d132b4d7520 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkCollectionResultOfT.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/CollectionResults/SampleTypeSpecClientGetWithStringNextLinkCollectionResultOfT.cs @@ -15,14 +15,17 @@ namespace SampleTypeSpec internal partial class SampleTypeSpecClientGetWithStringNextLinkCollectionResultOfT : CollectionResult { private readonly SampleTypeSpecClient _client; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions; private readonly RequestOptions _options; /// Initializes a new instance of SampleTypeSpecClientGetWithStringNextLinkCollectionResultOfT, which is used to iterate over the pages of a collection. /// The SampleTypeSpecClient client used to send requests. + /// The options used to read the pages, including the model proxies configured on the client options. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SampleTypeSpecClientGetWithStringNextLinkCollectionResultOfT(SampleTypeSpecClient client, RequestOptions options) + public SampleTypeSpecClientGetWithStringNextLinkCollectionResultOfT(SampleTypeSpecClient client, ModelReaderWriterOptions modelReaderWriterOptions, RequestOptions options) { _client = client; + _modelReaderWriterOptions = modelReaderWriterOptions; _options = options; } @@ -37,7 +40,7 @@ public override IEnumerable GetRawPages() ClientResult result = GetNextResponse(message); yield return result; - string nextPageString = ((ListWithStringNextLinkResult)result).Next; + string nextPageString = ListWithStringNextLinkResult.FromClientResult(result, _modelReaderWriterOptions).Next; if (string.IsNullOrEmpty(nextPageString)) { yield break; @@ -52,7 +55,7 @@ public override IEnumerable GetRawPages() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - string nextPage = ((ListWithStringNextLinkResult)page).Next; + string nextPage = ListWithStringNextLinkResult.FromClientResult(page, _modelReaderWriterOptions).Next; if (!string.IsNullOrEmpty(nextPage)) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); @@ -68,7 +71,7 @@ public override ContinuationToken GetContinuationToken(ClientResult page) /// The values from the specified page. protected override IEnumerable GetValuesFromPage(ClientResult page) { - return ((ListWithStringNextLinkResult)page).Things; + return ListWithStringNextLinkResult.FromClientResult(page, _modelReaderWriterOptions).Things; } /// Sends the request in the pipeline message and returns the response. diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/ConstructorRequirements.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/ConstructorRequirements.cs index b7ea0033613..0c21199cffc 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/ConstructorRequirements.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/ConstructorRequirements.cs @@ -17,6 +17,7 @@ namespace SampleTypeSpec public partial class ConstructorRequirements { private readonly Uri _endpoint; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions = ModelSerializationExtensions.WireOptions; /// Initializes a new instance of ConstructorRequirements for mocking. protected ConstructorRequirements() @@ -25,11 +26,13 @@ protected ConstructorRequirements() /// Initializes a new instance of ConstructorRequirements. /// The HTTP pipeline for sending and receiving REST requests and responses. + /// /// Service endpoint. - internal ConstructorRequirements(ClientPipeline pipeline, Uri endpoint) + internal ConstructorRequirements(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) { _endpoint = endpoint; Pipeline = pipeline; + _modelReaderWriterOptions = modelReaderWriterOptions; } /// The HTTP pipeline for sending and receiving REST requests and responses. @@ -86,7 +89,7 @@ public virtual ClientResult Send(ConstructorOverride body, CancellationToken can { Argument.AssertNotNull(body, nameof(body)); - return Send(body, cancellationToken.ToRequestOptions()); + return Send(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } /// Send. @@ -98,7 +101,7 @@ public virtual async Task SendAsync(ConstructorOverride body, Canc { Argument.AssertNotNull(body, nameof(body)); - return await SendAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await SendAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -152,7 +155,7 @@ public virtual ClientResult SendReadOnly(ConstructorReadOnlyOverride body, Cance { Argument.AssertNotNull(body, nameof(body)); - return SendReadOnly(body, cancellationToken.ToRequestOptions()); + return SendReadOnly(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } /// SendReadOnly. @@ -164,7 +167,7 @@ public virtual async Task SendReadOnlyAsync(ConstructorReadOnlyOve { Argument.AssertNotNull(body, nameof(body)); - return await SendReadOnlyAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await SendReadOnlyAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -218,7 +221,7 @@ public virtual ClientResult SendReadOnlyLeaf(ConstructorReadOnlyLeaf body, Cance { Argument.AssertNotNull(body, nameof(body)); - return SendReadOnlyLeaf(body, cancellationToken.ToRequestOptions()); + return SendReadOnlyLeaf(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } /// SendReadOnlyLeaf. @@ -230,7 +233,7 @@ public virtual async Task SendReadOnlyLeafAsync(ConstructorReadOnl { Argument.AssertNotNull(body, nameof(body)); - return await SendReadOnlyLeafAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await SendReadOnlyLeafAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -284,7 +287,7 @@ public virtual ClientResult SendXml(XmlConstructorOverride body, CancellationTok { Argument.AssertNotNull(body, nameof(body)); - return SendXml(body, cancellationToken.ToRequestOptions()); + return SendXml(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } /// SendXml. @@ -296,7 +299,7 @@ public virtual async Task SendXmlAsync(XmlConstructorOverride body { Argument.AssertNotNull(body, nameof(body)); - return await SendXmlAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await SendXmlAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -350,7 +353,7 @@ public virtual ClientResult SendInheritedLeaf(ConstructorInheritedLeaf body, Can { Argument.AssertNotNull(body, nameof(body)); - return SendInheritedLeaf(body, cancellationToken.ToRequestOptions()); + return SendInheritedLeaf(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } /// SendInheritedLeaf. @@ -362,7 +365,7 @@ public virtual async Task SendInheritedLeafAsync(ConstructorInheri { Argument.AssertNotNull(body, nameof(body)); - return await SendInheritedLeafAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await SendInheritedLeafAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -416,7 +419,7 @@ public virtual ClientResult SendRenamed(RenamedConstructorOverride body, Cancell { Argument.AssertNotNull(body, nameof(body)); - return SendRenamed(body, cancellationToken.ToRequestOptions()); + return SendRenamed(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } /// SendRenamed. @@ -428,7 +431,7 @@ public virtual async Task SendRenamedAsync(RenamedConstructorOverr { Argument.AssertNotNull(body, nameof(body)); - return await SendRenamedAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await SendRenamedAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -482,7 +485,7 @@ public virtual ClientResult SendRenamedLeaf(RenamedConstructorLeaf body, Cancell { Argument.AssertNotNull(body, nameof(body)); - return SendRenamedLeaf(body, cancellationToken.ToRequestOptions()); + return SendRenamedLeaf(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } /// SendRenamedLeaf. @@ -494,7 +497,7 @@ public virtual async Task SendRenamedLeafAsync(RenamedConstructorL { Argument.AssertNotNull(body, nameof(body)); - return await SendRenamedLeafAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await SendRenamedLeafAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -548,7 +551,7 @@ public virtual ClientResult SendWritableLeaf(ConstructorWritableLeaf body, Cance { Argument.AssertNotNull(body, nameof(body)); - return SendWritableLeaf(body, cancellationToken.ToRequestOptions()); + return SendWritableLeaf(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } /// SendWritableLeaf. @@ -560,7 +563,7 @@ public virtual async Task SendWritableLeafAsync(ConstructorWritabl { Argument.AssertNotNull(body, nameof(body)); - return await SendWritableLeafAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await SendWritableLeafAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -614,7 +617,7 @@ public virtual ClientResult SendReturnedName(RenamedConstructorReturnedName body { Argument.AssertNotNull(body, nameof(body)); - return SendReturnedName(body, cancellationToken.ToRequestOptions()); + return SendReturnedName(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } /// SendReturnedName. @@ -626,7 +629,7 @@ public virtual async Task SendReturnedNameAsync(RenamedConstructor { Argument.AssertNotNull(body, nameof(body)); - return await SendReturnedNameAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await SendReturnedNameAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -680,7 +683,7 @@ public virtual ClientResult SendRequiredRenamed(RequiredRenamedConstructorOverri { Argument.AssertNotNull(body, nameof(body)); - return SendRequiredRenamed(body, cancellationToken.ToRequestOptions()); + return SendRequiredRenamed(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } /// SendRequiredRenamed. @@ -692,7 +695,7 @@ public virtual async Task SendRequiredRenamedAsync(RequiredRenamed { Argument.AssertNotNull(body, nameof(body)); - return await SendRequiredRenamedAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await SendRequiredRenamedAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -746,7 +749,7 @@ public virtual ClientResult SendReadOnlyCollections(ConstructorReadOnlyCollectio { Argument.AssertNotNull(body, nameof(body)); - return SendReadOnlyCollections(body, cancellationToken.ToRequestOptions()); + return SendReadOnlyCollections(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } /// SendReadOnlyCollections. @@ -758,7 +761,7 @@ public virtual async Task SendReadOnlyCollectionsAsync(Constructor { Argument.AssertNotNull(body, nameof(body)); - return await SendReadOnlyCollectionsAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await SendReadOnlyCollectionsAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -812,7 +815,7 @@ public virtual ClientResult SendRequiredCollections(ConstructorRequiredCollectio { Argument.AssertNotNull(body, nameof(body)); - return SendRequiredCollections(body, cancellationToken.ToRequestOptions()); + return SendRequiredCollections(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } /// SendRequiredCollections. @@ -824,7 +827,7 @@ public virtual async Task SendRequiredCollectionsAsync(Constructor { Argument.AssertNotNull(body, nameof(body)); - return await SendRequiredCollectionsAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await SendRequiredCollectionsAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -878,8 +881,8 @@ public virtual ClientResult SendRenamedLitera { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = SendRenamedLiteral(body, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((RenamedLiteralConstructorOverride)result, result.GetRawResponse()); + ClientResult result = SendRenamedLiteral(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(RenamedLiteralConstructorOverride.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// SendRenamedLiteral. @@ -891,8 +894,8 @@ public virtual async Task> SendR { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = await SendRenamedLiteralAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((RenamedLiteralConstructorOverride)result, result.GetRawResponse()); + ClientResult result = await SendRenamedLiteralAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(RenamedLiteralConstructorOverride.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -946,8 +949,8 @@ public virtual ClientResult SendClientNameCo { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = SendClientNameCollision(body, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((ConstructorClientNameCollisionLeaf)result, result.GetRawResponse()); + ClientResult result = SendClientNameCollision(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(ConstructorClientNameCollisionLeaf.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// SendClientNameCollision. @@ -959,8 +962,8 @@ public virtual async Task> Send { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = await SendClientNameCollisionAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((ConstructorClientNameCollisionLeaf)result, result.GetRawResponse()); + ClientResult result = await SendClientNameCollisionAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(ConstructorClientNameCollisionLeaf.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/DogOperations.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/DogOperations.cs index a45d14cb50f..0cf0d310123 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/DogOperations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/DogOperations.cs @@ -17,6 +17,7 @@ namespace SampleTypeSpec public partial class DogOperations { private readonly Uri _endpoint; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions = ModelSerializationExtensions.WireOptions; /// Initializes a new instance of DogOperations for mocking. protected DogOperations() @@ -25,11 +26,13 @@ protected DogOperations() /// Initializes a new instance of DogOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. + /// /// Service endpoint. - internal DogOperations(ClientPipeline pipeline, Uri endpoint) + internal DogOperations(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) { _endpoint = endpoint; Pipeline = pipeline; + _modelReaderWriterOptions = modelReaderWriterOptions; } /// The HTTP pipeline for sending and receiving REST requests and responses. @@ -86,8 +89,8 @@ public virtual ClientResult UpdateDogAsDog(Dog dog, CancellationToken cance { Argument.AssertNotNull(dog, nameof(dog)); - ClientResult result = UpdateDogAsDog(dog, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Dog)result, result.GetRawResponse()); + ClientResult result = UpdateDogAsDog(dog.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(Dog.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Update a dog as a dog. @@ -99,8 +102,8 @@ public virtual async Task> UpdateDogAsDogAsync(Dog dog, Cancel { Argument.AssertNotNull(dog, nameof(dog)); - ClientResult result = await UpdateDogAsDogAsync(dog, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Dog)result, result.GetRawResponse()); + ClientResult result = await UpdateDogAsDogAsync(dog.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(Dog.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/ExperimentalSamples.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/ExperimentalSamples.cs index 79f25e0d36c..526982dbb88 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/ExperimentalSamples.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/ExperimentalSamples.cs @@ -19,6 +19,7 @@ namespace SampleTypeSpec public partial class ExperimentalSamples { private readonly Uri _endpoint; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions = ModelSerializationExtensions.WireOptions; /// Initializes a new instance of ExperimentalSamples for mocking. protected ExperimentalSamples() @@ -27,11 +28,13 @@ protected ExperimentalSamples() /// Initializes a new instance of ExperimentalSamples. /// The HTTP pipeline for sending and receiving REST requests and responses. + /// /// Service endpoint. - internal ExperimentalSamples(ClientPipeline pipeline, Uri endpoint) + internal ExperimentalSamples(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) { _endpoint = endpoint; Pipeline = pipeline; + _modelReaderWriterOptions = modelReaderWriterOptions; } /// The HTTP pipeline for sending and receiving REST requests and responses. @@ -77,7 +80,7 @@ public virtual async Task ReadAsync(RequestOptions options) public virtual ClientResult Read(CancellationToken cancellationToken = default) { ClientResult result = Read(cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((LifecycleModel)result, result.GetRawResponse()); + return ClientResult.FromValue(LifecycleModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Read. @@ -86,7 +89,7 @@ public virtual ClientResult Read(CancellationToken cancellationT public virtual async Task> ReadAsync(CancellationToken cancellationToken = default) { ClientResult result = await ReadAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((LifecycleModel)result, result.GetRawResponse()); + return ClientResult.FromValue(LifecycleModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -102,7 +105,7 @@ public virtual async Task> ReadAsync(CancellationTo /// The response returned from the service. public virtual CollectionResult GetAll(RequestOptions options) { - return new ExperimentalSamplesGetAllCollectionResult(this, options); + return new ExperimentalSamplesGetAllCollectionResult(this, _modelReaderWriterOptions, options); } /// @@ -118,7 +121,7 @@ public virtual CollectionResult GetAll(RequestOptions options) /// The response returned from the service. public virtual AsyncCollectionResult GetAllAsync(RequestOptions options) { - return new ExperimentalSamplesGetAllAsyncCollectionResult(this, options); + return new ExperimentalSamplesGetAllAsyncCollectionResult(this, _modelReaderWriterOptions, options); } /// GetAll. @@ -127,7 +130,7 @@ public virtual AsyncCollectionResult GetAllAsync(RequestOptions options) #pragma warning disable SAMPLE0003 // This generated code depends on experimental functionality. public virtual CollectionResult GetAll(CancellationToken cancellationToken = default) { - return new ExperimentalSamplesGetAllCollectionResultOfT(this, cancellationToken.ToRequestOptions()); + return new ExperimentalSamplesGetAllCollectionResultOfT(this, _modelReaderWriterOptions, cancellationToken.ToRequestOptions()); } #pragma warning restore SAMPLE0003 // This generated code depends on experimental functionality. @@ -137,7 +140,7 @@ public virtual CollectionResult GetAll(CancellationToken cancell #pragma warning disable SAMPLE0003 // This generated code depends on experimental functionality. public virtual AsyncCollectionResult GetAllAsync(CancellationToken cancellationToken = default) { - return new ExperimentalSamplesGetAllAsyncCollectionResultOfT(this, cancellationToken.ToRequestOptions()); + return new ExperimentalSamplesGetAllAsyncCollectionResultOfT(this, _modelReaderWriterOptions, cancellationToken.ToRequestOptions()); } #pragma warning restore SAMPLE0003 // This generated code depends on experimental functionality. } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/ModelSerializationExtensions.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/ModelSerializationExtensions.cs index db0dbe4cad4..b4df3bddaec 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/ModelSerializationExtensions.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/ModelSerializationExtensions.cs @@ -354,9 +354,23 @@ public static BinaryData GetUtf8Bytes(this JsonElement element) #endif } - public static bool ShouldReadThroughProxy(this ModelReaderWriterOptions options, Type modelType, ModelReaderWriterContext context) + public static bool ShouldReadThroughProxy(this ModelReaderWriterOptions options, ModelReaderWriterContext context) { - return options.Proxies.Count > 0 && context.TryGetTypeBuilder(modelType, out _); + return options.Proxies.Count > 0 && ProxyReadEligibility.IsBuildable(context); + } + + public static ModelReaderWriterOptions ToWireOptions(this IList modelProxies) + { + if (modelProxies.Count == 0) + { + return WireOptions; + } + ModelReaderWriterOptions options = new ModelReaderWriterOptions("W"); + foreach (ModelProxy proxy in modelProxies) + { + options.Proxies.Add(proxy); + } + return options; } public static ReadOnlySpan SliceToStartOfPropertyName(this ReadOnlySpan jsonPath) @@ -462,6 +476,20 @@ public static ReadOnlySpan GetRemainder(this ReadOnlySpan jsonPath, public static BinaryData GetUtf8Bytes(this XElement element) => BinaryData.FromString(element.ToString(SaveOptions.DisableFormatting)); + public static ModelReaderWriterOptions ToXmlOptions(this ModelReaderWriterOptions options) + { + if (options.Format == "X") + { + return options; + } + ModelReaderWriterOptions xmlOptions = new ModelReaderWriterOptions("X"); + foreach (ModelProxy proxy in options.Proxies) + { + xmlOptions.Proxies.Add(proxy); + } + return xmlOptions; + } + public static void WriteStringValue(this XmlWriter writer, DateTimeOffset value, string format) { writer.WriteValue(TypeFormatters.ToString(value, format)); @@ -515,5 +543,21 @@ public static void WriteObjectValue(this XmlWriter writer, T value, ModelRead throw new NotSupportedException($"Not supported type {typeof(T)}"); } } + + private static class ProxyReadEligibility + { + private static int s_state; + + public static bool IsBuildable(ModelReaderWriterContext context) + { + int state = s_state; + if (state == 0) + { + state = context.TryGetTypeBuilder(typeof(T), out _) ? 1 : 2; + s_state = state; + } + return state == 1; + } + } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Metrics.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Metrics.cs index 28bf5903d4a..c432567441d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Metrics.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Metrics.cs @@ -19,6 +19,7 @@ namespace SampleTypeSpec public partial class Metrics { private readonly Uri _endpoint; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions = ModelSerializationExtensions.WireOptions; private const string AuthorizationHeader = "my-api-key"; /// The OAuth2 flows supported by the service. private static readonly Dictionary[] _flows = new Dictionary[] @@ -39,12 +40,14 @@ protected Metrics() /// Initializes a new instance of Metrics. /// The HTTP pipeline for sending and receiving REST requests and responses. + /// /// Service endpoint. /// - internal Metrics(ClientPipeline pipeline, Uri endpoint, string metricsNamespace) + internal Metrics(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, string metricsNamespace) { _endpoint = endpoint; Pipeline = pipeline; + _modelReaderWriterOptions = modelReaderWriterOptions; _metricsNamespace = metricsNamespace; } @@ -90,6 +93,7 @@ internal Metrics(AuthenticationPolicy authenticationPolicy, Uri endpoint, string { Pipeline = ClientPipeline.Create(options, Array.Empty(), new PipelinePolicy[] { new UserAgentPolicy(typeof(Metrics).Assembly) }, Array.Empty()); } + _modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); } /// Initializes a new instance of Metrics. @@ -167,7 +171,7 @@ public virtual async Task GetWidgetMetricsAsync(string day, Reques public virtual ClientResult GetWidgetMetrics(DaysOfWeekExtensibleEnum day, CancellationToken cancellationToken = default) { ClientResult result = GetWidgetMetrics(day.ToString(), cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((GetWidgetMetricsResult)result, result.GetRawResponse()); + return ClientResult.FromValue(GetWidgetMetricsResult.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Get Widget metrics for given day of week. @@ -177,7 +181,7 @@ public virtual ClientResult GetWidgetMetrics(DaysOfWeekE public virtual async Task> GetWidgetMetricsAsync(DaysOfWeekExtensibleEnum day, CancellationToken cancellationToken = default) { ClientResult result = await GetWidgetMetricsAsync(day.ToString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((GetWidgetMetricsResult)result, result.GetRawResponse()); + return ClientResult.FromValue(GetWidgetMetricsResult.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Animal.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Animal.Serialization.cs index cccad18165e..41050c0d811 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Animal.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Animal.Serialization.cs @@ -74,6 +74,13 @@ public static implicit operator BinaryContent(Animal animal) return BinaryContent.Create(animal, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator Animal(ClientResult result) { @@ -82,6 +89,19 @@ public static explicit operator Animal(ClientResult result) return DeserializeAnimal(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static Animal FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAnimal(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CollisionPetsUnion.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CollisionPetsUnion.Serialization.cs index 08a31f5b4fd..94f2bff15de 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CollisionPetsUnion.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CollisionPetsUnion.Serialization.cs @@ -162,7 +162,7 @@ internal static CollisionPetsUnion DeserializeCollisionPetsUnion1(JsonElement el switch (discriminator.GetString()) { case "mammal": - return options.ShouldReadThroughProxy(typeof(NestedMammal), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : NestedMammal.DeserializeNestedMammal(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : NestedMammal.DeserializeNestedMammal(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'CollisionPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorClientNameCollisionLeaf.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorClientNameCollisionLeaf.Serialization.cs index 80fac3f6cc5..09a7e4de5f3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorClientNameCollisionLeaf.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorClientNameCollisionLeaf.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(ConstructorClientNameCollisionLeaf return BinaryContent.Create(constructorClientNameCollisionLeaf, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator ConstructorClientNameCollisionLeaf(ClientResult result) { @@ -79,6 +86,19 @@ public static explicit operator ConstructorClientNameCollisionLeaf(ClientResult return DeserializeConstructorClientNameCollisionLeaf(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static ConstructorClientNameCollisionLeaf FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConstructorClientNameCollisionLeaf(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorInheritedLeaf.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorInheritedLeaf.Serialization.cs index dbb06537776..fd94cf366dd 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorInheritedLeaf.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorInheritedLeaf.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(ConstructorInheritedLeaf construct return BinaryContent.Create(constructorInheritedLeaf, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal new BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorOverride.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorOverride.Serialization.cs index 788b33f45dd..bbcdab9e5a6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorOverride.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorOverride.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(ConstructorOverride constructorOve return BinaryContent.Create(constructorOverride, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorReadOnlyCollectionOverride.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorReadOnlyCollectionOverride.Serialization.cs index 67d869b0f2f..6fc9bba3f89 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorReadOnlyCollectionOverride.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorReadOnlyCollectionOverride.Serialization.cs @@ -66,6 +66,13 @@ public static implicit operator BinaryContent(ConstructorReadOnlyCollectionOverr return BinaryContent.Create(constructorReadOnlyCollectionOverride, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorReadOnlyLeaf.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorReadOnlyLeaf.Serialization.cs index 06741a7cd7b..870a09e62e9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorReadOnlyLeaf.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorReadOnlyLeaf.Serialization.cs @@ -66,6 +66,13 @@ public static implicit operator BinaryContent(ConstructorReadOnlyLeaf constructo return BinaryContent.Create(constructorReadOnlyLeaf, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal new BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorReadOnlyOverride.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorReadOnlyOverride.Serialization.cs index 81da3ef45ae..74b0981859a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorReadOnlyOverride.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorReadOnlyOverride.Serialization.cs @@ -66,6 +66,13 @@ public static implicit operator BinaryContent(ConstructorReadOnlyOverride constr return BinaryContent.Create(constructorReadOnlyOverride, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorRequiredCollectionOverride.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorRequiredCollectionOverride.Serialization.cs index fb2fdf730ad..495f5fdd6ad 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorRequiredCollectionOverride.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorRequiredCollectionOverride.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(ConstructorRequiredCollectionOverr return BinaryContent.Create(constructorRequiredCollectionOverride, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal new BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorWritableLeaf.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorWritableLeaf.Serialization.cs index d86ab9037da..7a4bbe19f77 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorWritableLeaf.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ConstructorWritableLeaf.Serialization.cs @@ -66,6 +66,13 @@ public static implicit operator BinaryContent(ConstructorWritableLeaf constructo return BinaryContent.Create(constructorWritableLeaf, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CustomIntermediateCat.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CustomIntermediateCat.Serialization.cs index 7cb30913575..2ff044881f6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CustomIntermediateCat.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CustomIntermediateCat.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator CustomIntermediateCat(ClientResult result) return DeserializeCustomIntermediateCat(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static CustomIntermediateCat FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomIntermediateCat(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CustomUnionCat.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CustomUnionCat.Serialization.cs index cf2ec3b5b94..1b216bb4e37 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CustomUnionCat.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CustomUnionCat.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator CustomUnionCat(ClientResult result) return DeserializeCustomUnionCat(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static CustomUnionCat FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomUnionCat(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CustomUnionPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CustomUnionPet.Serialization.cs index 6b52ae07a5c..f0d863ec871 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CustomUnionPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/CustomUnionPet.Serialization.cs @@ -66,6 +66,13 @@ public static implicit operator BinaryContent(CustomUnionPet customUnionPet) return BinaryContent.Create(customUnionPet, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator CustomUnionPet(ClientResult result) { @@ -74,6 +81,19 @@ public static explicit operator CustomUnionPet(ClientResult result) return DeserializeCustomUnionPet(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static CustomUnionPet FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomUnionPet(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DescendantUnionCat.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DescendantUnionCat.Serialization.cs index 1fc91e598d0..a9b5ee64d46 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DescendantUnionCat.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DescendantUnionCat.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator DescendantUnionCat(ClientResult result) return DeserializeDescendantUnionCat(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static DescendantUnionCat FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDescendantUnionCat(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DescendantUnionPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DescendantUnionPet.Serialization.cs index b7e2a8cf7cb..8c9dfcadca2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DescendantUnionPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DescendantUnionPet.Serialization.cs @@ -162,7 +162,7 @@ internal static DescendantUnionPet DeserializeDescendantPetsUnion1(JsonElement e switch (discriminator.GetString()) { case "cat": - return options.ShouldReadThroughProxy(typeof(DescendantUnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : DescendantUnionCat.DeserializeDescendantUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : DescendantUnionCat.DeserializeDescendantUnionCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'DescendantPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializeNamedCat.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializeNamedCat.Serialization.cs index 1785af09e45..8e5c6702f6a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializeNamedCat.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializeNamedCat.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator DeserializeNamedCat(ClientResult result) return DeserializeDeserializeNamedCat(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static DeserializeNamedCat FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDeserializeNamedCat(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializePetsUnion.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializePetsUnion.Serialization.cs index d582e5c9bea..15d2cdd93ab 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializePetsUnion.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializePetsUnion.Serialization.cs @@ -162,7 +162,7 @@ internal static DeserializePetsUnion DeserializePetsUnion1(JsonElement element, switch (discriminator.GetString()) { case "cat": - return options.ShouldReadThroughProxy(typeof(DeserializeNamedCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : DeserializeNamedCat.DeserializeDeserializeNamedCat(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : DeserializeNamedCat.DeserializeDeserializeNamedCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'Pets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializerPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializerPet.Serialization.cs index 78dbe3b0848..0012402aafe 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializerPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DeserializerPet.Serialization.cs @@ -162,7 +162,7 @@ internal static DeserializerPet DeserializePetsUnion1(JsonElement element, Model switch (discriminator.GetString()) { case "pet": - return options.ShouldReadThroughProxy(typeof(PetsUnion), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : PetsUnion.DeserializePetsUnion(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : PetsUnion.DeserializePetsUnion(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'Pets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionCat.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionCat.Serialization.cs index 774fd645832..3ef98acf42a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionCat.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionCat.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator DirectUnionCat(ClientResult result) return DeserializeDirectUnionCat(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static new DirectUnionCat FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDirectUnionCat(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPet.Serialization.cs index 7cb87c9b332..9623ee8e43d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPet.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(DirectUnionPet directUnionPet) return BinaryContent.Create(directUnionPet, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator DirectUnionPet(ClientResult result) { @@ -79,6 +86,19 @@ public static explicit operator DirectUnionPet(ClientResult result) return DeserializeDirectUnionPet(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static DirectUnionPet FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDirectUnionPet(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -218,7 +238,7 @@ internal static DirectUnionPet DeserializeDirectPetsUnion3(JsonElement element, switch (discriminator.GetString()) { case "cat": - return options.ShouldReadThroughProxy(typeof(DirectUnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : DirectUnionCat.DeserializeDirectUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : DirectUnionCat.DeserializeDirectUnionCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'DirectPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPetContainer.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPetContainer.Serialization.cs index f7506c40dcf..94240ee3746 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPetContainer.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DirectUnionPetContainer.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(DirectUnionPetContainer directUnio return BinaryContent.Create(directUnionPetContainer, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator DirectUnionPetContainer(ClientResult result) { @@ -79,6 +86,19 @@ public static explicit operator DirectUnionPetContainer(ClientResult result) return DeserializeDirectUnionPetContainer(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static DirectUnionPetContainer FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDirectUnionPetContainer(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -147,7 +167,7 @@ internal static DirectUnionPetContainer DeserializeDirectUnionPetContainer(JsonE { if (prop.NameEquals("pet"u8)) { - pet = options.ShouldReadThroughProxy(typeof(DirectUnionPet), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : DirectUnionPet.DeserializeDirectUnionPet(prop.Value, options); + pet = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : DirectUnionPet.DeserializeDirectUnionPet(prop.Value, options); continue; } if (options.Format != "W") diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Dog.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Dog.Serialization.cs index 1847d7df606..1a1d14c4fa9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Dog.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Dog.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(Dog dog) return BinaryContent.Create(dog, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal new BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator Dog(ClientResult result) { @@ -79,6 +86,19 @@ public static explicit operator Dog(ClientResult result) return DeserializeDog(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static new Dog FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDog(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DynamicModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DynamicModel.Serialization.cs index 93c1386f9c1..6ed2e423614 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DynamicModel.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DynamicModel.Serialization.cs @@ -72,6 +72,13 @@ public static implicit operator BinaryContent(DynamicModel dynamicModel) return BinaryContent.Create(dynamicModel, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -769,7 +776,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary } if (prop.NameEquals("foo"u8)) { - foo = options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop.Value, prop.Value.GetUtf8Bytes(), options); + foo = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop.Value, prop.Value.GetUtf8Bytes(), options); continue; } if (prop.NameEquals("listFoo"u8)) @@ -777,7 +784,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); + array.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); } listFoo = array; continue; @@ -796,7 +803,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary List array0 = new List(); foreach (var item0 in item.EnumerateArray()) { - array0.Add(options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item0, item0.GetUtf8Bytes(), options)); + array0.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item0, item0.GetUtf8Bytes(), options)); } array.Add(array0); } @@ -809,7 +816,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary Dictionary dictionary = new Dictionary(); foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); + dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); } dictionaryFoo = dictionary; continue; @@ -828,7 +835,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary Dictionary dictionary0 = new Dictionary(); foreach (var prop1 in prop0.Value.EnumerateObject()) { - dictionary0.Add(prop1.Name, options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop1.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop1.Value, prop1.Value.GetUtf8Bytes(), options)); + dictionary0.Add(prop1.Name, options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop1.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop1.Value, prop1.Value.GetUtf8Bytes(), options)); } dictionary.Add(prop0.Name, dictionary0); } @@ -850,7 +857,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary List array = new List(); foreach (var item in prop0.Value.EnumerateArray()) { - array.Add(options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); + array.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); } dictionary.Add(prop0.Name, array); } @@ -872,7 +879,7 @@ internal static DynamicModel DeserializeDynamicModel(JsonElement element, Binary Dictionary dictionary = new Dictionary(); foreach (var prop0 in item.EnumerateObject()) { - dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); + dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); } array.Add(dictionary); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DynamicUnionPetContainer.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DynamicUnionPetContainer.Serialization.cs index f8c0914bb15..3d7e61e258b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DynamicUnionPetContainer.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/DynamicUnionPetContainer.Serialization.cs @@ -67,6 +67,13 @@ public static implicit operator BinaryContent(DynamicUnionPetContainer dynamicUn return BinaryContent.Create(dynamicUnionPetContainer, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator DynamicUnionPetContainer(ClientResult result) { @@ -76,6 +83,20 @@ public static explicit operator DynamicUnionPetContainer(ClientResult result) return DeserializeDynamicUnionPetContainer(document.RootElement, data, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static DynamicUnionPetContainer FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + BinaryData data = response.Content; + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDynamicUnionPetContainer(document.RootElement, data, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ExperimentalUnionCat.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ExperimentalUnionCat.Serialization.cs index e3a6fb44533..fc3df09a9aa 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ExperimentalUnionCat.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ExperimentalUnionCat.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator ExperimentalUnionCat(ClientResult result) return DeserializeExperimentalUnionCat(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static new ExperimentalUnionCat FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExperimentalUnionCat(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ExternalUnionCat.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ExternalUnionCat.Serialization.cs index 2a8f00fcf52..b98055fdc36 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ExternalUnionCat.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ExternalUnionCat.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator ExternalUnionCat(ClientResult result) return DeserializeExternalUnionCat(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static ExternalUnionCat FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExternalUnionCat(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Friend.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Friend.Serialization.cs index b973e4b76e0..63357ed959e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Friend.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Friend.Serialization.cs @@ -72,6 +72,13 @@ public static implicit operator BinaryContent(Friend friend) return BinaryContent.Create(friend, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator Friend(ClientResult result) { @@ -80,6 +87,19 @@ public static explicit operator Friend(ClientResult result) return DeserializeFriend(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static Friend FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFriend(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/GetNotebookResult.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/GetNotebookResult.Serialization.cs index 14a86aef841..21df05e4538 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/GetNotebookResult.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/GetNotebookResult.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator GetNotebookResult(ClientResult result) return DeserializeGetNotebookResult(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static GetNotebookResult FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGetNotebookResult(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/GetWidgetMetricsResult.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/GetWidgetMetricsResult.Serialization.cs index 732ec427356..3fb983d66b0 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/GetWidgetMetricsResult.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/GetWidgetMetricsResult.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator GetWidgetMetricsResult(ClientResult result) return DeserializeGetWidgetMetricsResult(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static GetWidgetMetricsResult FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGetWidgetMetricsResult(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/IntermediateUnionCat.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/IntermediateUnionCat.Serialization.cs index d1bda3045c1..e9123ad43af 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/IntermediateUnionCat.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/IntermediateUnionCat.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator IntermediateUnionCat(ClientResult result) return DeserializeIntermediateUnionCat(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static IntermediateUnionCat FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeIntermediateUnionCat(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/LifecycleModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/LifecycleModel.Serialization.cs index 7cd67ed23ff..17002a9903a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/LifecycleModel.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/LifecycleModel.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator LifecycleModel(ClientResult result) return DeserializeLifecycleModel(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static LifecycleModel FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLifecycleModel(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -155,7 +168,7 @@ internal static LifecycleModel DeserializeLifecycleModel(JsonElement element, Mo { continue; } - preview = options.ShouldReadThroughProxy(typeof(PreviewDetails), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : PreviewDetails.DeserializePreviewDetails(prop.Value, options); + preview = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : PreviewDetails.DeserializePreviewDetails(prop.Value, options); continue; } if (prop.NameEquals("choice"u8)) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenHeaderResponseResult.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenHeaderResponseResult.Serialization.cs index 08004d07109..193ecabf0f6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenHeaderResponseResult.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenHeaderResponseResult.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator ListWithContinuationTokenHeaderResponseResult(Cl return DeserializeListWithContinuationTokenHeaderResponseResult(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static ListWithContinuationTokenHeaderResponseResult FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeListWithContinuationTokenHeaderResponseResult(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -145,7 +158,7 @@ internal static ListWithContinuationTokenHeaderResponseResult DeserializeListWit List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); + array.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); } things = array; continue; diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenResult.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenResult.Serialization.cs index 13053b556cc..0b8d7a992e8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenResult.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithContinuationTokenResult.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator ListWithContinuationTokenResult(ClientResult res return DeserializeListWithContinuationTokenResult(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static ListWithContinuationTokenResult FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeListWithContinuationTokenResult(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -151,7 +164,7 @@ internal static ListWithContinuationTokenResult DeserializeListWithContinuationT List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); + array.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); } things = array; continue; diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithNextLinkResult.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithNextLinkResult.Serialization.cs index a330dbcd549..770cad97405 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithNextLinkResult.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithNextLinkResult.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator ListWithNextLinkResult(ClientResult result) return DeserializeListWithNextLinkResult(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static ListWithNextLinkResult FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeListWithNextLinkResult(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -151,7 +164,7 @@ internal static ListWithNextLinkResult DeserializeListWithNextLinkResult(JsonEle List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); + array.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); } things = array; continue; diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithStringNextLinkResult.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithStringNextLinkResult.Serialization.cs index 5bed51c8a56..3e78e825b40 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithStringNextLinkResult.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ListWithStringNextLinkResult.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator ListWithStringNextLinkResult(ClientResult result return DeserializeListWithStringNextLinkResult(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static ListWithStringNextLinkResult FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeListWithStringNextLinkResult(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -151,7 +164,7 @@ internal static ListWithStringNextLinkResult DeserializeListWithStringNextLinkRe List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); + array.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); } things = array; continue; diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ModelWithEmbeddedNonBodyParameters.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ModelWithEmbeddedNonBodyParameters.Serialization.cs index e97166f3199..d51683b458a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ModelWithEmbeddedNonBodyParameters.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ModelWithEmbeddedNonBodyParameters.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(ModelWithEmbeddedNonBodyParameters return BinaryContent.Create(modelWithEmbeddedNonBodyParameters, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NestedMammal.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NestedMammal.Serialization.cs index f509fc7d3db..a71b07bdae5 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NestedMammal.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NestedMammal.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator NestedMammal(ClientResult result) return DeserializeNestedMammal(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static NestedMammal FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNestedMammal(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -173,7 +186,7 @@ internal static NestedMammal DeserializeNestedPetsUnion(JsonElement element, Mod switch (discriminator.GetString()) { case "cat": - return options.ShouldReadThroughProxy(typeof(ExperimentalUnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : ExperimentalUnionCat.DeserializeExperimentalUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : ExperimentalUnionCat.DeserializeExperimentalUnionCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'NestedPets'."); } @@ -221,7 +234,7 @@ internal static NestedMammal DeserializeCollisionPetsUnion2(JsonElement element, switch (discriminator.GetString()) { case "cat": - return options.ShouldReadThroughProxy(typeof(ExperimentalUnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : ExperimentalUnionCat.DeserializeExperimentalUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : ExperimentalUnionCat.DeserializeExperimentalUnionCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'CollisionPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NullableDynamicModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NullableDynamicModel.Serialization.cs index 0b3f46fa628..85ad5cafcee 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NullableDynamicModel.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/NullableDynamicModel.Serialization.cs @@ -505,7 +505,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement modelValue = null; continue; } - modelValue = options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop.Value, prop.Value.GetUtf8Bytes(), options); + modelValue = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop.Value, prop.Value.GetUtf8Bytes(), options); continue; } if (prop.NameEquals("children"u8)) @@ -518,7 +518,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); + array.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); } children = array; continue; @@ -533,7 +533,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement Dictionary dictionary = new Dictionary(); foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); + dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); } childDictionary = dictionary; continue; @@ -557,7 +557,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement List array0 = new List(); foreach (var item0 in item.EnumerateArray()) { - array0.Add(options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item0, item0.GetUtf8Bytes(), options)); + array0.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item0, item0.GetUtf8Bytes(), options)); } array.Add(array0); } @@ -584,7 +584,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement Dictionary dictionary0 = new Dictionary(); foreach (var prop1 in prop0.Value.EnumerateObject()) { - dictionary0.Add(prop1.Name, options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop1.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop1.Value, prop1.Value.GetUtf8Bytes(), options)); + dictionary0.Add(prop1.Name, options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop1.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop1.Value, prop1.Value.GetUtf8Bytes(), options)); } dictionary.Add(prop0.Name, dictionary0); } @@ -611,7 +611,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement List array = new List(); foreach (var item in prop0.Value.EnumerateArray()) { - array.Add(options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); + array.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(item, item.GetUtf8Bytes(), options)); } dictionary.Add(prop0.Name, array); } @@ -638,7 +638,7 @@ internal static NullableDynamicModel DeserializeNullableDynamicModel(JsonElement Dictionary dictionary = new Dictionary(); foreach (var prop0 in item.EnumerateObject()) { - dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(typeof(AnotherDynamicModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); + dictionary.Add(prop0.Name, options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop0.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : AnotherDynamicModel.DeserializeAnotherDynamicModel(prop0.Value, prop0.Value.GetUtf8Bytes(), options)); } array.Add(dictionary); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableContainer.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableContainer.Serialization.cs index 1502d8a3fed..b2525f1313b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableContainer.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableContainer.Serialization.cs @@ -128,7 +128,7 @@ internal static OptionalNullableContainer DeserializeOptionalNullableContainer(J { if (prop.NameEquals("child"u8)) { - child = options.ShouldReadThroughProxy(typeof(OptionalNullableProperties), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : OptionalNullableProperties.DeserializeOptionalNullableProperties(prop.Value, options); + child = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : OptionalNullableProperties.DeserializeOptionalNullableProperties(prop.Value, options); continue; } if (options.Format != "W") diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableProperties.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableProperties.Serialization.cs index d03ab9e56bb..e63be9e94da 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableProperties.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/OptionalNullableProperties.Serialization.cs @@ -311,7 +311,7 @@ internal static OptionalNullableProperties DeserializeOptionalNullableProperties nullableModel = null; continue; } - nullableModel = options.ShouldReadThroughProxy(typeof(OptionalNullableChild), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : OptionalNullableChild.DeserializeOptionalNullableChild(prop.Value, options); + nullableModel = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : OptionalNullableChild.DeserializeOptionalNullableChild(prop.Value, options); continue; } if (prop.NameEquals("nullableString"u8)) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PagePreviewDetails.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PagePreviewDetails.Serialization.cs index 575ddbdc629..421a06eff09 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PagePreviewDetails.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PagePreviewDetails.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator PagePreviewDetails(ClientResult result) return DeserializePagePreviewDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static PagePreviewDetails FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePagePreviewDetails(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -148,7 +161,7 @@ internal static PagePreviewDetails DeserializePagePreviewDetails(JsonElement ele List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(options.ShouldReadThroughProxy(typeof(PreviewDetails), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : PreviewDetails.DeserializePreviewDetails(item, options)); + array.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : PreviewDetails.DeserializePreviewDetails(item, options)); } items = array; continue; diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PageThing.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PageThing.Serialization.cs index f33ab76b1e1..9b1458e9938 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PageThing.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PageThing.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator PageThing(ClientResult result) return DeserializePageThing(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static PageThing FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePageThing(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -145,7 +158,7 @@ internal static PageThing DeserializePageThing(JsonElement element, ModelReaderW List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); + array.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(item, options)); } items = array; continue; diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Pet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Pet.Serialization.cs index 8aa4a4afecf..84c4cf74805 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Pet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Pet.Serialization.cs @@ -70,6 +70,13 @@ public static implicit operator BinaryContent(Pet pet) return BinaryContent.Create(pet, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal new BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator Pet(ClientResult result) { @@ -78,6 +85,19 @@ public static explicit operator Pet(ClientResult result) return DeserializePet(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static new Pet FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePet(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PetsUnion.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PetsUnion.Serialization.cs index ae1bbd408d7..686920402c7 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PetsUnion.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/PetsUnion.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator PetsUnion(ClientResult result) return DeserializePetsUnion(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static PetsUnion FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePetsUnion(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RawUnionPetContainer.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RawUnionPetContainer.Serialization.cs index 817735db22a..db78324e0e2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RawUnionPetContainer.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RawUnionPetContainer.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(RawUnionPetContainer rawUnionPetCo return BinaryContent.Create(rawUnionPetContainer, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator RawUnionPetContainer(ClientResult result) { @@ -79,6 +86,19 @@ public static explicit operator RawUnionPetContainer(ClientResult result) return DeserializeRawUnionPetContainer(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static RawUnionPetContainer FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRawUnionPetContainer(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionA.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionA.Serialization.cs index b99d2054a2e..c91debd40e2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionA.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionA.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator RebasedUnionA(ClientResult result) return DeserializeRebasedUnionA(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static RebasedUnionA FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRebasedUnionA(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -170,7 +183,7 @@ internal static RebasedUnionA DeserializePetsUnion(JsonElement element, ModelRea switch (discriminator.GetString()) { case "a": - return options.ShouldReadThroughProxy(typeof(RebasedUnionALeaf), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RebasedUnionALeaf.DeserializeRebasedUnionALeaf(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RebasedUnionALeaf.DeserializeRebasedUnionALeaf(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'Pets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionALeaf.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionALeaf.Serialization.cs index 6ebf38f35fd..3ad0927f63d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionALeaf.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionALeaf.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator RebasedUnionALeaf(ClientResult result) return DeserializeRebasedUnionALeaf(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static new RebasedUnionALeaf FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRebasedUnionALeaf(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionB.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionB.Serialization.cs index 057df45d059..ff00f928839 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionB.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionB.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator RebasedUnionB(ClientResult result) return DeserializeRebasedUnionB(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static new RebasedUnionB FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRebasedUnionB(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -170,7 +183,7 @@ internal static RebasedUnionB DeserializePetsUnion1(JsonElement element, ModelRe switch (discriminator.GetString()) { case "b": - return options.ShouldReadThroughProxy(typeof(RebasedUnionBLeaf), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RebasedUnionBLeaf.DeserializeRebasedUnionBLeaf(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RebasedUnionBLeaf.DeserializeRebasedUnionBLeaf(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'Pets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionBLeaf.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionBLeaf.Serialization.cs index 1b90afb5e32..9f8963b0d75 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionBLeaf.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionBLeaf.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator RebasedUnionBLeaf(ClientResult result) return DeserializeRebasedUnionBLeaf(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static new RebasedUnionBLeaf FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRebasedUnionBLeaf(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionPet.Serialization.cs index 045de4d471b..e35bfe7c54a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RebasedUnionPet.Serialization.cs @@ -172,9 +172,9 @@ internal static RebasedUnionPet DeserializeRebasedPetsUnion(JsonElement element, switch (discriminator.GetString()) { case "a": - return options.ShouldReadThroughProxy(typeof(RebasedUnionA), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RebasedUnionA.DeserializeRebasedUnionA(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RebasedUnionA.DeserializeRebasedUnionA(discriminator0, options); case "b": - return options.ShouldReadThroughProxy(typeof(RebasedUnionB), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RebasedUnionB.DeserializeRebasedUnionB(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RebasedUnionB.DeserializeRebasedUnionB(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'RebasedPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedConstructorLeaf.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedConstructorLeaf.Serialization.cs index b950c87ccab..086929914c8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedConstructorLeaf.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedConstructorLeaf.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(RenamedConstructorLeaf renamedCons return BinaryContent.Create(renamedConstructorLeaf, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal new BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedConstructorOverride.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedConstructorOverride.Serialization.cs index 823d1327b99..d0911b8739c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedConstructorOverride.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedConstructorOverride.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(RenamedConstructorOverride renamed return BinaryContent.Create(renamedConstructorOverride, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedConstructorReturnedName.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedConstructorReturnedName.Serialization.cs index c661992dbcf..c6ce7a0fb91 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedConstructorReturnedName.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedConstructorReturnedName.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(RenamedConstructorReturnedName ren return BinaryContent.Create(renamedConstructorReturnedName, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal new BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedLiteralConstructorOverride.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedLiteralConstructorOverride.Serialization.cs index 96f393ab9da..8e517ac4292 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedLiteralConstructorOverride.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedLiteralConstructorOverride.Serialization.cs @@ -66,6 +66,13 @@ public static implicit operator BinaryContent(RenamedLiteralConstructorOverride return BinaryContent.Create(renamedLiteralConstructorOverride, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator RenamedLiteralConstructorOverride(ClientResult result) { @@ -74,6 +81,19 @@ public static explicit operator RenamedLiteralConstructorOverride(ClientResult r return DeserializeRenamedLiteralConstructorOverride(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static RenamedLiteralConstructorOverride FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRenamedLiteralConstructorOverride(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedModelCustom.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedModelCustom.Serialization.cs index 67020de86a5..a8a6be91f95 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedModelCustom.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RenamedModelCustom.Serialization.cs @@ -72,6 +72,13 @@ public static implicit operator BinaryContent(RenamedModelCustom renamedModelCus return BinaryContent.Create(renamedModelCustom, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal new BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator RenamedModelCustom(ClientResult result) { @@ -80,6 +87,19 @@ public static explicit operator RenamedModelCustom(ClientResult result) return DeserializeRenamedModelCustom(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static new RenamedModelCustom FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRenamedModelCustom(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RequiredRenamedConstructorOverride.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RequiredRenamedConstructorOverride.Serialization.cs index 69f6ad2a475..603cf603a68 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RequiredRenamedConstructorOverride.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RequiredRenamedConstructorOverride.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(RequiredRenamedConstructorOverride return BinaryContent.Create(requiredRenamedConstructorOverride, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal new BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ReturnsAnonymousModelResult.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ReturnsAnonymousModelResult.Serialization.cs index 9d0371e973a..44f8339e568 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ReturnsAnonymousModelResult.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/ReturnsAnonymousModelResult.Serialization.cs @@ -64,6 +64,19 @@ public static explicit operator ReturnsAnonymousModelResult(ClientResult result) return DeserializeReturnsAnonymousModelResult(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static ReturnsAnonymousModelResult FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeReturnsAnonymousModelResult(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs index c162c0c01c8..d1df1d691ba 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(RoundTripModel roundTripModel) return BinaryContent.Create(roundTripModel, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator RoundTripModel(ClientResult result) { @@ -79,6 +86,19 @@ public static explicit operator RoundTripModel(ClientResult result) return DeserializeRoundTripModel(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static RoundTripModel FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRoundTripModel(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -408,7 +428,7 @@ internal static RoundTripModel DeserializeRoundTripModel(JsonElement element, Mo } if (prop.NameEquals("requiredModel"u8)) { - requiredModel = options.ShouldReadThroughProxy(typeof(Thing), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(prop.Value, options); + requiredModel = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : Thing.DeserializeThing(prop.Value, options); continue; } if (prop.NameEquals("intExtensibleEnum"u8)) @@ -622,7 +642,7 @@ internal static RoundTripModel DeserializeRoundTripModel(JsonElement element, Mo } if (prop.NameEquals("modelWithRequiredNullable"u8)) { - modelWithRequiredNullable = options.ShouldReadThroughProxy(typeof(ModelWithRequiredNullableProperties), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : ModelWithRequiredNullableProperties.DeserializeModelWithRequiredNullableProperties(prop.Value, options); + modelWithRequiredNullable = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : ModelWithRequiredNullableProperties.DeserializeModelWithRequiredNullableProperties(prop.Value, options); continue; } if (prop.NameEquals("requiredBytes"u8)) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SampleTypeSpecContext.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SampleTypeSpecContext.cs index 4cc8a0eee67..a1eeb02584e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SampleTypeSpecContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SampleTypeSpecContext.cs @@ -106,6 +106,7 @@ namespace SampleTypeSpec [ModelReaderWriterBuildable(typeof(XmlItem))] [ModelReaderWriterBuildable(typeof(XmlModelWithNamespace))] [ModelReaderWriterBuildable(typeof(XmlNestedModel))] + [ModelReaderWriterBuildable(typeof(XmlTreeContainer))] [ModelReaderWriterBuildable(typeof(XmlUnionCat))] [ModelReaderWriterBuildable(typeof(XmlUnionPet))] public partial class SampleTypeSpecContext : ModelReaderWriterContext diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SerializeNamedCat.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SerializeNamedCat.Serialization.cs index e88f1f970f9..eac59be4cef 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SerializeNamedCat.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SerializeNamedCat.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator SerializeNamedCat(ClientResult result) return DeserializeSerializeNamedCat(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static SerializeNamedCat FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSerializeNamedCat(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SerializePetsUnion.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SerializePetsUnion.Serialization.cs index 7a8afe7d12a..e99120f2bb1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SerializePetsUnion.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SerializePetsUnion.Serialization.cs @@ -162,7 +162,7 @@ internal static SerializePetsUnion DeserializePetsUnion1(JsonElement element, Mo switch (discriminator.GetString()) { case "cat": - return options.ShouldReadThroughProxy(typeof(SerializeNamedCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : SerializeNamedCat.DeserializeSerializeNamedCat(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : SerializeNamedCat.DeserializeSerializeNamedCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'Pets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Thing.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Thing.Serialization.cs index eb3496cb386..75d6cc2ffdb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Thing.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Thing.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(Thing thing) return BinaryContent.Create(thing, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator Thing(ClientResult result) { @@ -79,6 +86,19 @@ public static explicit operator Thing(ClientResult result) return DeserializeThing(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static Thing FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeThing(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Tree.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Tree.Serialization.cs index f8ecfe7a503..0c381eb5528 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Tree.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Tree.Serialization.cs @@ -95,11 +95,10 @@ public static implicit operator BinaryContent(Tree tree) return BinaryContent.Create(tree, ModelSerializationExtensions.WireOptions); } - /// Converts the model to BinaryContent using the specified format. - /// The format to use for serialization. - internal BinaryContent ToBinaryContent(string format) + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) { - ModelReaderWriterOptions options = new ModelReaderWriterOptions(format); return BinaryContent.Create(this, options); } @@ -123,6 +122,35 @@ public static explicit operator Tree(ClientResult result) return DeserializeTree(XElement.Load(stream, LoadOptions.PreserveWhitespace), ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static Tree FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + + if (response.Headers.TryGetValue("Content-Type", out string value) && value.StartsWith("application/json", StringComparison.OrdinalIgnoreCase)) + { + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTree(document.RootElement, options); + } + + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options.ToXmlOptions(), SampleTypeSpecContext.Default); + } + using Stream stream = response.ContentStream; + if (stream == null) + { + return default; + } + + return DeserializeTree(XElement.Load(stream, LoadOptions.PreserveWhitespace), options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionCat.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionCat.Serialization.cs index ec67ac876b5..751f50b1e40 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionCat.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionCat.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator UnionCat(ClientResult result) return DeserializeUnionCat(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static UnionCat FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnionCat(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionDog.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionDog.Serialization.cs index 0a8fae55e16..01bdcac2933 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionDog.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionDog.Serialization.cs @@ -69,6 +69,19 @@ public static explicit operator UnionDog(ClientResult result) return DeserializeUnionDog(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static UnionDog FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnionDog(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionPet.Serialization.cs index 41649f4d640..573effb81c9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionPet.Serialization.cs @@ -172,9 +172,9 @@ internal static UnionPet DeserializeUnionPetsUnion(JsonElement element, ModelRea switch (discriminator.GetString()) { case "cat": - return options.ShouldReadThroughProxy(typeof(UnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : UnionCat.DeserializeUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : UnionCat.DeserializeUnionCat(discriminator0, options); case "dog": - return options.ShouldReadThroughProxy(typeof(UnionDog), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : UnionDog.DeserializeUnionDog(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : UnionDog.DeserializeUnionDog(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'UnionPets'."); } @@ -228,9 +228,9 @@ internal static UnionPet DeserializeAlternateUnionPetsUnion(JsonElement element, switch (discriminator.GetString()) { case "feline": - return options.ShouldReadThroughProxy(typeof(UnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : UnionCat.DeserializeUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : UnionCat.DeserializeUnionCat(discriminator0, options); case "canine": - return options.ShouldReadThroughProxy(typeof(UnionDog), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : UnionDog.DeserializeUnionDog(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : UnionDog.DeserializeUnionDog(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'AlternateUnionPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionPetContainer.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionPetContainer.Serialization.cs index e3f5647dd12..d77a28dbb51 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionPetContainer.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/UnionPetContainer.Serialization.cs @@ -71,6 +71,13 @@ public static implicit operator BinaryContent(UnionPetContainer unionPetContaine return BinaryContent.Create(unionPetContainer, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator UnionPetContainer(ClientResult result) { @@ -79,6 +86,19 @@ public static explicit operator UnionPetContainer(ClientResult result) return DeserializeUnionPetContainer(document.RootElement, ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static UnionPetContainer FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnionPetContainer(document.RootElement, options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Wrapper.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Wrapper.Serialization.cs index 64bdc587d79..2ba0bb83bfc 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Wrapper.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Wrapper.Serialization.cs @@ -130,7 +130,7 @@ internal static Wrapper DeserializeWrapper(JsonElement element, ModelReaderWrite { if (prop.NameEquals("action"u8)) { - action = options.ShouldReadThroughProxy(typeof(RoundTripModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RoundTripModel.DeserializeRoundTripModel(prop.Value, options); + action = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(prop.Value.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : RoundTripModel.DeserializeRoundTripModel(prop.Value, options); continue; } if (options.Format != "W") diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlAdvancedModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlAdvancedModel.Serialization.cs index b6f1ad2b927..a2e4a817022 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlAdvancedModel.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlAdvancedModel.Serialization.cs @@ -87,6 +87,13 @@ public static implicit operator BinaryContent(XmlAdvancedModel xmlAdvancedModel) return BinaryContent.Create(xmlAdvancedModel, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator XmlAdvancedModel(ClientResult result) { @@ -100,6 +107,24 @@ public static explicit operator XmlAdvancedModel(ClientResult result) return DeserializeXmlAdvancedModel(XElement.Load(stream, LoadOptions.PreserveWhitespace), ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static XmlAdvancedModel FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using Stream stream = response.ContentStream; + if (stream == null) + { + return default; + } + + return DeserializeXmlAdvancedModel(XElement.Load(stream, LoadOptions.PreserveWhitespace), options); + } + /// The XML writer. /// The client options for reading and writing models. /// An optional name hint. @@ -499,7 +524,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M } if (localName == "unwrappedItems") { - unwrappedItems.Add(options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(child, options)); + unwrappedItems.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(child, options)); continue; } if (localName == "wrappedColors") @@ -517,19 +542,19 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M List array = new List(); foreach (var e in child.Elements("Item")) { - array.Add(options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(e.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(e, options)); + array.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(e.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(e, options)); } items = array; continue; } if (localName == "nestedModel") { - nestedModel = options.ShouldReadThroughProxy(typeof(XmlNestedModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlNestedModel.DeserializeXmlNestedModel(child, options); + nestedModel = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlNestedModel.DeserializeXmlNestedModel(child, options); continue; } if (localName == "optionalNestedModel") { - optionalNestedModel = options.ShouldReadThroughProxy(typeof(XmlNestedModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlNestedModel.DeserializeXmlNestedModel(child, options); + optionalNestedModel = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlNestedModel.DeserializeXmlNestedModel(child, options); continue; } if (localName == "metadata") @@ -604,7 +629,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M } if (localName == "anotherModel" && ns == anotherModelNs) { - anotherModel = options.ShouldReadThroughProxy(typeof(XmlNestedModel), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlNestedModel.DeserializeXmlNestedModel(child, options); + anotherModel = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlNestedModel.DeserializeXmlNestedModel(child, options); continue; } if (localName == "modelsWithNamespaces") @@ -612,14 +637,14 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M List array = new List(); foreach (var e in child.Elements(modelsWithNamespacesNs + "XmlModelWithNamespace")) { - array.Add(options.ShouldReadThroughProxy(typeof(XmlModelWithNamespace), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(e.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlModelWithNamespace.DeserializeXmlModelWithNamespace(e, options)); + array.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(e.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlModelWithNamespace.DeserializeXmlModelWithNamespace(e, options)); } modelsWithNamespaces = array; continue; } if (localName == "unwrappedModelsWithNamespaces") { - unwrappedModelsWithNamespaces.Add(options.ShouldReadThroughProxy(typeof(XmlModelWithNamespace), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlModelWithNamespace.DeserializeXmlModelWithNamespace(child, options)); + unwrappedModelsWithNamespaces.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlModelWithNamespace.DeserializeXmlModelWithNamespace(child, options)); continue; } if (localName == "listOfListFoo") @@ -630,7 +655,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M List list = new List(); foreach (var item in e.Elements()) { - list.Add(options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(item, options)); + list.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(item, options)); } array.Add(list); } @@ -642,7 +667,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M Dictionary dictionary = new Dictionary(); foreach (var e in child.Elements()) { - dictionary.Add(e.Name.LocalName, options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(e.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(e, options)); + dictionary.Add(e.Name.LocalName, options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(e.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(e, options)); } dictionaryFoo = dictionary; continue; @@ -655,7 +680,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M Dictionary dict = new Dictionary(); foreach (var item in e.Elements()) { - dict.Add(item.Name.LocalName, options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(item, options)); + dict.Add(item.Name.LocalName, options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(item, options)); } dictionary.Add(e.Name.LocalName, dict); } @@ -670,7 +695,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M List list = new List(); foreach (var item in e.Elements()) { - list.Add(options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(item, options)); + list.Add(options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(item, options)); } dictionary.Add(e.Name.LocalName, list); } @@ -685,7 +710,7 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M Dictionary dict = new Dictionary(); foreach (var item in e.Elements()) { - dict.Add(item.Name.LocalName, options.ShouldReadThroughProxy(typeof(XmlItem), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(item, options)); + dict.Add(item.Name.LocalName, options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(item.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlItem.DeserializeXmlItem(item, options)); } array.Add(dict); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlConstructorOverride.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlConstructorOverride.Serialization.cs index 6a9c9cdac38..f0a50256110 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlConstructorOverride.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlConstructorOverride.Serialization.cs @@ -86,6 +86,13 @@ public static implicit operator BinaryContent(XmlConstructorOverride xmlConstruc return BinaryContent.Create(xmlConstructorOverride, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) + { + return BinaryContent.Create(this, options); + } + /// The XML writer. /// The client options for reading and writing models. /// An optional name hint. diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.Serialization.cs new file mode 100644 index 00000000000..82c70593814 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.IO; +using System.Xml; +using System.Xml.Linq; + +namespace SampleTypeSpec +{ + /// XML-only container whose nested tree also supports JSON. + public partial class XmlTreeContainer : IPersistableModel + { + /// Initializes a new instance of for deserialization. + internal XmlTreeContainer() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual XmlTreeContainer PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "X": + using (Stream dataStream = data.ToStream()) + { + return DeserializeXmlTreeContainer(XElement.Load(dataStream, LoadOptions.PreserveWhitespace), options); + } + default: + throw new FormatException($"The model {nameof(XmlTreeContainer)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "X": + using (MemoryStream stream = new MemoryStream(256)) + { + using (XmlWriter writer = XmlWriter.Create(stream, ModelSerializationExtensions.XmlWriterSettings)) + { + WriteXml(writer, options, "XmlTreeContainer"); + } + if (stream.Position > int.MaxValue) + { + return BinaryData.FromStream(stream); + } + else + { + return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); + } + } + default: + throw new FormatException($"The model {nameof(XmlTreeContainer)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + XmlTreeContainer IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "X"; + + /// The to deserialize the from. + public static explicit operator XmlTreeContainer(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using Stream stream = response.ContentStream; + if (stream == null) + { + return default; + } + + return DeserializeXmlTreeContainer(XElement.Load(stream, LoadOptions.PreserveWhitespace), ModelSerializationExtensions.WireOptions); + } + + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static XmlTreeContainer FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using Stream stream = response.ContentStream; + if (stream == null) + { + return default; + } + + return DeserializeXmlTreeContainer(XElement.Load(stream, LoadOptions.PreserveWhitespace), options); + } + + /// The XML writer. + /// The client options for reading and writing models. + /// An optional name hint. + private void WriteXml(XmlWriter writer, ModelReaderWriterOptions options, string nameHint) + { + if (nameHint != null) + { + writer.WriteStartElement(nameHint); + } + + XmlModelWriteCore(writer, options); + + if (nameHint != null) + { + writer.WriteEndElement(); + } + } + + /// The XML writer. + /// The client options for reading and writing models. + internal virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "X") + { + throw new FormatException($"The model {nameof(XmlTreeContainer)} does not support writing '{format}' format."); + } + + writer.WriteStartElement("tree"); + writer.WriteObjectValue(Tree, options); + writer.WriteEndElement(); + } + + /// The xml element to deserialize. + /// The client options for reading and writing models. + internal static XmlTreeContainer DeserializeXmlTreeContainer(XElement element, ModelReaderWriterOptions options) + { + if (element == null) + { + return null; + } + + Tree tree = default; + + foreach (var child in element.Elements()) + { + string localName = child.Name.LocalName; + if (localName == "tree") + { + tree = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options.ToXmlOptions(), SampleTypeSpecContext.Default) : Tree.DeserializeTree(child, options); + continue; + } + } + return new XmlTreeContainer(tree); + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.cs new file mode 100644 index 00000000000..9399f1230f9 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace SampleTypeSpec +{ + /// XML-only container whose nested tree also supports JSON. + public partial class XmlTreeContainer + { + /// Initializes a new instance of . + /// The nested tree. + internal XmlTreeContainer(Tree tree) + { + Tree = tree; + } + + /// The nested tree. + public Tree Tree { get; } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlUnionCat.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlUnionCat.Serialization.cs index 2379e622e56..afffa11e99b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlUnionCat.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlUnionCat.Serialization.cs @@ -105,6 +105,35 @@ public static explicit operator XmlUnionCat(ClientResult result) return DeserializeXmlUnionCat(XElement.Load(stream, LoadOptions.PreserveWhitespace), ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static new XmlUnionCat FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + + if (response.Headers.TryGetValue("Content-Type", out string value) && value.StartsWith("application/json", StringComparison.OrdinalIgnoreCase)) + { + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeXmlUnionCat(document.RootElement, options); + } + + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options.ToXmlOptions(), SampleTypeSpecContext.Default); + } + using Stream stream = response.ContentStream; + if (stream == null) + { + return default; + } + + return DeserializeXmlUnionCat(XElement.Load(stream, LoadOptions.PreserveWhitespace), options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlUnionPet.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlUnionPet.Serialization.cs index 38dc62255f2..fd3e5dce926 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlUnionPet.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlUnionPet.Serialization.cs @@ -95,11 +95,10 @@ public static implicit operator BinaryContent(XmlUnionPet xmlUnionPet) return BinaryContent.Create(xmlUnionPet, ModelSerializationExtensions.WireOptions); } - /// Converts the model to BinaryContent using the specified format. - /// The format to use for serialization. - internal BinaryContent ToBinaryContent(string format) + /// Converts the model to BinaryContent using the specified options. + /// The options used to write the model, including the registered model proxies. + internal BinaryContent ToBinaryContent(ModelReaderWriterOptions options) { - ModelReaderWriterOptions options = new ModelReaderWriterOptions(format); return BinaryContent.Create(this, options); } @@ -123,6 +122,35 @@ public static explicit operator XmlUnionPet(ClientResult result) return DeserializeXmlUnionPet(XElement.Load(stream, LoadOptions.PreserveWhitespace), ModelSerializationExtensions.WireOptions); } + /// The to deserialize the from. + /// The options used to read the model, including the registered model proxies. + internal static XmlUnionPet FromClientResult(ClientResult result, ModelReaderWriterOptions options) + { + PipelineResponse response = result.GetRawResponse(); + + if (response.Headers.TryGetValue("Content-Type", out string value) && value.StartsWith("application/json", StringComparison.OrdinalIgnoreCase)) + { + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); + } + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeXmlUnionPet(document.RootElement, options); + } + + if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) + { + return ModelReaderWriter.Read(response.Content, options.ToXmlOptions(), SampleTypeSpecContext.Default); + } + using Stream stream = response.ContentStream; + if (stream == null) + { + return default; + } + + return DeserializeXmlUnionPet(XElement.Load(stream, LoadOptions.PreserveWhitespace), options); + } + /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -240,7 +268,7 @@ internal static XmlUnionPet DeserializeXmlUnionPetsUnion(JsonElement element, Mo switch (discriminator.GetString()) { case "cat": - return options.ShouldReadThroughProxy(typeof(XmlUnionCat), SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlUnionCat.DeserializeXmlUnionCat(discriminator0, options); + return options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(discriminator0.GetUtf8Bytes(), options, SampleTypeSpecContext.Default) : XmlUnionCat.DeserializeXmlUnionCat(discriminator0, options); default: throw new JsonException("Unknown discriminator value for union 'XmlUnionPets'."); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Notebooks.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Notebooks.cs index 1fecec56e9e..13fad2632dd 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Notebooks.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Notebooks.cs @@ -19,6 +19,7 @@ namespace SampleTypeSpec public partial class Notebooks { private readonly Uri _endpoint; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions = ModelSerializationExtensions.WireOptions; private const string AuthorizationHeader = "my-api-key"; /// The OAuth2 flows supported by the service. private static readonly Dictionary[] _flows = new Dictionary[] @@ -39,12 +40,14 @@ protected Notebooks() /// Initializes a new instance of Notebooks. /// The HTTP pipeline for sending and receiving REST requests and responses. + /// /// Service endpoint. /// - internal Notebooks(ClientPipeline pipeline, Uri endpoint, string notebook) + internal Notebooks(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, string notebook) { _endpoint = endpoint; Pipeline = pipeline; + _modelReaderWriterOptions = modelReaderWriterOptions; _notebook = notebook; } @@ -90,6 +93,7 @@ internal Notebooks(AuthenticationPolicy authenticationPolicy, Uri endpoint, stri { Pipeline = ClientPipeline.Create(options, Array.Empty(), new PipelinePolicy[] { new UserAgentPolicy(typeof(Notebooks).Assembly) }, Array.Empty()); } + _modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); } /// Initializes a new instance of Notebooks. @@ -164,7 +168,7 @@ public virtual async Task GetNotebookAsync(RequestOptions options) public virtual ClientResult GetNotebook(CancellationToken cancellationToken = default) { ClientResult result = GetNotebook(cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((GetNotebookResult)result, result.GetRawResponse()); + return ClientResult.FromValue(GetNotebookResult.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Get a notebook by name. @@ -173,7 +177,7 @@ public virtual ClientResult GetNotebook(CancellationToken can public virtual async Task> GetNotebookAsync(CancellationToken cancellationToken = default) { ClientResult result = await GetNotebookAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((GetNotebookResult)result, result.GetRawResponse()); + return ClientResult.FromValue(GetNotebookResult.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PetOperations.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PetOperations.cs index 7f7531baa9d..eb9d413ba53 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PetOperations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PetOperations.cs @@ -17,6 +17,7 @@ namespace SampleTypeSpec public partial class PetOperations { private readonly Uri _endpoint; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions = ModelSerializationExtensions.WireOptions; /// Initializes a new instance of PetOperations for mocking. protected PetOperations() @@ -25,11 +26,13 @@ protected PetOperations() /// Initializes a new instance of PetOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. + /// /// Service endpoint. - internal PetOperations(ClientPipeline pipeline, Uri endpoint) + internal PetOperations(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) { _endpoint = endpoint; Pipeline = pipeline; + _modelReaderWriterOptions = modelReaderWriterOptions; } /// The HTTP pipeline for sending and receiving REST requests and responses. @@ -86,8 +89,8 @@ public virtual ClientResult UpdatePetAsPet(Pet pet, CancellationToken cance { Argument.AssertNotNull(pet, nameof(pet)); - ClientResult result = UpdatePetAsPet(pet, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Pet)result, result.GetRawResponse()); + ClientResult result = UpdatePetAsPet(pet.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(Pet.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Update a pet as a pet. @@ -99,8 +102,8 @@ public virtual async Task> UpdatePetAsPetAsync(Pet pet, Cancel { Argument.AssertNotNull(pet, nameof(pet)); - ClientResult result = await UpdatePetAsPetAsync(pet, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Pet)result, result.GetRawResponse()); + ClientResult result = await UpdatePetAsPetAsync(pet.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(Pet.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -154,8 +157,8 @@ public virtual ClientResult UpdateDogAsPet(Pet pet, CancellationToken cance { Argument.AssertNotNull(pet, nameof(pet)); - ClientResult result = UpdateDogAsPet(pet, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Pet)result, result.GetRawResponse()); + ClientResult result = UpdateDogAsPet(pet.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(Pet.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Update a dog as a pet. @@ -167,8 +170,8 @@ public virtual async Task> UpdateDogAsPetAsync(Pet pet, Cancel { Argument.AssertNotNull(pet, nameof(pet)); - ClientResult result = await UpdateDogAsPetAsync(pet, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Pet)result, result.GetRawResponse()); + ClientResult result = await UpdateDogAsPetAsync(pet.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(Pet.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.RestClient.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.RestClient.cs index 2e630d7c798..e0fd5dcaa14 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.RestClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.RestClient.cs @@ -68,5 +68,17 @@ internal PipelineMessage CreateUpdateTreeAsJsonRequest(BinaryContent content, Re message.Apply(options); return message; } + + internal PipelineMessage CreateGetTreeContainerRequest(RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/plants/tree/container", false); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + request.Headers.Set("Accept", "application/xml"); + message.Apply(options); + return message; + } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.cs index 6db6d1ce51e..08397e41720 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.cs @@ -17,6 +17,7 @@ namespace SampleTypeSpec public partial class PlantOperations { private readonly Uri _endpoint; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions = ModelSerializationExtensions.WireOptions; /// Initializes a new instance of PlantOperations for mocking. protected PlantOperations() @@ -25,11 +26,13 @@ protected PlantOperations() /// Initializes a new instance of PlantOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. + /// /// Service endpoint. - internal PlantOperations(ClientPipeline pipeline, Uri endpoint) + internal PlantOperations(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) { _endpoint = endpoint; Pipeline = pipeline; + _modelReaderWriterOptions = modelReaderWriterOptions; } /// The HTTP pipeline for sending and receiving REST requests and responses. @@ -75,7 +78,7 @@ public virtual async Task GetTreeAsync(RequestOptions options) public virtual ClientResult GetTree(CancellationToken cancellationToken = default) { ClientResult result = GetTree(cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + return ClientResult.FromValue(Tree.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Get a tree as a plant. @@ -84,7 +87,7 @@ public virtual ClientResult GetTree(CancellationToken cancellationToken = public virtual async Task> GetTreeAsync(CancellationToken cancellationToken = default) { ClientResult result = await GetTreeAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + return ClientResult.FromValue(Tree.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -127,7 +130,7 @@ public virtual async Task GetTreeAsJsonAsync(RequestOptions option public virtual ClientResult GetTreeAsJson(CancellationToken cancellationToken = default) { ClientResult result = GetTreeAsJson(cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + return ClientResult.FromValue(Tree.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Get a tree as a plant. @@ -136,7 +139,7 @@ public virtual ClientResult GetTreeAsJson(CancellationToken cancellationTo public virtual async Task> GetTreeAsJsonAsync(CancellationToken cancellationToken = default) { ClientResult result = await GetTreeAsJsonAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + return ClientResult.FromValue(Tree.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -190,9 +193,9 @@ public virtual ClientResult UpdateTree(Tree tree, CancellationToken cancel { Argument.AssertNotNull(tree, nameof(tree)); - using BinaryContent content = tree.ToBinaryContent("X"); + using BinaryContent content = tree.ToBinaryContent(_modelReaderWriterOptions.ToXmlOptions()); ClientResult result = UpdateTree(content, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + return ClientResult.FromValue(Tree.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Update a tree as a plant. @@ -204,9 +207,9 @@ public virtual async Task> UpdateTreeAsync(Tree tree, Cancell { Argument.AssertNotNull(tree, nameof(tree)); - using BinaryContent content = tree.ToBinaryContent("X"); + using BinaryContent content = tree.ToBinaryContent(_modelReaderWriterOptions.ToXmlOptions()); ClientResult result = await UpdateTreeAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + return ClientResult.FromValue(Tree.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -260,9 +263,9 @@ public virtual ClientResult UpdateTreeAsJson(Tree tree, CancellationToken { Argument.AssertNotNull(tree, nameof(tree)); - using BinaryContent content = tree.ToBinaryContent("J"); + using BinaryContent content = tree.ToBinaryContent(_modelReaderWriterOptions); ClientResult result = UpdateTreeAsJson(content, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + return ClientResult.FromValue(Tree.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Update a tree as a plant. @@ -274,9 +277,61 @@ public virtual async Task> UpdateTreeAsJsonAsync(Tree tree, C { Argument.AssertNotNull(tree, nameof(tree)); - using BinaryContent content = tree.ToBinaryContent("J"); + using BinaryContent content = tree.ToBinaryContent(_modelReaderWriterOptions); ClientResult result = await UpdateTreeAsJsonAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + return ClientResult.FromValue(Tree.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); + } + + /// + /// [Protocol Method] Get an XML-only container that nests a tree, which also supports JSON + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual ClientResult GetTreeContainer(RequestOptions options) + { + using PipelineMessage message = CreateGetTreeContainerRequest(options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Get an XML-only container that nests a tree, which also supports JSON + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task GetTreeContainerAsync(RequestOptions options) + { + using PipelineMessage message = CreateGetTreeContainerRequest(options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Get an XML-only container that nests a tree, which also supports JSON. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual ClientResult GetTreeContainer(CancellationToken cancellationToken = default) + { + ClientResult result = GetTreeContainer(cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(XmlTreeContainer.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); + } + + /// Get an XML-only container that nests a tree, which also supports JSON. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual async Task> GetTreeContainerAsync(CancellationToken cancellationToken = default) + { + ClientResult result = await GetTreeContainerAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(XmlTreeContainer.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecClient.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecClient.cs index d8c426472fd..e010539e3d2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecClient.cs @@ -22,6 +22,7 @@ namespace SampleTypeSpec public partial class SampleTypeSpecClient { private readonly Uri _endpoint; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions = ModelSerializationExtensions.WireOptions; private const string AuthorizationHeader = "my-api-key"; /// The OAuth2 flows supported by the service. private static readonly Dictionary[] _flows = new Dictionary[] @@ -76,6 +77,7 @@ internal SampleTypeSpecClient(AuthenticationPolicy authenticationPolicy, Uri end { Pipeline = ClientPipeline.Create(options, Array.Empty(), new PipelinePolicy[] { new UserAgentPolicy(typeof(SampleTypeSpecClient).Assembly) }, Array.Empty()); } + _modelReaderWriterOptions = options.ModelProxies.ToWireOptions(); _apiVersion = options.Version; } @@ -171,7 +173,7 @@ public virtual ClientResult SayHi(string headParameter, string queryParam Argument.AssertNotNullOrEmpty(queryParameter, nameof(queryParameter)); ClientResult result = SayHi(headParameter, queryParameter, optionalQuery, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Return hi. @@ -188,7 +190,7 @@ public virtual async Task> SayHiAsync(string headParameter, Argument.AssertNotNullOrEmpty(queryParameter, nameof(queryParameter)); ClientResult result = await SayHiAsync(headParameter, queryParameter, optionalQuery, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -257,8 +259,8 @@ public virtual ClientResult HelloAgain(string p2, string p1, Rou Argument.AssertNotNullOrEmpty(p1, nameof(p1)); Argument.AssertNotNull(action, nameof(action)); - ClientResult result = HelloAgain(p2, p1, action, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((RoundTripModel)result, result.GetRawResponse()); + ClientResult result = HelloAgain(p2, p1, action.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(RoundTripModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Return hi again. @@ -275,8 +277,8 @@ public virtual async Task> HelloAgainAsync(string p Argument.AssertNotNullOrEmpty(p1, nameof(p1)); Argument.AssertNotNull(action, nameof(action)); - ClientResult result = await HelloAgainAsync(p2, p1, action, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((RoundTripModel)result, result.GetRawResponse()); + ClientResult result = await HelloAgainAsync(p2, p1, action.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(RoundTripModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -341,7 +343,7 @@ public virtual ClientResult NoContentType(Wrapper info, Cancella Argument.AssertNotNull(info, nameof(info)); ClientResult result = NoContentType(info.P2, info.P1, info.Action, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((RoundTripModel)result, result.GetRawResponse()); + return ClientResult.FromValue(RoundTripModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Return hi again. @@ -354,7 +356,7 @@ public virtual async Task> NoContentTypeAsync(Wrapp Argument.AssertNotNull(info, nameof(info)); ClientResult result = await NoContentTypeAsync(info.P2, info.P1, info.Action, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((RoundTripModel)result, result.GetRawResponse()); + return ClientResult.FromValue(RoundTripModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -400,7 +402,7 @@ public virtual async Task HelloDemo2Async(RequestOptions options) public virtual ClientResult HelloDemo2(CancellationToken cancellationToken = default) { ClientResult result = HelloDemo2(cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Return hi in demo2. @@ -410,7 +412,7 @@ public virtual ClientResult HelloDemo2(CancellationToken cancellationToke public virtual async Task> HelloDemo2Async(CancellationToken cancellationToken = default) { ClientResult result = await HelloDemo2Async(cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -464,8 +466,8 @@ public virtual ClientResult CreateLiteral(Thing body, CancellationToken c { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = CreateLiteral(body, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + ClientResult result = CreateLiteral(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Create with literal value. @@ -477,8 +479,8 @@ public virtual async Task> CreateLiteralAsync(Thing body, Ca { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = await CreateLiteralAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + ClientResult result = await CreateLiteralAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -521,7 +523,7 @@ public virtual async Task HelloLiteralAsync(RequestOptions options public virtual ClientResult HelloLiteral(CancellationToken cancellationToken = default) { ClientResult result = HelloLiteral(cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Send literal parameters. @@ -530,7 +532,7 @@ public virtual ClientResult HelloLiteral(CancellationToken cancellationTo public virtual async Task> HelloLiteralAsync(CancellationToken cancellationToken = default) { ClientResult result = await HelloLiteralAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -576,7 +578,7 @@ public virtual async Task TopActionAsync(DateTimeOffset action, Re public virtual ClientResult TopAction(DateTimeOffset action, CancellationToken cancellationToken = default) { ClientResult result = TopAction(action, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// top level method. @@ -586,7 +588,7 @@ public virtual ClientResult TopAction(DateTimeOffset action, Cancellation public virtual async Task> TopActionAsync(DateTimeOffset action, CancellationToken cancellationToken = default) { ClientResult result = await TopActionAsync(action, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -754,8 +756,8 @@ public virtual ClientResult AnonymousBody(string name, BinaryData require requiredNullableList?.ToList() as IList ?? new ChangeTrackingList(), propertyWithSpecialDocs, default); - ClientResult result = AnonymousBody(spreadModel, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + ClientResult result = AnonymousBody(spreadModel.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// body parameter without body decorator. @@ -805,8 +807,8 @@ public virtual async Task> AnonymousBodyAsync(string name, B requiredNullableList?.ToList() as IList ?? new ChangeTrackingList(), propertyWithSpecialDocs, default); - ClientResult result = await AnonymousBodyAsync(spreadModel, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + ClientResult result = await AnonymousBodyAsync(spreadModel.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -862,8 +864,8 @@ public virtual ClientResult FriendlyModel(string name, CancellationToken Argument.AssertNotNullOrEmpty(name, nameof(name)); Friend spreadModel = new Friend(name, default); - ClientResult result = FriendlyModel(spreadModel, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Friend)result, result.GetRawResponse()); + ClientResult result = FriendlyModel(spreadModel.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(Friend.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Model can have its friendly name. @@ -877,8 +879,8 @@ public virtual async Task> FriendlyModelAsync(string name, Argument.AssertNotNullOrEmpty(name, nameof(name)); Friend spreadModel = new Friend(name, default); - ClientResult result = await FriendlyModelAsync(spreadModel, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Friend)result, result.GetRawResponse()); + ClientResult result = await FriendlyModelAsync(spreadModel.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(Friend.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -984,8 +986,8 @@ public virtual ClientResult ProjectedNameModel(string otherN Argument.AssertNotNullOrEmpty(otherName, nameof(otherName)); RenamedModelCustom spreadModel = new RenamedModelCustom(default, otherName); - ClientResult result = ProjectedNameModel(spreadModel, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((RenamedModelCustom)result, result.GetRawResponse()); + ClientResult result = ProjectedNameModel(spreadModel.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(RenamedModelCustom.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Model can have its projected name. @@ -999,8 +1001,8 @@ public virtual async Task> ProjectedNameModelAs Argument.AssertNotNullOrEmpty(otherName, nameof(otherName)); RenamedModelCustom spreadModel = new RenamedModelCustom(default, otherName); - ClientResult result = await ProjectedNameModelAsync(spreadModel, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((RenamedModelCustom)result, result.GetRawResponse()); + ClientResult result = await ProjectedNameModelAsync(spreadModel.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(RenamedModelCustom.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1043,7 +1045,7 @@ public virtual async Task ReturnsAnonymousModelAsync(RequestOption public virtual ClientResult ReturnsAnonymousModel(CancellationToken cancellationToken = default) { ClientResult result = ReturnsAnonymousModel(cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((ReturnsAnonymousModelResult)result, result.GetRawResponse()); + return ClientResult.FromValue(ReturnsAnonymousModelResult.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// return anonymous model. @@ -1052,7 +1054,7 @@ public virtual ClientResult ReturnsAnonymousModel(C public virtual async Task> ReturnsAnonymousModelAsync(CancellationToken cancellationToken = default) { ClientResult result = await ReturnsAnonymousModelAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((ReturnsAnonymousModelResult)result, result.GetRawResponse()); + return ClientResult.FromValue(ReturnsAnonymousModelResult.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1154,8 +1156,8 @@ public virtual ClientResult InternalProtocol(Thing body, CancellationToke { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = InternalProtocol(body, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + ClientResult result = InternalProtocol(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// When set protocol false and convenient true, then the protocol method should be internal. @@ -1167,8 +1169,8 @@ public virtual async Task> InternalProtocolAsync(Thing body, { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = await InternalProtocolAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + ClientResult result = await InternalProtocolAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(Thing.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1374,7 +1376,7 @@ public virtual async Task WithApiVersionAsync(string p1, Cancellat /// The response returned from the service. public virtual CollectionResult GetWithNextLink(RequestOptions options) { - return new SampleTypeSpecClientGetWithNextLinkCollectionResult(this, options); + return new SampleTypeSpecClientGetWithNextLinkCollectionResult(this, _modelReaderWriterOptions, options); } /// @@ -1390,7 +1392,7 @@ public virtual CollectionResult GetWithNextLink(RequestOptions options) /// The response returned from the service. public virtual AsyncCollectionResult GetWithNextLinkAsync(RequestOptions options) { - return new SampleTypeSpecClientGetWithNextLinkAsyncCollectionResult(this, options); + return new SampleTypeSpecClientGetWithNextLinkAsyncCollectionResult(this, _modelReaderWriterOptions, options); } /// List things with nextlink. @@ -1398,7 +1400,7 @@ public virtual AsyncCollectionResult GetWithNextLinkAsync(RequestOptions options /// Service returned a non-success status code. public virtual CollectionResult GetWithNextLink(CancellationToken cancellationToken = default) { - return new SampleTypeSpecClientGetWithNextLinkCollectionResultOfT(this, cancellationToken.ToRequestOptions()); + return new SampleTypeSpecClientGetWithNextLinkCollectionResultOfT(this, _modelReaderWriterOptions, cancellationToken.ToRequestOptions()); } /// List things with nextlink. @@ -1406,7 +1408,7 @@ public virtual CollectionResult GetWithNextLink(CancellationToken cancell /// Service returned a non-success status code. public virtual AsyncCollectionResult GetWithNextLinkAsync(CancellationToken cancellationToken = default) { - return new SampleTypeSpecClientGetWithNextLinkAsyncCollectionResultOfT(this, cancellationToken.ToRequestOptions()); + return new SampleTypeSpecClientGetWithNextLinkAsyncCollectionResultOfT(this, _modelReaderWriterOptions, cancellationToken.ToRequestOptions()); } /// @@ -1422,7 +1424,7 @@ public virtual AsyncCollectionResult GetWithNextLinkAsync(CancellationTok /// The response returned from the service. public virtual CollectionResult GetWithStringNextLink(RequestOptions options) { - return new SampleTypeSpecClientGetWithStringNextLinkCollectionResult(this, options); + return new SampleTypeSpecClientGetWithStringNextLinkCollectionResult(this, _modelReaderWriterOptions, options); } /// @@ -1438,7 +1440,7 @@ public virtual CollectionResult GetWithStringNextLink(RequestOptions options) /// The response returned from the service. public virtual AsyncCollectionResult GetWithStringNextLinkAsync(RequestOptions options) { - return new SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResult(this, options); + return new SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResult(this, _modelReaderWriterOptions, options); } /// List things with nextlink. @@ -1446,7 +1448,7 @@ public virtual AsyncCollectionResult GetWithStringNextLinkAsync(RequestOptions o /// Service returned a non-success status code. public virtual CollectionResult GetWithStringNextLink(CancellationToken cancellationToken = default) { - return new SampleTypeSpecClientGetWithStringNextLinkCollectionResultOfT(this, cancellationToken.ToRequestOptions()); + return new SampleTypeSpecClientGetWithStringNextLinkCollectionResultOfT(this, _modelReaderWriterOptions, cancellationToken.ToRequestOptions()); } /// List things with nextlink. @@ -1454,7 +1456,7 @@ public virtual CollectionResult GetWithStringNextLink(CancellationToken c /// Service returned a non-success status code. public virtual AsyncCollectionResult GetWithStringNextLinkAsync(CancellationToken cancellationToken = default) { - return new SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT(this, cancellationToken.ToRequestOptions()); + return new SampleTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT(this, _modelReaderWriterOptions, cancellationToken.ToRequestOptions()); } /// @@ -1471,7 +1473,7 @@ public virtual AsyncCollectionResult GetWithStringNextLinkAsync(Cancellat /// The response returned from the service. public virtual CollectionResult GetWithContinuationToken(string token, RequestOptions options) { - return new SampleTypeSpecClientGetWithContinuationTokenCollectionResult(this, token, options); + return new SampleTypeSpecClientGetWithContinuationTokenCollectionResult(this, _modelReaderWriterOptions, token, options); } /// @@ -1488,7 +1490,7 @@ public virtual CollectionResult GetWithContinuationToken(string token, RequestOp /// The response returned from the service. public virtual AsyncCollectionResult GetWithContinuationTokenAsync(string token, RequestOptions options) { - return new SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResult(this, token, options); + return new SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResult(this, _modelReaderWriterOptions, token, options); } /// List things with continuation token. @@ -1497,7 +1499,7 @@ public virtual AsyncCollectionResult GetWithContinuationTokenAsync(string token, /// Service returned a non-success status code. public virtual CollectionResult GetWithContinuationToken(string token = default, CancellationToken cancellationToken = default) { - return new SampleTypeSpecClientGetWithContinuationTokenCollectionResultOfT(this, token, cancellationToken.ToRequestOptions()); + return new SampleTypeSpecClientGetWithContinuationTokenCollectionResultOfT(this, _modelReaderWriterOptions, token, cancellationToken.ToRequestOptions()); } /// List things with continuation token. @@ -1506,7 +1508,7 @@ public virtual CollectionResult GetWithContinuationToken(string token = d /// Service returned a non-success status code. public virtual AsyncCollectionResult GetWithContinuationTokenAsync(string token = default, CancellationToken cancellationToken = default) { - return new SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResultOfT(this, token, cancellationToken.ToRequestOptions()); + return new SampleTypeSpecClientGetWithContinuationTokenAsyncCollectionResultOfT(this, _modelReaderWriterOptions, token, cancellationToken.ToRequestOptions()); } /// @@ -1523,7 +1525,7 @@ public virtual AsyncCollectionResult GetWithContinuationTokenAsync(string /// The response returned from the service. public virtual CollectionResult GetWithContinuationTokenHeaderResponse(string token, RequestOptions options) { - return new SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResult(this, token, options); + return new SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResult(this, _modelReaderWriterOptions, token, options); } /// @@ -1540,7 +1542,7 @@ public virtual CollectionResult GetWithContinuationTokenHeaderResponse(string to /// The response returned from the service. public virtual AsyncCollectionResult GetWithContinuationTokenHeaderResponseAsync(string token, RequestOptions options) { - return new SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResult(this, token, options); + return new SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResult(this, _modelReaderWriterOptions, token, options); } /// List things with continuation token header response. @@ -1549,7 +1551,7 @@ public virtual AsyncCollectionResult GetWithContinuationTokenHeaderResponseAsync /// Service returned a non-success status code. public virtual CollectionResult GetWithContinuationTokenHeaderResponse(string token = default, CancellationToken cancellationToken = default) { - return new SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResultOfT(this, token, cancellationToken.ToRequestOptions()); + return new SampleTypeSpecClientGetWithContinuationTokenHeaderResponseCollectionResultOfT(this, _modelReaderWriterOptions, token, cancellationToken.ToRequestOptions()); } /// List things with continuation token header response. @@ -1558,7 +1560,7 @@ public virtual CollectionResult GetWithContinuationTokenHeaderResponse(st /// Service returned a non-success status code. public virtual AsyncCollectionResult GetWithContinuationTokenHeaderResponseAsync(string token = default, CancellationToken cancellationToken = default) { - return new SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResultOfT(this, token, cancellationToken.ToRequestOptions()); + return new SampleTypeSpecClientGetWithContinuationTokenHeaderResponseAsyncCollectionResultOfT(this, _modelReaderWriterOptions, token, cancellationToken.ToRequestOptions()); } /// @@ -1574,7 +1576,7 @@ public virtual AsyncCollectionResult GetWithContinuationTokenHeaderRespon /// The response returned from the service. public virtual CollectionResult GetWithPaging(RequestOptions options) { - return new SampleTypeSpecClientGetWithPagingCollectionResult(this, options); + return new SampleTypeSpecClientGetWithPagingCollectionResult(this, _modelReaderWriterOptions, options); } /// @@ -1590,7 +1592,7 @@ public virtual CollectionResult GetWithPaging(RequestOptions options) /// The response returned from the service. public virtual AsyncCollectionResult GetWithPagingAsync(RequestOptions options) { - return new SampleTypeSpecClientGetWithPagingAsyncCollectionResult(this, options); + return new SampleTypeSpecClientGetWithPagingAsyncCollectionResult(this, _modelReaderWriterOptions, options); } /// List things with paging. @@ -1598,7 +1600,7 @@ public virtual AsyncCollectionResult GetWithPagingAsync(RequestOptions options) /// Service returned a non-success status code. public virtual CollectionResult GetWithPaging(CancellationToken cancellationToken = default) { - return new SampleTypeSpecClientGetWithPagingCollectionResultOfT(this, cancellationToken.ToRequestOptions()); + return new SampleTypeSpecClientGetWithPagingCollectionResultOfT(this, _modelReaderWriterOptions, cancellationToken.ToRequestOptions()); } /// List things with paging. @@ -1606,7 +1608,7 @@ public virtual CollectionResult GetWithPaging(CancellationToken cancellat /// Service returned a non-success status code. public virtual AsyncCollectionResult GetWithPagingAsync(CancellationToken cancellationToken = default) { - return new SampleTypeSpecClientGetWithPagingAsyncCollectionResultOfT(this, cancellationToken.ToRequestOptions()); + return new SampleTypeSpecClientGetWithPagingAsyncCollectionResultOfT(this, _modelReaderWriterOptions, cancellationToken.ToRequestOptions()); } /// @@ -1674,7 +1676,7 @@ public virtual ClientResult EmbeddedParameters(ModelWithEmbeddedNonBodyParameter { Argument.AssertNotNull(body, nameof(body)); - return EmbeddedParameters(body.RequiredHeader, body.RequiredQuery, body, body.OptionalHeader, body.OptionalQuery, cancellationToken.ToRequestOptions()); + return EmbeddedParameters(body.RequiredHeader, body.RequiredQuery, body.ToBinaryContent(_modelReaderWriterOptions), body.OptionalHeader, body.OptionalQuery, cancellationToken.ToRequestOptions()); } /// An operation with embedded parameters within the body. @@ -1686,7 +1688,7 @@ public virtual async Task EmbeddedParametersAsync(ModelWithEmbedde { Argument.AssertNotNull(body, nameof(body)); - return await EmbeddedParametersAsync(body.RequiredHeader, body.RequiredQuery, body, body.OptionalHeader, body.OptionalQuery, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await EmbeddedParametersAsync(body.RequiredHeader, body.RequiredQuery, body.ToBinaryContent(_modelReaderWriterOptions), body.OptionalHeader, body.OptionalQuery, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -1748,7 +1750,7 @@ public virtual ClientResult DynamicModelOperation(DynamicModel body, Cancellatio { Argument.AssertNotNull(body, nameof(body)); - return DynamicModelOperation(body, cancellationToken.ToRequestOptions()); + return DynamicModelOperation(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); } #pragma warning restore SCME0001 // This generated code depends on experimental functionality. @@ -1763,7 +1765,7 @@ public virtual async Task DynamicModelOperationAsync(DynamicModel { Argument.AssertNotNull(body, nameof(body)); - return await DynamicModelOperationAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await DynamicModelOperationAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); } #pragma warning restore SCME0001 // This generated code depends on experimental functionality. @@ -1807,7 +1809,7 @@ public virtual async Task GetXmlAdvancedModelAsync(RequestOptions public virtual ClientResult GetXmlAdvancedModel(CancellationToken cancellationToken = default) { ClientResult result = GetXmlAdvancedModel(cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((XmlAdvancedModel)result, result.GetRawResponse()); + return ClientResult.FromValue(XmlAdvancedModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Get an advanced XML model with various property types. @@ -1816,7 +1818,7 @@ public virtual ClientResult GetXmlAdvancedModel(CancellationTo public virtual async Task> GetXmlAdvancedModelAsync(CancellationToken cancellationToken = default) { ClientResult result = await GetXmlAdvancedModelAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((XmlAdvancedModel)result, result.GetRawResponse()); + return ClientResult.FromValue(XmlAdvancedModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1870,8 +1872,8 @@ public virtual ClientResult UpdateXmlAdvancedModel(XmlAdvanced { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = UpdateXmlAdvancedModel(body, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((XmlAdvancedModel)result, result.GetRawResponse()); + ClientResult result = UpdateXmlAdvancedModel(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(XmlAdvancedModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// Update an advanced XML model with various property types. @@ -1883,8 +1885,8 @@ public virtual async Task> UpdateXmlAdvancedModel { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = await UpdateXmlAdvancedModelAsync(body, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((XmlAdvancedModel)result, result.GetRawResponse()); + ClientResult result = await UpdateXmlAdvancedModelAsync(body.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(XmlAdvancedModel.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -2043,7 +2045,7 @@ public virtual async Task> ReceiveJsonLinesA { using PipelineMessage message = CreateReceiveJsonLinesRequest(cancellationToken.ToRequestOptions()); message.BufferResponse = false; - return AsyncStreamingResult.CreateJsonLines(await Pipeline.ProcessMessageAsync(message, cancellationToken.ToRequestOptions()).ConfigureAwait(false), data => ModelReaderWriter.Read(data, ModelSerializationExtensions.WireOptions, SampleTypeSpecContext.Default), cancellationToken); + return AsyncStreamingResult.CreateJsonLines(await Pipeline.ProcessMessageAsync(message, cancellationToken.ToRequestOptions()).ConfigureAwait(false), data => ModelReaderWriter.Read(data, _modelReaderWriterOptions, SampleTypeSpecContext.Default), cancellationToken); } /// @@ -2071,7 +2073,7 @@ public virtual async Task>> ReceiveS { using PipelineMessage message = CreateReceiveSseRequest(cancellationToken.ToRequestOptions()); message.BufferResponse = false; - return AsyncStreamingResult.CreateSse(await Pipeline.ProcessMessageAsync(message, cancellationToken.ToRequestOptions()).ConfigureAwait(false), (@_, data) => ModelReaderWriter.Read(BinaryData.FromBytes(data.ToArray()), ModelSerializationExtensions.WireOptions, SampleTypeSpecContext.Default), item => item.Data.ToString() == "[DONE]", cancellationToken); + return AsyncStreamingResult.CreateSse(await Pipeline.ProcessMessageAsync(message, cancellationToken.ToRequestOptions()).ConfigureAwait(false), (@_, data) => ModelReaderWriter.Read(BinaryData.FromBytes(data.ToArray()), _modelReaderWriterOptions, SampleTypeSpecContext.Default), item => item.Data.ToString() == "[DONE]", cancellationToken); } /// @@ -2102,7 +2104,7 @@ public virtual async Task> ReceiveExperimen { using PipelineMessage message = CreateReceiveExperimentalJsonLinesRequest(cancellationToken.ToRequestOptions()); message.BufferResponse = false; - return AsyncStreamingResult.CreateJsonLines(await Pipeline.ProcessMessageAsync(message, cancellationToken.ToRequestOptions()).ConfigureAwait(false), data => ModelReaderWriter.Read(data, ModelSerializationExtensions.WireOptions, SampleTypeSpecContext.Default), cancellationToken); + return AsyncStreamingResult.CreateJsonLines(await Pipeline.ProcessMessageAsync(message, cancellationToken.ToRequestOptions()).ConfigureAwait(false), data => ModelReaderWriter.Read(data, _modelReaderWriterOptions, SampleTypeSpecContext.Default), cancellationToken); } #pragma warning restore SAMPLE0003 // This generated code depends on experimental functionality. @@ -2262,32 +2264,32 @@ public virtual async Task SetAcronymAddressesAsync(string ipv4Addr #pragma warning disable SAMPLE0009 // This generated code depends on experimental functionality. public virtual ExperimentalSamples GetExperimentalSamplesClient() { - return Volatile.Read(ref _cachedExperimentalSamples) ?? Interlocked.CompareExchange(ref _cachedExperimentalSamples, new ExperimentalSamples(Pipeline, _endpoint), null) ?? _cachedExperimentalSamples; + return Volatile.Read(ref _cachedExperimentalSamples) ?? Interlocked.CompareExchange(ref _cachedExperimentalSamples, new ExperimentalSamples(Pipeline, _modelReaderWriterOptions, _endpoint), null) ?? _cachedExperimentalSamples; } #pragma warning restore SAMPLE0009 // This generated code depends on experimental functionality. /// Initializes a new instance of AnimalOperations. public virtual AnimalOperations GetAnimalOperationsClient() { - return Volatile.Read(ref _cachedAnimalOperations) ?? Interlocked.CompareExchange(ref _cachedAnimalOperations, new AnimalOperations(Pipeline, _endpoint), null) ?? _cachedAnimalOperations; + return Volatile.Read(ref _cachedAnimalOperations) ?? Interlocked.CompareExchange(ref _cachedAnimalOperations, new AnimalOperations(Pipeline, _modelReaderWriterOptions, _endpoint), null) ?? _cachedAnimalOperations; } /// Initializes a new instance of PetOperations. public virtual PetOperations GetPetOperationsClient() { - return Volatile.Read(ref _cachedPetOperations) ?? Interlocked.CompareExchange(ref _cachedPetOperations, new PetOperations(Pipeline, _endpoint), null) ?? _cachedPetOperations; + return Volatile.Read(ref _cachedPetOperations) ?? Interlocked.CompareExchange(ref _cachedPetOperations, new PetOperations(Pipeline, _modelReaderWriterOptions, _endpoint), null) ?? _cachedPetOperations; } /// Initializes a new instance of DogOperations. public virtual DogOperations GetDogOperationsClient() { - return Volatile.Read(ref _cachedDogOperations) ?? Interlocked.CompareExchange(ref _cachedDogOperations, new DogOperations(Pipeline, _endpoint), null) ?? _cachedDogOperations; + return Volatile.Read(ref _cachedDogOperations) ?? Interlocked.CompareExchange(ref _cachedDogOperations, new DogOperations(Pipeline, _modelReaderWriterOptions, _endpoint), null) ?? _cachedDogOperations; } /// Initializes a new instance of PlantOperations. public virtual PlantOperations GetPlantOperationsClient() { - return Volatile.Read(ref _cachedPlantOperations) ?? Interlocked.CompareExchange(ref _cachedPlantOperations, new PlantOperations(Pipeline, _endpoint), null) ?? _cachedPlantOperations; + return Volatile.Read(ref _cachedPlantOperations) ?? Interlocked.CompareExchange(ref _cachedPlantOperations, new PlantOperations(Pipeline, _modelReaderWriterOptions, _endpoint), null) ?? _cachedPlantOperations; } /// Initializes a new instance of Metrics. @@ -2297,7 +2299,7 @@ public virtual Metrics GetMetricsClient(string metricsNamespace) { Argument.AssertNotNull(metricsNamespace, nameof(metricsNamespace)); - return new Metrics(Pipeline, _endpoint, metricsNamespace); + return new Metrics(Pipeline, _modelReaderWriterOptions, _endpoint, metricsNamespace); } /// Initializes a new instance of Notebooks. @@ -2307,19 +2309,19 @@ public virtual Notebooks GetNotebooksClient(string notebook) { Argument.AssertNotNull(notebook, nameof(notebook)); - return new Notebooks(Pipeline, _endpoint, notebook); + return new Notebooks(Pipeline, _modelReaderWriterOptions, _endpoint, notebook); } /// Initializes a new instance of UnionExtends. public virtual UnionExtends GetUnionExtendsClient() { - return Volatile.Read(ref _cachedUnionExtends) ?? Interlocked.CompareExchange(ref _cachedUnionExtends, new UnionExtends(Pipeline, _endpoint), null) ?? _cachedUnionExtends; + return Volatile.Read(ref _cachedUnionExtends) ?? Interlocked.CompareExchange(ref _cachedUnionExtends, new UnionExtends(Pipeline, _modelReaderWriterOptions, _endpoint), null) ?? _cachedUnionExtends; } /// Initializes a new instance of ConstructorRequirements. public virtual ConstructorRequirements GetConstructorRequirementsClient() { - return Volatile.Read(ref _cachedConstructorRequirements) ?? Interlocked.CompareExchange(ref _cachedConstructorRequirements, new ConstructorRequirements(Pipeline, _endpoint), null) ?? _cachedConstructorRequirements; + return Volatile.Read(ref _cachedConstructorRequirements) ?? Interlocked.CompareExchange(ref _cachedConstructorRequirements, new ConstructorRequirements(Pipeline, _modelReaderWriterOptions, _endpoint), null) ?? _cachedConstructorRequirements; } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecModelFactory.cs index 02efe4be9f2..9505bde1006 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecModelFactory.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecModelFactory.cs @@ -535,6 +535,14 @@ public static Plant Plant(string species = default, string id = default, int hei return new UnknownPlant(species, id, height, additionalBinaryDataProperties: null); } + /// XML-only container whose nested tree also supports JSON. + /// The nested tree. + /// A new instance for mocking. + public static XmlTreeContainer XmlTreeContainer(Tree tree = default) + { + return new XmlTreeContainer(tree); + } + /// The GetWidgetMetricsResult. /// /// diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/UnionExtends.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/UnionExtends.cs index b84a7bf4fa7..7203382cbb9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/UnionExtends.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/UnionExtends.cs @@ -19,6 +19,7 @@ namespace SampleTypeSpec public partial class UnionExtends { private readonly Uri _endpoint; + private readonly ModelReaderWriterOptions _modelReaderWriterOptions = ModelSerializationExtensions.WireOptions; /// Initializes a new instance of UnionExtends for mocking. protected UnionExtends() @@ -27,11 +28,13 @@ protected UnionExtends() /// Initializes a new instance of UnionExtends. /// The HTTP pipeline for sending and receiving REST requests and responses. + /// /// Service endpoint. - internal UnionExtends(ClientPipeline pipeline, Uri endpoint) + internal UnionExtends(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) { _endpoint = endpoint; Pipeline = pipeline; + _modelReaderWriterOptions = modelReaderWriterOptions; } /// The HTTP pipeline for sending and receiving REST requests and responses. @@ -89,11 +92,11 @@ public virtual ClientResult Echo(UnionPet pet, CancellationToken cance Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - UnionPet.SerializeUnionPetsUnion(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + UnionPet.SerializeUnionPetsUnion(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = Echo(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(UnionPet.DeserializeUnionPetsUnion(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(UnionPet.DeserializeUnionPetsUnion(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// Echo. @@ -106,11 +109,11 @@ public virtual async Task> EchoAsync(UnionPet pet, Cancel Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - UnionPet.SerializeUnionPetsUnion(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + UnionPet.SerializeUnionPetsUnion(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(UnionPet.DeserializeUnionPetsUnion(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(UnionPet.DeserializeUnionPetsUnion(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -232,8 +235,8 @@ public virtual ClientResult EchoContainer(UnionPetContainer c { Argument.AssertNotNull(container, nameof(container)); - ClientResult result = EchoContainer(container, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((UnionPetContainer)result, result.GetRawResponse()); + ClientResult result = EchoContainer(container.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(UnionPetContainer.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoContainer. @@ -245,8 +248,8 @@ public virtual async Task> EchoContainerAsync(Un { Argument.AssertNotNull(container, nameof(container)); - ClientResult result = await EchoContainerAsync(container, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((UnionPetContainer)result, result.GetRawResponse()); + ClientResult result = await EchoContainerAsync(container.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(UnionPetContainer.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -300,8 +303,8 @@ public virtual ClientResult EchoRawContainer(RawUnionPetCo { Argument.AssertNotNull(container, nameof(container)); - ClientResult result = EchoRawContainer(container, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((RawUnionPetContainer)result, result.GetRawResponse()); + ClientResult result = EchoRawContainer(container.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(RawUnionPetContainer.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoRawContainer. @@ -313,8 +316,8 @@ public virtual async Task> EchoRawContainerAs { Argument.AssertNotNull(container, nameof(container)); - ClientResult result = await EchoRawContainerAsync(container, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((RawUnionPetContainer)result, result.GetRawResponse()); + ClientResult result = await EchoRawContainerAsync(container.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(RawUnionPetContainer.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -369,11 +372,11 @@ public virtual ClientResult EchoNestedOuter(CollisionPetsUni Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - CollisionPetsUnion.SerializeCollisionPetsUnion1(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + CollisionPetsUnion.SerializeCollisionPetsUnion1(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = EchoNestedOuter(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(CollisionPetsUnion.DeserializeCollisionPetsUnion1(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(CollisionPetsUnion.DeserializeCollisionPetsUnion1(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoNestedOuter. @@ -386,11 +389,11 @@ public virtual async Task> EchoNestedOuterAsync Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - CollisionPetsUnion.SerializeCollisionPetsUnion1(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + CollisionPetsUnion.SerializeCollisionPetsUnion1(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoNestedOuterAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(CollisionPetsUnion.DeserializeCollisionPetsUnion1(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(CollisionPetsUnion.DeserializeCollisionPetsUnion1(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -450,11 +453,11 @@ public virtual ClientResult EchoNestedInner(NestedMammal pet, Canc Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - NestedMammal.SerializeNestedPetsUnion(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + NestedMammal.SerializeNestedPetsUnion(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = EchoNestedInner(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(NestedMammal.DeserializeNestedPetsUnion(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(NestedMammal.DeserializeNestedPetsUnion(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } #pragma warning restore UNION001 // This generated code depends on experimental functionality. @@ -469,11 +472,11 @@ public virtual async Task> EchoNestedInnerAsync(Neste Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - NestedMammal.SerializeNestedPetsUnion(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + NestedMammal.SerializeNestedPetsUnion(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoNestedInnerAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(NestedMammal.DeserializeNestedPetsUnion(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(NestedMammal.DeserializeNestedPetsUnion(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } #pragma warning restore UNION001 // This generated code depends on experimental functionality. @@ -534,11 +537,11 @@ public virtual ClientResult EchoNestedSameName(NestedMammal pet, C Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - NestedMammal.SerializeCollisionPetsUnion2(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + NestedMammal.SerializeCollisionPetsUnion2(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = EchoNestedSameName(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(NestedMammal.DeserializeCollisionPetsUnion2(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(NestedMammal.DeserializeCollisionPetsUnion2(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } #pragma warning restore UNION001 // This generated code depends on experimental functionality. @@ -553,11 +556,11 @@ public virtual async Task> EchoNestedSameNameAsync(Ne Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - NestedMammal.SerializeCollisionPetsUnion2(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + NestedMammal.SerializeCollisionPetsUnion2(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoNestedSameNameAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(NestedMammal.DeserializeCollisionPetsUnion2(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(NestedMammal.DeserializeCollisionPetsUnion2(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } #pragma warning restore UNION001 // This generated code depends on experimental functionality. @@ -613,11 +616,11 @@ public virtual ClientResult EchoXmlPets(XmlUnionPet pet, Cancellati Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - XmlUnionPet.SerializeXmlUnionPetsUnion(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + XmlUnionPet.SerializeXmlUnionPetsUnion(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = EchoXmlPets(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(XmlUnionPet.DeserializeXmlUnionPetsUnion(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(XmlUnionPet.DeserializeXmlUnionPetsUnion(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoXmlPets. @@ -630,11 +633,11 @@ public virtual async Task> EchoXmlPetsAsync(XmlUnionPe Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - XmlUnionPet.SerializeXmlUnionPetsUnion(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + XmlUnionPet.SerializeXmlUnionPetsUnion(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoXmlPetsAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(XmlUnionPet.DeserializeXmlUnionPetsUnion(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(XmlUnionPet.DeserializeXmlUnionPetsUnion(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -688,9 +691,9 @@ public virtual ClientResult EchoXmlBase(XmlUnionPet pet, Cancellati { Argument.AssertNotNull(pet, nameof(pet)); - using BinaryContent content = pet.ToBinaryContent("X"); + using BinaryContent content = pet.ToBinaryContent(_modelReaderWriterOptions.ToXmlOptions()); ClientResult result = EchoXmlBase(content, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((XmlUnionPet)result, result.GetRawResponse()); + return ClientResult.FromValue(XmlUnionPet.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoXmlBase. @@ -702,9 +705,9 @@ public virtual async Task> EchoXmlBaseAsync(XmlUnionPe { Argument.AssertNotNull(pet, nameof(pet)); - using BinaryContent content = pet.ToBinaryContent("X"); + using BinaryContent content = pet.ToBinaryContent(_modelReaderWriterOptions.ToXmlOptions()); ClientResult result = await EchoXmlBaseAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((XmlUnionPet)result, result.GetRawResponse()); + return ClientResult.FromValue(XmlUnionPet.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -966,8 +969,8 @@ public virtual ClientResult EchoDirectBase(DirectUnionPet pet, C { Argument.AssertNotNull(pet, nameof(pet)); - ClientResult result = EchoDirectBase(pet, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((DirectUnionPet)result, result.GetRawResponse()); + ClientResult result = EchoDirectBase(pet.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(DirectUnionPet.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoDirectBase. @@ -979,8 +982,8 @@ public virtual async Task> EchoDirectBaseAsync(Dire { Argument.AssertNotNull(pet, nameof(pet)); - ClientResult result = await EchoDirectBaseAsync(pet, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((DirectUnionPet)result, result.GetRawResponse()); + ClientResult result = await EchoDirectBaseAsync(pet.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(DirectUnionPet.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1035,11 +1038,11 @@ public virtual ClientResult EchoDirectUnion(DirectUnionPet pet, Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - DirectUnionPet.SerializeDirectPetsUnion3(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + DirectUnionPet.SerializeDirectPetsUnion3(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = EchoDirectUnion(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(DirectUnionPet.DeserializeDirectPetsUnion3(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(DirectUnionPet.DeserializeDirectPetsUnion3(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoDirectUnion. @@ -1052,11 +1055,11 @@ public virtual async Task> EchoDirectUnionAsync(Dir Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - DirectUnionPet.SerializeDirectPetsUnion3(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + DirectUnionPet.SerializeDirectPetsUnion3(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoDirectUnionAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(DirectUnionPet.DeserializeDirectPetsUnion3(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(DirectUnionPet.DeserializeDirectPetsUnion3(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1110,8 +1113,8 @@ public virtual ClientResult EchoDirectContainer(DirectU { Argument.AssertNotNull(container, nameof(container)); - ClientResult result = EchoDirectContainer(container, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((DirectUnionPetContainer)result, result.GetRawResponse()); + ClientResult result = EchoDirectContainer(container.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(DirectUnionPetContainer.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoDirectContainer. @@ -1123,8 +1126,8 @@ public virtual async Task> EchoDirectConta { Argument.AssertNotNull(container, nameof(container)); - ClientResult result = await EchoDirectContainerAsync(container, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((DirectUnionPetContainer)result, result.GetRawResponse()); + ClientResult result = await EchoDirectContainerAsync(container.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(DirectUnionPetContainer.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1178,8 +1181,8 @@ public virtual ClientResult EchoDynamicContainer(Dynam { Argument.AssertNotNull(container, nameof(container)); - ClientResult result = EchoDynamicContainer(container, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((DynamicUnionPetContainer)result, result.GetRawResponse()); + ClientResult result = EchoDynamicContainer(container.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(DynamicUnionPetContainer.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoDynamicContainer. @@ -1191,8 +1194,8 @@ public virtual async Task> EchoDynamicCon { Argument.AssertNotNull(container, nameof(container)); - ClientResult result = await EchoDynamicContainerAsync(container, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((DynamicUnionPetContainer)result, result.GetRawResponse()); + ClientResult result = await EchoDynamicContainerAsync(container.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(DynamicUnionPetContainer.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1247,11 +1250,11 @@ public virtual ClientResult EchoDescendantMembers(Descendant Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - DescendantUnionPet.SerializeDescendantPetsUnion1(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + DescendantUnionPet.SerializeDescendantPetsUnion1(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = EchoDescendantMembers(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(DescendantUnionPet.DeserializeDescendantPetsUnion1(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(DescendantUnionPet.DeserializeDescendantPetsUnion1(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoDescendantMembers. @@ -1264,11 +1267,11 @@ public virtual async Task> EchoDescendantMember Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - DescendantUnionPet.SerializeDescendantPetsUnion1(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + DescendantUnionPet.SerializeDescendantPetsUnion1(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoDescendantMembersAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(DescendantUnionPet.DeserializeDescendantPetsUnion1(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(DescendantUnionPet.DeserializeDescendantPetsUnion1(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1391,11 +1394,11 @@ public virtual ClientResult EchoSerializeClassName(Serialize Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - SerializePetsUnion.SerializePetsUnion1(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + SerializePetsUnion.SerializePetsUnion1(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = EchoSerializeClassName(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(SerializePetsUnion.DeserializePetsUnion1(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(SerializePetsUnion.DeserializePetsUnion1(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoSerializeClassName. @@ -1408,11 +1411,11 @@ public virtual async Task> EchoSerializeClassNa Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - SerializePetsUnion.SerializePetsUnion1(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + SerializePetsUnion.SerializePetsUnion1(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoSerializeClassNameAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(SerializePetsUnion.DeserializePetsUnion1(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(SerializePetsUnion.DeserializePetsUnion1(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1467,11 +1470,11 @@ public virtual ClientResult EchoDeserializeClassName(Deser Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - DeserializePetsUnion.SerializePetsUnion1(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + DeserializePetsUnion.SerializePetsUnion1(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = EchoDeserializeClassName(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(DeserializePetsUnion.DeserializePetsUnion1(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(DeserializePetsUnion.DeserializePetsUnion1(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoDeserializeClassName. @@ -1484,11 +1487,11 @@ public virtual async Task> EchoDeserializeCla Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - DeserializePetsUnion.SerializePetsUnion1(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + DeserializePetsUnion.SerializePetsUnion1(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoDeserializeClassNameAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(DeserializePetsUnion.DeserializePetsUnion1(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(DeserializePetsUnion.DeserializePetsUnion1(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1610,8 +1613,8 @@ public virtual ClientResult EchoCustomContainer(CustomUnionPet p { Argument.AssertNotNull(pet, nameof(pet)); - ClientResult result = EchoCustomContainer(pet, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((CustomUnionPet)result, result.GetRawResponse()); + ClientResult result = EchoCustomContainer(pet.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue(CustomUnionPet.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoCustomContainer. @@ -1623,8 +1626,8 @@ public virtual async Task> EchoCustomContainerAsync { Argument.AssertNotNull(pet, nameof(pet)); - ClientResult result = await EchoCustomContainerAsync(pet, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((CustomUnionPet)result, result.GetRawResponse()); + ClientResult result = await EchoCustomContainerAsync(pet.ToBinaryContent(_modelReaderWriterOptions), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue(CustomUnionPet.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1747,11 +1750,11 @@ public virtual ClientResult EchoRebasedVariants(RebasedUnionPet Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - RebasedUnionPet.SerializeRebasedPetsUnion(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + RebasedUnionPet.SerializeRebasedPetsUnion(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = EchoRebasedVariants(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(RebasedUnionPet.DeserializeRebasedPetsUnion(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(RebasedUnionPet.DeserializeRebasedPetsUnion(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoRebasedVariants. @@ -1764,11 +1767,11 @@ public virtual async Task> EchoRebasedVariantsAsyn Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - RebasedUnionPet.SerializeRebasedPetsUnion(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + RebasedUnionPet.SerializeRebasedPetsUnion(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoRebasedVariantsAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(RebasedUnionPet.DeserializeRebasedPetsUnion(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(RebasedUnionPet.DeserializeRebasedPetsUnion(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1823,11 +1826,11 @@ public virtual ClientResult EchoRebasedBase(RebasedUnionA pet, Ca Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - RebasedUnionA.SerializePetsUnion(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + RebasedUnionA.SerializePetsUnion(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = EchoRebasedBase(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(RebasedUnionA.DeserializePetsUnion(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(RebasedUnionA.DeserializePetsUnion(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoRebasedBase. @@ -1840,11 +1843,11 @@ public virtual async Task> EchoRebasedBaseAsync(Reba Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - RebasedUnionA.SerializePetsUnion(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + RebasedUnionA.SerializePetsUnion(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoRebasedBaseAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(RebasedUnionA.DeserializePetsUnion(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(RebasedUnionA.DeserializePetsUnion(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1899,11 +1902,11 @@ public virtual ClientResult EchoRebasedDerived(RebasedUnionB pet, Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - RebasedUnionB.SerializePetsUnion1(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + RebasedUnionB.SerializePetsUnion1(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = EchoRebasedDerived(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(RebasedUnionB.DeserializePetsUnion1(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(RebasedUnionB.DeserializePetsUnion1(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoRebasedDerived. @@ -1916,11 +1919,11 @@ public virtual async Task> EchoRebasedDerivedAsync(R Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - RebasedUnionB.SerializePetsUnion1(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + RebasedUnionB.SerializePetsUnion1(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoRebasedDerivedAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(RebasedUnionB.DeserializePetsUnion1(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(RebasedUnionB.DeserializePetsUnion1(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -1975,11 +1978,11 @@ public virtual ClientResult EchoDescendantDeserializer(Deserial Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - DeserializerPet.SerializePetsUnion1(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + DeserializerPet.SerializePetsUnion1(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = EchoDescendantDeserializer(content, cancellationToken.ToRequestOptions()); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(DeserializerPet.DeserializePetsUnion1(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(DeserializerPet.DeserializePetsUnion1(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// EchoDescendantDeserializer. @@ -1992,11 +1995,11 @@ public virtual async Task> EchoDescendantDeseriali Argument.AssertNotNull(pet, nameof(pet)); using Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); - DeserializerPet.SerializePetsUnion1(content.JsonWriter, pet, ModelSerializationExtensions.WireOptions); + DeserializerPet.SerializePetsUnion1(content.JsonWriter, pet, _modelReaderWriterOptions); ClientResult result = await EchoDescendantDeserializerAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); BinaryData data = result.GetRawResponse().Content; using JsonDocument document = JsonDocument.Parse(data); - return ClientResult.FromValue(DeserializerPet.DeserializePetsUnion1(document.RootElement, ModelSerializationExtensions.WireOptions), result.GetRawResponse()); + return ClientResult.FromValue(DeserializerPet.DeserializePetsUnion1(document.RootElement, _modelReaderWriterOptions), result.GetRawResponse()); } /// @@ -2198,7 +2201,7 @@ public virtual ClientResult> EchoPets(IEnumerable> EchoPets(IEnumerable array = new List(); foreach (var item in document.RootElement.EnumerateArray()) { - array.Add(UnionPet.DeserializeUnionPetsUnion(item, ModelSerializationExtensions.WireOptions)); + array.Add(UnionPet.DeserializeUnionPetsUnion(item, _modelReaderWriterOptions)); } unionValue = array; } @@ -2237,7 +2240,7 @@ public virtual async Task>> EchoPetsAsync(I content.JsonWriter.WriteStartArray(); foreach (var item in pets) { - UnionPet.SerializeUnionPetsUnion(content.JsonWriter, item, ModelSerializationExtensions.WireOptions); + UnionPet.SerializeUnionPetsUnion(content.JsonWriter, item, _modelReaderWriterOptions); } content.JsonWriter.WriteEndArray(); } @@ -2250,7 +2253,7 @@ public virtual async Task>> EchoPetsAsync(I List array = new List(); foreach (var item in document.RootElement.EnumerateArray()) { - array.Add(UnionPet.DeserializeUnionPetsUnion(item, ModelSerializationExtensions.WireOptions)); + array.Add(UnionPet.DeserializeUnionPetsUnion(item, _modelReaderWriterOptions)); } unionValue = array; } @@ -2319,7 +2322,7 @@ public virtual ClientResult> EchoLookup(ID foreach (var item in pets) { content.JsonWriter.WritePropertyName(item.Key); - UnionPet.SerializeUnionPetsUnion(content.JsonWriter, item.Value, ModelSerializationExtensions.WireOptions); + UnionPet.SerializeUnionPetsUnion(content.JsonWriter, item.Value, _modelReaderWriterOptions); } content.JsonWriter.WriteEndObject(); } @@ -2332,7 +2335,7 @@ public virtual ClientResult> EchoLookup(ID Dictionary dictionary = new Dictionary(); foreach (var @property in document.RootElement.EnumerateObject()) { - dictionary.Add(@property.Name, UnionPet.DeserializeUnionPetsUnion(@property.Value, ModelSerializationExtensions.WireOptions)); + dictionary.Add(@property.Name, UnionPet.DeserializeUnionPetsUnion(@property.Value, _modelReaderWriterOptions)); } unionValue = dictionary; } @@ -2359,7 +2362,7 @@ public virtual async Task>> E foreach (var item in pets) { content.JsonWriter.WritePropertyName(item.Key); - UnionPet.SerializeUnionPetsUnion(content.JsonWriter, item.Value, ModelSerializationExtensions.WireOptions); + UnionPet.SerializeUnionPetsUnion(content.JsonWriter, item.Value, _modelReaderWriterOptions); } content.JsonWriter.WriteEndObject(); } @@ -2372,7 +2375,7 @@ public virtual async Task>> E Dictionary dictionary = new Dictionary(); foreach (var @property in document.RootElement.EnumerateObject()) { - dictionary.Add(@property.Name, UnionPet.DeserializeUnionPetsUnion(@property.Value, ModelSerializationExtensions.WireOptions)); + dictionary.Add(@property.Name, UnionPet.DeserializeUnionPetsUnion(@property.Value, _modelReaderWriterOptions)); } unionValue = dictionary; } @@ -2419,7 +2422,7 @@ public virtual async Task GetCatAsync(RequestOptions options) public virtual ClientResult GetCat(CancellationToken cancellationToken = default) { ClientResult result = GetCat(cancellationToken.ToRequestOptions()); - return ClientResult.FromValue((UnionCat)result, result.GetRawResponse()); + return ClientResult.FromValue(UnionCat.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } /// GetCat. @@ -2428,7 +2431,7 @@ public virtual ClientResult GetCat(CancellationToken cancellationToken public virtual async Task> GetCatAsync(CancellationToken cancellationToken = default) { ClientResult result = await GetCatAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((UnionCat)result, result.GetRawResponse()); + return ClientResult.FromValue(UnionCat.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/tspCodeModel.json index f6b81300e23..84921dd0269 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/tspCodeModel.json +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/tspCodeModel.json @@ -2974,7 +2974,7 @@ { "$id": "294", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType46", + "name": "GetXmlAdvancedModelResponseContentType12", "namespace": "", "usage": "None", "valueType": { @@ -2984,14 +2984,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, { "$id": "296", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType47", + "name": "GetXmlAdvancedModelResponseContentType13", "namespace": "", "usage": "None", "valueType": { @@ -3001,14 +3001,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, { "$id": "298", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType48", + "name": "GetTreeAsJsonResponseContentType46", "namespace": "", "usage": "None", "valueType": { @@ -3025,7 +3025,7 @@ { "$id": "300", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType49", + "name": "GetTreeAsJsonResponseContentType47", "namespace": "", "usage": "None", "valueType": { @@ -3042,7 +3042,7 @@ { "$id": "302", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType12", + "name": "GetTreeAsJsonResponseContentType48", "namespace": "", "usage": "None", "valueType": { @@ -3052,14 +3052,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "304", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType13", + "name": "GetTreeAsJsonResponseContentType49", "namespace": "", "usage": "None", "valueType": { @@ -3069,7 +3069,7 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, @@ -3110,7 +3110,7 @@ { "$id": "310", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType50", + "name": "GetXmlAdvancedModelResponseContentType16", "namespace": "", "usage": "None", "valueType": { @@ -3120,14 +3120,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, { "$id": "312", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType51", + "name": "GetXmlAdvancedModelResponseContentType17", "namespace": "", "usage": "None", "valueType": { @@ -3137,14 +3137,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, { "$id": "314", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType52", + "name": "GetTreeAsJsonResponseContentType50", "namespace": "", "usage": "None", "valueType": { @@ -3161,7 +3161,7 @@ { "$id": "316", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType53", + "name": "GetTreeAsJsonResponseContentType51", "namespace": "", "usage": "None", "valueType": { @@ -3178,7 +3178,7 @@ { "$id": "318", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType54", + "name": "GetTreeAsJsonResponseContentType52", "namespace": "", "usage": "None", "valueType": { @@ -3195,7 +3195,7 @@ { "$id": "320", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType55", + "name": "GetTreeAsJsonResponseContentType53", "namespace": "", "usage": "None", "valueType": { @@ -3212,7 +3212,7 @@ { "$id": "322", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType56", + "name": "GetTreeAsJsonResponseContentType54", "namespace": "", "usage": "None", "valueType": { @@ -3229,7 +3229,7 @@ { "$id": "324", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType57", + "name": "GetTreeAsJsonResponseContentType55", "namespace": "", "usage": "None", "valueType": { @@ -3246,7 +3246,7 @@ { "$id": "326", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType58", + "name": "GetTreeAsJsonResponseContentType56", "namespace": "", "usage": "None", "valueType": { @@ -3263,7 +3263,7 @@ { "$id": "328", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType59", + "name": "GetTreeAsJsonResponseContentType57", "namespace": "", "usage": "None", "valueType": { @@ -3280,7 +3280,7 @@ { "$id": "330", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType60", + "name": "GetTreeAsJsonResponseContentType58", "namespace": "", "usage": "None", "valueType": { @@ -3297,7 +3297,7 @@ { "$id": "332", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType61", + "name": "GetTreeAsJsonResponseContentType59", "namespace": "", "usage": "None", "valueType": { @@ -3314,7 +3314,7 @@ { "$id": "334", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType16", + "name": "GetTreeAsJsonResponseContentType60", "namespace": "", "usage": "None", "valueType": { @@ -3324,14 +3324,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "336", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType17", + "name": "GetTreeAsJsonResponseContentType61", "namespace": "", "usage": "None", "valueType": { @@ -3341,7 +3341,7 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, @@ -3382,7 +3382,7 @@ { "$id": "342", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType62", + "name": "GetXmlAdvancedModelResponseContentType20", "namespace": "", "usage": "None", "valueType": { @@ -3392,14 +3392,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, { "$id": "344", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType63", + "name": "GetXmlAdvancedModelResponseContentType21", "namespace": "", "usage": "None", "valueType": { @@ -3409,14 +3409,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, { "$id": "346", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType64", + "name": "GetTreeAsJsonResponseContentType62", "namespace": "", "usage": "None", "valueType": { @@ -3433,7 +3433,7 @@ { "$id": "348", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType65", + "name": "GetTreeAsJsonResponseContentType63", "namespace": "", "usage": "None", "valueType": { @@ -3450,7 +3450,7 @@ { "$id": "350", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType66", + "name": "GetTreeAsJsonResponseContentType64", "namespace": "", "usage": "None", "valueType": { @@ -3467,7 +3467,7 @@ { "$id": "352", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType67", + "name": "GetTreeAsJsonResponseContentType65", "namespace": "", "usage": "None", "valueType": { @@ -3484,7 +3484,7 @@ { "$id": "354", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType68", + "name": "GetTreeAsJsonResponseContentType66", "namespace": "", "usage": "None", "valueType": { @@ -3501,7 +3501,7 @@ { "$id": "356", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType69", + "name": "GetTreeAsJsonResponseContentType67", "namespace": "", "usage": "None", "valueType": { @@ -3518,7 +3518,7 @@ { "$id": "358", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType70", + "name": "GetTreeAsJsonResponseContentType68", "namespace": "", "usage": "None", "valueType": { @@ -3535,7 +3535,7 @@ { "$id": "360", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType71", + "name": "GetTreeAsJsonResponseContentType69", "namespace": "", "usage": "None", "valueType": { @@ -3552,7 +3552,7 @@ { "$id": "362", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType72", + "name": "GetTreeAsJsonResponseContentType70", "namespace": "", "usage": "None", "valueType": { @@ -3569,7 +3569,7 @@ { "$id": "364", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType73", + "name": "GetTreeAsJsonResponseContentType71", "namespace": "", "usage": "None", "valueType": { @@ -3586,7 +3586,7 @@ { "$id": "366", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType74", + "name": "GetTreeAsJsonResponseContentType72", "namespace": "", "usage": "None", "valueType": { @@ -3603,7 +3603,7 @@ { "$id": "368", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType75", + "name": "GetTreeAsJsonResponseContentType73", "namespace": "", "usage": "None", "valueType": { @@ -3620,7 +3620,7 @@ { "$id": "370", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType76", + "name": "GetTreeAsJsonResponseContentType74", "namespace": "", "usage": "None", "valueType": { @@ -3637,7 +3637,7 @@ { "$id": "372", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType77", + "name": "GetTreeAsJsonResponseContentType75", "namespace": "", "usage": "None", "valueType": { @@ -3654,7 +3654,7 @@ { "$id": "374", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType78", + "name": "GetTreeAsJsonResponseContentType76", "namespace": "", "usage": "None", "valueType": { @@ -3671,7 +3671,7 @@ { "$id": "376", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType79", + "name": "GetTreeAsJsonResponseContentType77", "namespace": "", "usage": "None", "valueType": { @@ -3688,7 +3688,7 @@ { "$id": "378", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType80", + "name": "GetTreeAsJsonResponseContentType78", "namespace": "", "usage": "None", "valueType": { @@ -3705,7 +3705,7 @@ { "$id": "380", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType81", + "name": "GetTreeAsJsonResponseContentType79", "namespace": "", "usage": "None", "valueType": { @@ -3722,7 +3722,7 @@ { "$id": "382", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType82", + "name": "GetTreeAsJsonResponseContentType80", "namespace": "", "usage": "None", "valueType": { @@ -3739,7 +3739,7 @@ { "$id": "384", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType83", + "name": "GetTreeAsJsonResponseContentType81", "namespace": "", "usage": "None", "valueType": { @@ -3756,7 +3756,7 @@ { "$id": "386", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType84", + "name": "GetTreeAsJsonResponseContentType82", "namespace": "", "usage": "None", "valueType": { @@ -3773,7 +3773,7 @@ { "$id": "388", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType85", + "name": "GetTreeAsJsonResponseContentType83", "namespace": "", "usage": "None", "valueType": { @@ -3790,7 +3790,7 @@ { "$id": "390", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType86", + "name": "GetTreeAsJsonResponseContentType84", "namespace": "", "usage": "None", "valueType": { @@ -3807,7 +3807,7 @@ { "$id": "392", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType87", + "name": "GetTreeAsJsonResponseContentType85", "namespace": "", "usage": "None", "valueType": { @@ -3824,7 +3824,7 @@ { "$id": "394", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType88", + "name": "GetTreeAsJsonResponseContentType86", "namespace": "", "usage": "None", "valueType": { @@ -3841,7 +3841,7 @@ { "$id": "396", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType89", + "name": "GetTreeAsJsonResponseContentType87", "namespace": "", "usage": "None", "valueType": { @@ -3858,7 +3858,7 @@ { "$id": "398", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType90", + "name": "GetTreeAsJsonResponseContentType88", "namespace": "", "usage": "None", "valueType": { @@ -3875,7 +3875,7 @@ { "$id": "400", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType91", + "name": "GetTreeAsJsonResponseContentType89", "namespace": "", "usage": "None", "valueType": { @@ -3892,7 +3892,7 @@ { "$id": "402", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType92", + "name": "GetTreeAsJsonResponseContentType90", "namespace": "", "usage": "None", "valueType": { @@ -3909,7 +3909,7 @@ { "$id": "404", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType93", + "name": "GetTreeAsJsonResponseContentType91", "namespace": "", "usage": "None", "valueType": { @@ -3926,7 +3926,7 @@ { "$id": "406", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType94", + "name": "GetTreeAsJsonResponseContentType92", "namespace": "", "usage": "None", "valueType": { @@ -3943,7 +3943,7 @@ { "$id": "408", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType95", + "name": "GetTreeAsJsonResponseContentType93", "namespace": "", "usage": "None", "valueType": { @@ -3960,7 +3960,7 @@ { "$id": "410", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType96", + "name": "GetTreeAsJsonResponseContentType94", "namespace": "", "usage": "None", "valueType": { @@ -3977,7 +3977,7 @@ { "$id": "412", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType97", + "name": "GetTreeAsJsonResponseContentType95", "namespace": "", "usage": "None", "valueType": { @@ -3994,7 +3994,7 @@ { "$id": "414", "kind": "constant", - "name": "SendJsonLinesRequestContentType5", + "name": "GetTreeAsJsonResponseContentType96", "namespace": "", "usage": "None", "valueType": { @@ -4004,14 +4004,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/jsonl", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "416", "kind": "constant", - "name": "SendJsonLinesRequestContentType6", + "name": "GetTreeAsJsonResponseContentType97", "namespace": "", "usage": "None", "valueType": { @@ -4021,14 +4021,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/jsonl", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "418", "kind": "constant", - "name": "SendJsonLinesRequestContentType7", + "name": "SendJsonLinesRequestContentType5", "namespace": "", "usage": "None", "valueType": { @@ -4045,7 +4045,7 @@ { "$id": "420", "kind": "constant", - "name": "SendJsonLinesRequestContentType8", + "name": "SendJsonLinesRequestContentType6", "namespace": "", "usage": "None", "valueType": { @@ -4062,7 +4062,7 @@ { "$id": "422", "kind": "constant", - "name": "SendJsonLinesRequestContentType9", + "name": "SendJsonLinesRequestContentType7", "namespace": "", "usage": "None", "valueType": { @@ -4079,7 +4079,7 @@ { "$id": "424", "kind": "constant", - "name": "SendJsonLinesRequestContentType10", + "name": "SendJsonLinesRequestContentType8", "namespace": "", "usage": "None", "valueType": { @@ -4096,7 +4096,7 @@ { "$id": "426", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType98", + "name": "SendJsonLinesRequestContentType9", "namespace": "", "usage": "None", "valueType": { @@ -4106,14 +4106,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/jsonl", "decorators": [], "isExactName": false }, { "$id": "428", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType99", + "name": "SendJsonLinesRequestContentType10", "namespace": "", "usage": "None", "valueType": { @@ -4123,14 +4123,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/jsonl", "decorators": [], "isExactName": false }, { "$id": "430", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType100", + "name": "GetTreeAsJsonResponseContentType98", "namespace": "", "usage": "None", "valueType": { @@ -4147,7 +4147,7 @@ { "$id": "432", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType101", + "name": "GetTreeAsJsonResponseContentType99", "namespace": "", "usage": "None", "valueType": { @@ -4164,7 +4164,7 @@ { "$id": "434", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType102", + "name": "GetTreeAsJsonResponseContentType100", "namespace": "", "usage": "None", "valueType": { @@ -4181,7 +4181,7 @@ { "$id": "436", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType103", + "name": "GetTreeAsJsonResponseContentType101", "namespace": "", "usage": "None", "valueType": { @@ -4198,7 +4198,7 @@ { "$id": "438", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType104", + "name": "GetTreeAsJsonResponseContentType102", "namespace": "", "usage": "None", "valueType": { @@ -4215,7 +4215,7 @@ { "$id": "440", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType105", + "name": "GetTreeAsJsonResponseContentType103", "namespace": "", "usage": "None", "valueType": { @@ -4232,7 +4232,7 @@ { "$id": "442", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType20", + "name": "GetTreeAsJsonResponseContentType104", "namespace": "", "usage": "None", "valueType": { @@ -4242,14 +4242,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "444", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType21", + "name": "GetTreeAsJsonResponseContentType105", "namespace": "", "usage": "None", "valueType": { @@ -4259,14 +4259,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "446", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType106", + "name": "GetXmlAdvancedModelResponseContentType22", "namespace": "", "usage": "None", "valueType": { @@ -4276,14 +4276,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, { "$id": "448", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType107", + "name": "GetXmlAdvancedModelResponseContentType23", "namespace": "", "usage": "None", "valueType": { @@ -4293,14 +4293,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, { "$id": "450", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType108", + "name": "GetTreeAsJsonResponseContentType106", "namespace": "", "usage": "None", "valueType": { @@ -4317,7 +4317,7 @@ { "$id": "452", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType109", + "name": "GetTreeAsJsonResponseContentType107", "namespace": "", "usage": "None", "valueType": { @@ -4334,7 +4334,7 @@ { "$id": "454", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType110", + "name": "GetTreeAsJsonResponseContentType108", "namespace": "", "usage": "None", "valueType": { @@ -4351,7 +4351,7 @@ { "$id": "456", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType111", + "name": "GetTreeAsJsonResponseContentType109", "namespace": "", "usage": "None", "valueType": { @@ -4368,7 +4368,7 @@ { "$id": "458", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType112", + "name": "GetTreeAsJsonResponseContentType110", "namespace": "", "usage": "None", "valueType": { @@ -4385,7 +4385,7 @@ { "$id": "460", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType113", + "name": "GetTreeAsJsonResponseContentType111", "namespace": "", "usage": "None", "valueType": { @@ -4402,7 +4402,7 @@ { "$id": "462", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType114", + "name": "GetTreeAsJsonResponseContentType112", "namespace": "", "usage": "None", "valueType": { @@ -4419,7 +4419,7 @@ { "$id": "464", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType115", + "name": "GetTreeAsJsonResponseContentType113", "namespace": "", "usage": "None", "valueType": { @@ -4436,7 +4436,7 @@ { "$id": "466", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType116", + "name": "GetTreeAsJsonResponseContentType114", "namespace": "", "usage": "None", "valueType": { @@ -4453,7 +4453,7 @@ { "$id": "468", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType117", + "name": "GetTreeAsJsonResponseContentType115", "namespace": "", "usage": "None", "valueType": { @@ -4466,11 +4466,45 @@ "value": "application/json", "decorators": [], "isExactName": false + }, + { + "$id": "470", + "kind": "constant", + "name": "GetTreeAsJsonResponseContentType116", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [], + "isExactName": false + }, + { + "$id": "472", + "kind": "constant", + "name": "GetTreeAsJsonResponseContentType117", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [], + "isExactName": false } ], "models": [ { - "$id": "470", + "$id": "474", "kind": "model", "name": "Thing", "apiVersions": [ @@ -4490,7 +4524,7 @@ "isExactName": false, "properties": [ { - "$id": "471", + "$id": "475", "kind": "property", "name": "name", "apiVersions": [ @@ -4500,7 +4534,7 @@ "serializedName": "name", "doc": "name of the Thing", "type": { - "$id": "472", + "$id": "476", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4521,7 +4555,7 @@ "isExactName": false }, { - "$id": "473", + "$id": "477", "kind": "property", "name": "requiredUnion", "apiVersions": [ @@ -4531,23 +4565,23 @@ "serializedName": "requiredUnion", "doc": "required Union", "type": { - "$id": "474", + "$id": "478", "kind": "union", "name": "ThingRequiredUnion", "variantTypes": [ { - "$id": "475", + "$id": "479", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "476", + "$id": "480", "kind": "array", "name": "Array", "valueType": { - "$id": "477", + "$id": "481", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4557,7 +4591,7 @@ "decorators": [] }, { - "$id": "478", + "$id": "482", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4583,7 +4617,7 @@ "isExactName": false }, { - "$id": "479", + "$id": "483", "kind": "property", "name": "requiredLiteralString", "apiVersions": [ @@ -4610,7 +4644,7 @@ "isExactName": false }, { - "$id": "480", + "$id": "484", "kind": "property", "name": "requiredNullableString", "apiVersions": [ @@ -4620,10 +4654,10 @@ "serializedName": "requiredNullableString", "doc": "required nullable string", "type": { - "$id": "481", + "$id": "485", "kind": "nullable", "type": { - "$id": "482", + "$id": "486", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4646,7 +4680,7 @@ "isExactName": false }, { - "$id": "483", + "$id": "487", "kind": "property", "name": "optionalNullableString", "apiVersions": [ @@ -4656,10 +4690,10 @@ "serializedName": "optionalNullableString", "doc": "required optional string", "type": { - "$id": "484", + "$id": "488", "kind": "nullable", "type": { - "$id": "485", + "$id": "489", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4682,7 +4716,7 @@ "isExactName": false }, { - "$id": "486", + "$id": "490", "kind": "property", "name": "requiredLiteralInt", "apiVersions": [ @@ -4709,7 +4743,7 @@ "isExactName": false }, { - "$id": "487", + "$id": "491", "kind": "property", "name": "requiredLiteralFloat", "apiVersions": [ @@ -4736,7 +4770,7 @@ "isExactName": false }, { - "$id": "488", + "$id": "492", "kind": "property", "name": "requiredLiteralBool", "apiVersions": [ @@ -4763,7 +4797,7 @@ "isExactName": false }, { - "$id": "489", + "$id": "493", "kind": "property", "name": "optionalLiteralString", "apiVersions": [ @@ -4790,7 +4824,7 @@ "isExactName": false }, { - "$id": "490", + "$id": "494", "kind": "property", "name": "requiredNullableLiteralString", "apiVersions": [ @@ -4800,7 +4834,7 @@ "serializedName": "requiredNullableLiteralString", "doc": "required nullable literal string", "type": { - "$id": "491", + "$id": "495", "kind": "nullable", "type": { "$ref": "5" @@ -4822,7 +4856,7 @@ "isExactName": false }, { - "$id": "492", + "$id": "496", "kind": "property", "name": "optionalLiteralInt", "apiVersions": [ @@ -4849,7 +4883,7 @@ "isExactName": false }, { - "$id": "493", + "$id": "497", "kind": "property", "name": "optionalLiteralFloat", "apiVersions": [ @@ -4876,7 +4910,7 @@ "isExactName": false }, { - "$id": "494", + "$id": "498", "kind": "property", "name": "optionalLiteralBool", "apiVersions": [ @@ -4903,7 +4937,7 @@ "isExactName": false }, { - "$id": "495", + "$id": "499", "kind": "property", "name": "requiredBadDescription", "apiVersions": [ @@ -4913,7 +4947,7 @@ "serializedName": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "496", + "$id": "500", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4934,7 +4968,7 @@ "isExactName": false }, { - "$id": "497", + "$id": "501", "kind": "property", "name": "optionalNullableList", "apiVersions": [ @@ -4944,14 +4978,14 @@ "serializedName": "optionalNullableList", "doc": "optional nullable collection", "type": { - "$id": "498", + "$id": "502", "kind": "nullable", "type": { - "$id": "499", + "$id": "503", "kind": "array", "name": "Array1", "valueType": { - "$id": "500", + "$id": "504", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4977,7 +5011,7 @@ "isExactName": false }, { - "$id": "501", + "$id": "505", "kind": "property", "name": "requiredNullableList", "apiVersions": [ @@ -4987,10 +5021,10 @@ "serializedName": "requiredNullableList", "doc": "required nullable collection", "type": { - "$id": "502", + "$id": "506", "kind": "nullable", "type": { - "$ref": "499" + "$ref": "503" }, "namespace": "SampleTypeSpec" }, @@ -5009,7 +5043,7 @@ "isExactName": false }, { - "$id": "503", + "$id": "507", "kind": "property", "name": "propertyWithSpecialDocs", "apiVersions": [ @@ -5019,7 +5053,7 @@ "serializedName": "propertyWithSpecialDocs", "doc": "This tests:\n- Simple bullet point. This bullet point is going to be very long to test how text wrapping is handled in bullet points within documentation comments. It should properly indent the wrapped lines.\n- Another bullet point with **bold text**. This bullet point is also intentionally long to see how the formatting is preserved when the text wraps onto multiple lines in the generated documentation.\n- Third bullet point with *italic text*. Similar to the previous points, this one is extended to ensure that the wrapping and formatting are correctly applied in the output.\n- Complex bullet point with **bold** and *italic* combined. This bullet point combines both bold and italic formatting and is long enough to test the wrapping behavior in such cases.\n- **Bold bullet point**: A bullet point that is entirely bolded. This point is also made lengthy to observe how the bold formatting is maintained across wrapped lines.\n- *Italic bullet point*: A bullet point that is entirely italicized. This final point is extended to verify that italic formatting is correctly applied even when the text spans multiple lines.", "type": { - "$id": "504", + "$id": "508", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5042,7 +5076,7 @@ ] }, { - "$id": "505", + "$id": "509", "kind": "model", "name": "RoundTripModel", "apiVersions": [ @@ -5062,7 +5096,7 @@ "isExactName": false, "properties": [ { - "$id": "506", + "$id": "510", "kind": "property", "name": "requiredString", "apiVersions": [ @@ -5072,7 +5106,7 @@ "serializedName": "requiredString", "doc": "Required string, illustrating a reference type property.", "type": { - "$id": "507", + "$id": "511", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5093,7 +5127,7 @@ "isExactName": false }, { - "$id": "508", + "$id": "512", "kind": "property", "name": "requiredInt", "apiVersions": [ @@ -5103,7 +5137,7 @@ "serializedName": "requiredInt", "doc": "Required int, illustrating a value type property.", "type": { - "$id": "509", + "$id": "513", "kind": "int32", "name": "int32", "encode": "string", @@ -5125,7 +5159,7 @@ "isExactName": false }, { - "$id": "510", + "$id": "514", "kind": "property", "name": "requiredCollection", "apiVersions": [ @@ -5135,7 +5169,7 @@ "serializedName": "requiredCollection", "doc": "Required collection of enums", "type": { - "$id": "511", + "$id": "515", "kind": "array", "name": "ArrayStringFixedEnum", "valueType": { @@ -5159,7 +5193,7 @@ "isExactName": false }, { - "$id": "512", + "$id": "516", "kind": "property", "name": "requiredDictionary", "apiVersions": [ @@ -5169,10 +5203,10 @@ "serializedName": "requiredDictionary", "doc": "Required dictionary of enums", "type": { - "$id": "513", + "$id": "517", "kind": "dict", "keyType": { - "$id": "514", + "$id": "518", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5198,7 +5232,7 @@ "isExactName": false }, { - "$id": "515", + "$id": "519", "kind": "property", "name": "requiredModel", "apiVersions": [ @@ -5208,7 +5242,7 @@ "serializedName": "requiredModel", "doc": "Required model", "type": { - "$ref": "470" + "$ref": "474" }, "optional": false, "readOnly": false, @@ -5225,7 +5259,7 @@ "isExactName": false }, { - "$id": "516", + "$id": "520", "kind": "property", "name": "intExtensibleEnum", "apiVersions": [ @@ -5252,7 +5286,7 @@ "isExactName": false }, { - "$id": "517", + "$id": "521", "kind": "property", "name": "intExtensibleEnumCollection", "apiVersions": [ @@ -5262,7 +5296,7 @@ "serializedName": "intExtensibleEnumCollection", "doc": "this is a collection of int based extensible enum", "type": { - "$id": "518", + "$id": "522", "kind": "array", "name": "ArrayIntExtensibleEnum", "valueType": { @@ -5286,7 +5320,7 @@ "isExactName": false }, { - "$id": "519", + "$id": "523", "kind": "property", "name": "floatExtensibleEnum", "apiVersions": [ @@ -5313,7 +5347,7 @@ "isExactName": false }, { - "$id": "520", + "$id": "524", "kind": "property", "name": "floatExtensibleEnumWithIntValue", "apiVersions": [ @@ -5340,7 +5374,7 @@ "isExactName": false }, { - "$id": "521", + "$id": "525", "kind": "property", "name": "floatExtensibleEnumCollection", "apiVersions": [ @@ -5350,7 +5384,7 @@ "serializedName": "floatExtensibleEnumCollection", "doc": "this is a collection of float based extensible enum", "type": { - "$id": "522", + "$id": "526", "kind": "array", "name": "ArrayFloatExtensibleEnum", "valueType": { @@ -5374,7 +5408,7 @@ "isExactName": false }, { - "$id": "523", + "$id": "527", "kind": "property", "name": "floatFixedEnum", "apiVersions": [ @@ -5401,7 +5435,7 @@ "isExactName": false }, { - "$id": "524", + "$id": "528", "kind": "property", "name": "floatFixedEnumWithIntValue", "apiVersions": [ @@ -5428,7 +5462,7 @@ "isExactName": false }, { - "$id": "525", + "$id": "529", "kind": "property", "name": "floatFixedEnumCollection", "apiVersions": [ @@ -5438,7 +5472,7 @@ "serializedName": "floatFixedEnumCollection", "doc": "this is a collection of float based fixed enum", "type": { - "$id": "526", + "$id": "530", "kind": "array", "name": "ArrayFloatFixedEnum", "valueType": { @@ -5462,7 +5496,7 @@ "isExactName": false }, { - "$id": "527", + "$id": "531", "kind": "property", "name": "intFixedEnum", "apiVersions": [ @@ -5489,7 +5523,7 @@ "isExactName": false }, { - "$id": "528", + "$id": "532", "kind": "property", "name": "intFixedEnumCollection", "apiVersions": [ @@ -5499,7 +5533,7 @@ "serializedName": "intFixedEnumCollection", "doc": "this is a collection of int based fixed enum", "type": { - "$id": "529", + "$id": "533", "kind": "array", "name": "ArrayIntFixedEnum", "valueType": { @@ -5523,7 +5557,7 @@ "isExactName": false }, { - "$id": "530", + "$id": "534", "kind": "property", "name": "stringFixedEnum", "apiVersions": [ @@ -5550,7 +5584,7 @@ "isExactName": false }, { - "$id": "531", + "$id": "535", "kind": "property", "name": "requiredUnknown", "apiVersions": [ @@ -5560,7 +5594,7 @@ "serializedName": "requiredUnknown", "doc": "required unknown", "type": { - "$id": "532", + "$id": "536", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -5581,7 +5615,7 @@ "isExactName": false }, { - "$id": "533", + "$id": "537", "kind": "property", "name": "optionalUnknown", "apiVersions": [ @@ -5591,7 +5625,7 @@ "serializedName": "optionalUnknown", "doc": "optional unknown", "type": { - "$id": "534", + "$id": "538", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -5612,7 +5646,7 @@ "isExactName": false }, { - "$id": "535", + "$id": "539", "kind": "property", "name": "requiredRecordUnknown", "apiVersions": [ @@ -5622,17 +5656,17 @@ "serializedName": "requiredRecordUnknown", "doc": "required record of unknown", "type": { - "$id": "536", + "$id": "540", "kind": "dict", "keyType": { - "$id": "537", + "$id": "541", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "538", + "$id": "542", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -5655,7 +5689,7 @@ "isExactName": false }, { - "$id": "539", + "$id": "543", "kind": "property", "name": "optionalRecordUnknown", "apiVersions": [ @@ -5665,7 +5699,7 @@ "serializedName": "optionalRecordUnknown", "doc": "optional record of unknown", "type": { - "$ref": "536" + "$ref": "540" }, "optional": true, "readOnly": false, @@ -5682,7 +5716,7 @@ "isExactName": false }, { - "$id": "540", + "$id": "544", "kind": "property", "name": "readOnlyRequiredRecordUnknown", "apiVersions": [ @@ -5692,7 +5726,7 @@ "serializedName": "readOnlyRequiredRecordUnknown", "doc": "required readonly record of unknown", "type": { - "$ref": "536" + "$ref": "540" }, "optional": false, "readOnly": true, @@ -5709,7 +5743,7 @@ "isExactName": false }, { - "$id": "541", + "$id": "545", "kind": "property", "name": "readOnlyOptionalRecordUnknown", "apiVersions": [ @@ -5719,7 +5753,7 @@ "serializedName": "readOnlyOptionalRecordUnknown", "doc": "optional readonly record of unknown", "type": { - "$ref": "536" + "$ref": "540" }, "optional": true, "readOnly": true, @@ -5736,7 +5770,7 @@ "isExactName": false }, { - "$id": "542", + "$id": "546", "kind": "property", "name": "modelWithRequiredNullable", "apiVersions": [ @@ -5746,7 +5780,7 @@ "serializedName": "modelWithRequiredNullable", "doc": "this is a model with required nullable properties", "type": { - "$id": "543", + "$id": "547", "kind": "model", "name": "ModelWithRequiredNullableProperties", "apiVersions": [ @@ -5766,7 +5800,7 @@ "isExactName": false, "properties": [ { - "$id": "544", + "$id": "548", "kind": "property", "name": "requiredNullablePrimitive", "apiVersions": [ @@ -5776,10 +5810,10 @@ "serializedName": "requiredNullablePrimitive", "doc": "required nullable primitive type", "type": { - "$id": "545", + "$id": "549", "kind": "nullable", "type": { - "$id": "546", + "$id": "550", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -5802,7 +5836,7 @@ "isExactName": false }, { - "$id": "547", + "$id": "551", "kind": "property", "name": "requiredExtensibleEnum", "apiVersions": [ @@ -5812,7 +5846,7 @@ "serializedName": "requiredExtensibleEnum", "doc": "required nullable extensible enum type", "type": { - "$id": "548", + "$id": "552", "kind": "nullable", "type": { "$ref": "27" @@ -5834,7 +5868,7 @@ "isExactName": false }, { - "$id": "549", + "$id": "553", "kind": "property", "name": "requiredFixedEnum", "apiVersions": [ @@ -5844,7 +5878,7 @@ "serializedName": "requiredFixedEnum", "doc": "required nullable fixed enum type", "type": { - "$id": "550", + "$id": "554", "kind": "nullable", "type": { "$ref": "17" @@ -5866,7 +5900,7 @@ "isExactName": false }, { - "$id": "551", + "$id": "555", "kind": "property", "name": "fixedUnion", "apiVersions": [ @@ -5892,7 +5926,7 @@ "isExactName": false }, { - "$id": "552", + "$id": "556", "kind": "property", "name": "numericEnum", "apiVersions": [ @@ -5934,7 +5968,7 @@ "isExactName": false }, { - "$id": "553", + "$id": "557", "kind": "property", "name": "requiredBytes", "apiVersions": [ @@ -5944,7 +5978,7 @@ "serializedName": "requiredBytes", "doc": "Required bytes", "type": { - "$id": "554", + "$id": "558", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -5968,10 +6002,10 @@ ] }, { - "$ref": "543" + "$ref": "547" }, { - "$id": "555", + "$id": "559", "kind": "model", "name": "Wrapper", "apiVersions": [ @@ -5986,7 +6020,7 @@ "isExactName": false, "properties": [ { - "$id": "556", + "$id": "560", "kind": "property", "name": "p1", "apiVersions": [ @@ -5995,7 +6029,7 @@ ], "doc": "header parameter", "type": { - "$id": "557", + "$id": "561", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6012,7 +6046,7 @@ "isExactName": false }, { - "$id": "558", + "$id": "562", "kind": "property", "name": "action", "apiVersions": [ @@ -6021,7 +6055,7 @@ ], "doc": "body parameter", "type": { - "$ref": "505" + "$ref": "509" }, "optional": false, "readOnly": false, @@ -6034,7 +6068,7 @@ "isExactName": false }, { - "$id": "559", + "$id": "563", "kind": "property", "name": "p2", "apiVersions": [ @@ -6043,7 +6077,7 @@ ], "doc": "path parameter", "type": { - "$id": "560", + "$id": "564", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6062,7 +6096,7 @@ ] }, { - "$id": "561", + "$id": "565", "kind": "model", "name": "Friend", "apiVersions": [ @@ -6082,7 +6116,7 @@ "isExactName": false, "properties": [ { - "$id": "562", + "$id": "566", "kind": "property", "name": "name", "apiVersions": [ @@ -6092,7 +6126,7 @@ "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "563", + "$id": "567", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6115,7 +6149,7 @@ ] }, { - "$id": "564", + "$id": "568", "kind": "model", "name": "RenamedModel", "apiVersions": [ @@ -6135,7 +6169,7 @@ "isExactName": false, "properties": [ { - "$id": "565", + "$id": "569", "kind": "property", "name": "otherName", "apiVersions": [ @@ -6145,7 +6179,7 @@ "serializedName": "otherName", "doc": "name of the ModelWithClientName", "type": { - "$id": "566", + "$id": "570", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6168,7 +6202,7 @@ ] }, { - "$id": "567", + "$id": "571", "kind": "model", "name": "ReturnsAnonymousModelResponse", "apiVersions": [ @@ -6188,7 +6222,7 @@ "properties": [] }, { - "$id": "568", + "$id": "572", "kind": "model", "name": "ListWithNextLinkResponse", "apiVersions": [ @@ -6207,7 +6241,7 @@ "isExactName": false, "properties": [ { - "$id": "569", + "$id": "573", "kind": "property", "name": "things", "apiVersions": [ @@ -6216,11 +6250,11 @@ ], "serializedName": "things", "type": { - "$id": "570", + "$id": "574", "kind": "array", "name": "ArrayThing", "valueType": { - "$ref": "470" + "$ref": "474" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -6240,7 +6274,7 @@ "isExactName": false }, { - "$id": "571", + "$id": "575", "kind": "property", "name": "next", "apiVersions": [ @@ -6249,7 +6283,7 @@ ], "serializedName": "next", "type": { - "$id": "572", + "$id": "576", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -6272,7 +6306,7 @@ ] }, { - "$id": "573", + "$id": "577", "kind": "model", "name": "ListWithStringNextLinkResponse", "apiVersions": [ @@ -6291,7 +6325,7 @@ "isExactName": false, "properties": [ { - "$id": "574", + "$id": "578", "kind": "property", "name": "things", "apiVersions": [ @@ -6300,7 +6334,7 @@ ], "serializedName": "things", "type": { - "$ref": "570" + "$ref": "574" }, "optional": false, "readOnly": false, @@ -6317,7 +6351,7 @@ "isExactName": false }, { - "$id": "575", + "$id": "579", "kind": "property", "name": "next", "apiVersions": [ @@ -6326,7 +6360,7 @@ ], "serializedName": "next", "type": { - "$id": "576", + "$id": "580", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6349,7 +6383,7 @@ ] }, { - "$id": "577", + "$id": "581", "kind": "model", "name": "ListWithContinuationTokenResponse", "apiVersions": [ @@ -6368,7 +6402,7 @@ "isExactName": false, "properties": [ { - "$id": "578", + "$id": "582", "kind": "property", "name": "things", "apiVersions": [ @@ -6377,7 +6411,7 @@ ], "serializedName": "things", "type": { - "$ref": "570" + "$ref": "574" }, "optional": false, "readOnly": false, @@ -6394,7 +6428,7 @@ "isExactName": false }, { - "$id": "579", + "$id": "583", "kind": "property", "name": "nextToken", "apiVersions": [ @@ -6403,7 +6437,7 @@ ], "serializedName": "nextToken", "type": { - "$id": "580", + "$id": "584", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6426,7 +6460,7 @@ ] }, { - "$id": "581", + "$id": "585", "kind": "model", "name": "ListWithContinuationTokenHeaderResponseResponse", "apiVersions": [], @@ -6442,7 +6476,7 @@ "isExactName": false, "properties": [ { - "$id": "582", + "$id": "586", "kind": "property", "name": "things", "apiVersions": [ @@ -6451,7 +6485,7 @@ ], "serializedName": "things", "type": { - "$ref": "570" + "$ref": "574" }, "optional": false, "readOnly": false, @@ -6470,7 +6504,7 @@ ] }, { - "$id": "583", + "$id": "587", "kind": "model", "name": "PageThing", "apiVersions": [ @@ -6489,7 +6523,7 @@ "isExactName": false, "properties": [ { - "$id": "584", + "$id": "588", "kind": "property", "name": "items", "apiVersions": [ @@ -6498,7 +6532,7 @@ ], "serializedName": "items", "type": { - "$ref": "570" + "$ref": "574" }, "optional": false, "readOnly": false, @@ -6517,7 +6551,7 @@ ] }, { - "$id": "585", + "$id": "589", "kind": "model", "name": "ModelWithEmbeddedNonBodyParameters", "apiVersions": [ @@ -6536,7 +6570,7 @@ "isExactName": false, "properties": [ { - "$id": "586", + "$id": "590", "kind": "property", "name": "name", "apiVersions": [ @@ -6546,7 +6580,7 @@ "serializedName": "name", "doc": "name of the ModelWithEmbeddedNonBodyParameters", "type": { - "$id": "587", + "$id": "591", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6567,7 +6601,7 @@ "isExactName": false }, { - "$id": "588", + "$id": "592", "kind": "property", "name": "requiredHeader", "apiVersions": [ @@ -6577,7 +6611,7 @@ "serializedName": "requiredHeader", "doc": "required header parameter", "type": { - "$id": "589", + "$id": "593", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6598,7 +6632,7 @@ "isExactName": false }, { - "$id": "590", + "$id": "594", "kind": "property", "name": "optionalHeader", "apiVersions": [ @@ -6608,7 +6642,7 @@ "serializedName": "optionalHeader", "doc": "optional header parameter", "type": { - "$id": "591", + "$id": "595", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6629,7 +6663,7 @@ "isExactName": false }, { - "$id": "592", + "$id": "596", "kind": "property", "name": "requiredQuery", "apiVersions": [ @@ -6639,7 +6673,7 @@ "serializedName": "requiredQuery", "doc": "required query parameter", "type": { - "$id": "593", + "$id": "597", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6660,7 +6694,7 @@ "isExactName": false }, { - "$id": "594", + "$id": "598", "kind": "property", "name": "optionalQuery", "apiVersions": [ @@ -6670,7 +6704,7 @@ "serializedName": "optionalQuery", "doc": "optional query parameter", "type": { - "$id": "595", + "$id": "599", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6693,7 +6727,7 @@ ] }, { - "$id": "596", + "$id": "600", "kind": "model", "name": "DynamicModel", "apiVersions": [ @@ -6720,7 +6754,7 @@ "isExactName": false, "properties": [ { - "$id": "597", + "$id": "601", "kind": "property", "name": "name", "apiVersions": [ @@ -6729,7 +6763,7 @@ ], "serializedName": "name", "type": { - "$id": "598", + "$id": "602", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6750,7 +6784,7 @@ "isExactName": false }, { - "$id": "599", + "$id": "603", "kind": "property", "name": "optionalUnknown", "apiVersions": [ @@ -6759,7 +6793,7 @@ ], "serializedName": "optionalUnknown", "type": { - "$id": "600", + "$id": "604", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -6780,7 +6814,7 @@ "isExactName": false }, { - "$id": "601", + "$id": "605", "kind": "property", "name": "optionalInt", "apiVersions": [ @@ -6789,7 +6823,7 @@ ], "serializedName": "optionalInt", "type": { - "$id": "602", + "$id": "606", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6810,7 +6844,7 @@ "isExactName": false }, { - "$id": "603", + "$id": "607", "kind": "property", "name": "optionalNullableList", "apiVersions": [ @@ -6819,10 +6853,10 @@ ], "serializedName": "optionalNullableList", "type": { - "$id": "604", + "$id": "608", "kind": "nullable", "type": { - "$ref": "499" + "$ref": "503" }, "namespace": "SampleTypeSpec" }, @@ -6841,7 +6875,7 @@ "isExactName": false }, { - "$id": "605", + "$id": "609", "kind": "property", "name": "requiredNullableList", "apiVersions": [ @@ -6850,10 +6884,10 @@ ], "serializedName": "requiredNullableList", "type": { - "$id": "606", + "$id": "610", "kind": "nullable", "type": { - "$ref": "499" + "$ref": "503" }, "namespace": "SampleTypeSpec" }, @@ -6872,7 +6906,7 @@ "isExactName": false }, { - "$id": "607", + "$id": "611", "kind": "property", "name": "optionalNullableDictionary", "apiVersions": [ @@ -6881,20 +6915,20 @@ ], "serializedName": "optionalNullableDictionary", "type": { - "$id": "608", + "$id": "612", "kind": "nullable", "type": { - "$id": "609", + "$id": "613", "kind": "dict", "keyType": { - "$id": "610", + "$id": "614", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "611", + "$id": "615", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6919,7 +6953,7 @@ "isExactName": false }, { - "$id": "612", + "$id": "616", "kind": "property", "name": "requiredNullableDictionary", "apiVersions": [ @@ -6928,10 +6962,10 @@ ], "serializedName": "requiredNullableDictionary", "type": { - "$id": "613", + "$id": "617", "kind": "nullable", "type": { - "$ref": "609" + "$ref": "613" }, "namespace": "SampleTypeSpec" }, @@ -6950,7 +6984,7 @@ "isExactName": false }, { - "$id": "614", + "$id": "618", "kind": "property", "name": "primitiveDictionary", "apiVersions": [ @@ -6959,7 +6993,7 @@ ], "serializedName": "primitiveDictionary", "type": { - "$ref": "609" + "$ref": "613" }, "optional": false, "readOnly": false, @@ -6976,7 +7010,7 @@ "isExactName": false }, { - "$id": "615", + "$id": "619", "kind": "property", "name": "foo", "apiVersions": [ @@ -6985,7 +7019,7 @@ ], "serializedName": "foo", "type": { - "$id": "616", + "$id": "620", "kind": "model", "name": "AnotherDynamicModel", "apiVersions": [ @@ -7012,7 +7046,7 @@ "isExactName": false, "properties": [ { - "$id": "617", + "$id": "621", "kind": "property", "name": "bar", "apiVersions": [ @@ -7021,7 +7055,7 @@ ], "serializedName": "bar", "type": { - "$id": "618", + "$id": "622", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7058,7 +7092,7 @@ "isExactName": false }, { - "$id": "619", + "$id": "623", "kind": "property", "name": "listFoo", "apiVersions": [ @@ -7067,11 +7101,11 @@ ], "serializedName": "listFoo", "type": { - "$id": "620", + "$id": "624", "kind": "array", "name": "ArrayAnotherDynamicModel", "valueType": { - "$ref": "616" + "$ref": "620" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -7091,7 +7125,7 @@ "isExactName": false }, { - "$id": "621", + "$id": "625", "kind": "property", "name": "listOfListFoo", "apiVersions": [ @@ -7100,11 +7134,11 @@ ], "serializedName": "listOfListFoo", "type": { - "$id": "622", + "$id": "626", "kind": "array", "name": "ArrayArray", "valueType": { - "$ref": "620" + "$ref": "624" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -7124,7 +7158,7 @@ "isExactName": false }, { - "$id": "623", + "$id": "627", "kind": "property", "name": "dictionaryFoo", "apiVersions": [ @@ -7133,17 +7167,17 @@ ], "serializedName": "dictionaryFoo", "type": { - "$id": "624", + "$id": "628", "kind": "dict", "keyType": { - "$id": "625", + "$id": "629", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "616" + "$ref": "620" }, "decorators": [] }, @@ -7162,7 +7196,7 @@ "isExactName": false }, { - "$id": "626", + "$id": "630", "kind": "property", "name": "dictionaryOfDictionaryFoo", "apiVersions": [ @@ -7171,17 +7205,17 @@ ], "serializedName": "dictionaryOfDictionaryFoo", "type": { - "$id": "627", + "$id": "631", "kind": "dict", "keyType": { - "$id": "628", + "$id": "632", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "624" + "$ref": "628" }, "decorators": [] }, @@ -7200,7 +7234,7 @@ "isExactName": false }, { - "$id": "629", + "$id": "633", "kind": "property", "name": "dictionaryListFoo", "apiVersions": [ @@ -7209,17 +7243,17 @@ ], "serializedName": "dictionaryListFoo", "type": { - "$id": "630", + "$id": "634", "kind": "dict", "keyType": { - "$id": "631", + "$id": "635", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "620" + "$ref": "624" }, "decorators": [] }, @@ -7238,7 +7272,7 @@ "isExactName": false }, { - "$id": "632", + "$id": "636", "kind": "property", "name": "listOfDictionaryFoo", "apiVersions": [ @@ -7247,11 +7281,11 @@ ], "serializedName": "listOfDictionaryFoo", "type": { - "$id": "633", + "$id": "637", "kind": "array", "name": "ArrayRecord", "valueType": { - "$ref": "624" + "$ref": "628" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -7273,10 +7307,10 @@ ] }, { - "$ref": "616" + "$ref": "620" }, { - "$id": "634", + "$id": "638", "kind": "model", "name": "XmlAdvancedModel", "apiVersions": [ @@ -7305,7 +7339,7 @@ "isExactName": false, "properties": [ { - "$id": "635", + "$id": "639", "kind": "property", "name": "name", "apiVersions": [ @@ -7315,7 +7349,7 @@ "serializedName": "name", "doc": "A simple string property", "type": { - "$id": "636", + "$id": "640", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7338,7 +7372,7 @@ "isExactName": false }, { - "$id": "637", + "$id": "641", "kind": "property", "name": "age", "apiVersions": [ @@ -7348,7 +7382,7 @@ "serializedName": "age", "doc": "An integer property", "type": { - "$id": "638", + "$id": "642", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -7371,7 +7405,7 @@ "isExactName": false }, { - "$id": "639", + "$id": "643", "kind": "property", "name": "enabled", "apiVersions": [ @@ -7381,7 +7415,7 @@ "serializedName": "enabled", "doc": "A boolean property", "type": { - "$id": "640", + "$id": "644", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -7404,7 +7438,7 @@ "isExactName": false }, { - "$id": "641", + "$id": "645", "kind": "property", "name": "score", "apiVersions": [ @@ -7414,7 +7448,7 @@ "serializedName": "score", "doc": "A float property", "type": { - "$id": "642", + "$id": "646", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -7437,7 +7471,7 @@ "isExactName": false }, { - "$id": "643", + "$id": "647", "kind": "property", "name": "optionalString", "apiVersions": [ @@ -7447,7 +7481,7 @@ "serializedName": "optionalString", "doc": "An optional string", "type": { - "$id": "644", + "$id": "648", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7470,7 +7504,7 @@ "isExactName": false }, { - "$id": "645", + "$id": "649", "kind": "property", "name": "optionalInt", "apiVersions": [ @@ -7480,7 +7514,7 @@ "serializedName": "optionalInt", "doc": "An optional integer", "type": { - "$id": "646", + "$id": "650", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -7503,7 +7537,7 @@ "isExactName": false }, { - "$id": "647", + "$id": "651", "kind": "property", "name": "nullableString", "apiVersions": [ @@ -7513,10 +7547,10 @@ "serializedName": "nullableString", "doc": "A nullable string", "type": { - "$id": "648", + "$id": "652", "kind": "nullable", "type": { - "$id": "649", + "$id": "653", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7541,7 +7575,7 @@ "isExactName": false }, { - "$id": "650", + "$id": "654", "kind": "property", "name": "id", "apiVersions": [ @@ -7551,7 +7585,7 @@ "serializedName": "id", "doc": "A string as XML attribute", "type": { - "$id": "651", + "$id": "655", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7579,7 +7613,7 @@ "isExactName": false }, { - "$id": "652", + "$id": "656", "kind": "property", "name": "version", "apiVersions": [ @@ -7589,7 +7623,7 @@ "serializedName": "version", "doc": "An integer as XML attribute", "type": { - "$id": "653", + "$id": "657", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -7617,7 +7651,7 @@ "isExactName": false }, { - "$id": "654", + "$id": "658", "kind": "property", "name": "isActive", "apiVersions": [ @@ -7627,7 +7661,7 @@ "serializedName": "isActive", "doc": "A boolean as XML attribute", "type": { - "$id": "655", + "$id": "659", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -7655,7 +7689,7 @@ "isExactName": false }, { - "$id": "656", + "$id": "660", "kind": "property", "name": "originalName", "apiVersions": [ @@ -7665,7 +7699,7 @@ "serializedName": "RenamedProperty", "doc": "A property with a custom XML element name", "type": { - "$id": "657", + "$id": "661", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7695,7 +7729,7 @@ "isExactName": false }, { - "$id": "658", + "$id": "662", "kind": "property", "name": "xmlIdentifier", "apiVersions": [ @@ -7705,7 +7739,7 @@ "serializedName": "xml-id", "doc": "An attribute with a custom XML name", "type": { - "$id": "659", + "$id": "663", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7739,7 +7773,7 @@ "isExactName": false }, { - "$id": "660", + "$id": "664", "kind": "property", "name": "content", "apiVersions": [ @@ -7749,7 +7783,7 @@ "serializedName": "content", "doc": "Text content in the element (unwrapped string)", "type": { - "$id": "661", + "$id": "665", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7777,7 +7811,7 @@ "isExactName": false }, { - "$id": "662", + "$id": "666", "kind": "property", "name": "unwrappedStrings", "apiVersions": [ @@ -7787,7 +7821,7 @@ "serializedName": "unwrappedStrings", "doc": "An unwrapped array of strings - items appear directly without wrapper", "type": { - "$ref": "476" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -7812,7 +7846,7 @@ "isExactName": false }, { - "$id": "663", + "$id": "667", "kind": "property", "name": "unwrappedCounts", "apiVersions": [ @@ -7822,7 +7856,7 @@ "serializedName": "unwrappedCounts", "doc": "An unwrapped array of integers", "type": { - "$ref": "499" + "$ref": "503" }, "optional": false, "readOnly": false, @@ -7847,7 +7881,7 @@ "isExactName": false }, { - "$id": "664", + "$id": "668", "kind": "property", "name": "unwrappedItems", "apiVersions": [ @@ -7857,11 +7891,11 @@ "serializedName": "unwrappedItems", "doc": "An unwrapped array of models", "type": { - "$id": "665", + "$id": "669", "kind": "array", "name": "ArrayXmlItem", "valueType": { - "$id": "666", + "$id": "670", "kind": "model", "name": "XmlItem", "apiVersions": [ @@ -7890,7 +7924,7 @@ "isExactName": false, "properties": [ { - "$id": "667", + "$id": "671", "kind": "property", "name": "itemName", "apiVersions": [ @@ -7900,7 +7934,7 @@ "serializedName": "itemName", "doc": "The item name", "type": { - "$id": "668", + "$id": "672", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7923,7 +7957,7 @@ "isExactName": false }, { - "$id": "669", + "$id": "673", "kind": "property", "name": "itemValue", "apiVersions": [ @@ -7933,7 +7967,7 @@ "serializedName": "itemValue", "doc": "The item value", "type": { - "$id": "670", + "$id": "674", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -7956,7 +7990,7 @@ "isExactName": false }, { - "$id": "671", + "$id": "675", "kind": "property", "name": "itemId", "apiVersions": [ @@ -7966,7 +8000,7 @@ "serializedName": "itemId", "doc": "Item ID as attribute", "type": { - "$id": "672", + "$id": "676", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8021,7 +8055,7 @@ "isExactName": false }, { - "$id": "673", + "$id": "677", "kind": "property", "name": "wrappedColors", "apiVersions": [ @@ -8031,7 +8065,7 @@ "serializedName": "wrappedColors", "doc": "A wrapped array of strings (default)", "type": { - "$ref": "476" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -8051,7 +8085,7 @@ "isExactName": false }, { - "$id": "674", + "$id": "678", "kind": "property", "name": "items", "apiVersions": [ @@ -8061,7 +8095,7 @@ "serializedName": "ItemCollection", "doc": "A wrapped array with custom wrapper name", "type": { - "$ref": "665" + "$ref": "669" }, "optional": false, "readOnly": false, @@ -8088,7 +8122,7 @@ "isExactName": false }, { - "$id": "675", + "$id": "679", "kind": "property", "name": "nestedModel", "apiVersions": [ @@ -8098,7 +8132,7 @@ "serializedName": "nestedModel", "doc": "A nested model property", "type": { - "$id": "676", + "$id": "680", "kind": "model", "name": "XmlNestedModel", "apiVersions": [ @@ -8120,7 +8154,7 @@ "isExactName": false, "properties": [ { - "$id": "677", + "$id": "681", "kind": "property", "name": "value", "apiVersions": [ @@ -8130,7 +8164,7 @@ "serializedName": "value", "doc": "The value of the nested model", "type": { - "$id": "678", + "$id": "682", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8153,7 +8187,7 @@ "isExactName": false }, { - "$id": "679", + "$id": "683", "kind": "property", "name": "nestedId", "apiVersions": [ @@ -8163,7 +8197,7 @@ "serializedName": "nestedId", "doc": "An attribute on the nested model", "type": { - "$id": "680", + "$id": "684", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -8209,7 +8243,7 @@ "isExactName": false }, { - "$id": "681", + "$id": "685", "kind": "property", "name": "optionalNestedModel", "apiVersions": [ @@ -8219,7 +8253,7 @@ "serializedName": "optionalNestedModel", "doc": "An optional nested model", "type": { - "$ref": "676" + "$ref": "680" }, "optional": true, "readOnly": false, @@ -8238,7 +8272,7 @@ "isExactName": false }, { - "$id": "682", + "$id": "686", "kind": "property", "name": "metadata", "apiVersions": [ @@ -8248,17 +8282,17 @@ "serializedName": "metadata", "doc": "A dictionary property", "type": { - "$id": "683", + "$id": "687", "kind": "dict", "keyType": { - "$id": "684", + "$id": "688", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "685", + "$id": "689", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8283,7 +8317,7 @@ "isExactName": false }, { - "$id": "686", + "$id": "690", "kind": "property", "name": "createdAt", "apiVersions": [ @@ -8293,12 +8327,12 @@ "serializedName": "createdAt", "doc": "A date-time property", "type": { - "$id": "687", + "$id": "691", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "688", + "$id": "692", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8324,7 +8358,7 @@ "isExactName": false }, { - "$id": "689", + "$id": "693", "kind": "property", "name": "duration", "apiVersions": [ @@ -8334,12 +8368,12 @@ "serializedName": "duration", "doc": "A duration property", "type": { - "$id": "690", + "$id": "694", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "691", + "$id": "695", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8365,7 +8399,7 @@ "isExactName": false }, { - "$id": "692", + "$id": "696", "kind": "property", "name": "data", "apiVersions": [ @@ -8375,7 +8409,7 @@ "serializedName": "data", "doc": "A bytes property", "type": { - "$id": "693", + "$id": "697", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -8399,7 +8433,7 @@ "isExactName": false }, { - "$id": "694", + "$id": "698", "kind": "property", "name": "optionalRecordUnknown", "apiVersions": [ @@ -8409,7 +8443,7 @@ "serializedName": "optionalRecordUnknown", "doc": "optional record of unknown", "type": { - "$ref": "536" + "$ref": "540" }, "optional": true, "readOnly": false, @@ -8428,7 +8462,7 @@ "isExactName": false }, { - "$id": "695", + "$id": "699", "kind": "property", "name": "fixedEnum", "apiVersions": [ @@ -8457,7 +8491,7 @@ "isExactName": false }, { - "$id": "696", + "$id": "700", "kind": "property", "name": "extensibleEnum", "apiVersions": [ @@ -8486,7 +8520,7 @@ "isExactName": false }, { - "$id": "697", + "$id": "701", "kind": "property", "name": "optionalFixedEnum", "apiVersions": [ @@ -8515,7 +8549,7 @@ "isExactName": false }, { - "$id": "698", + "$id": "702", "kind": "property", "name": "optionalExtensibleEnum", "apiVersions": [ @@ -8544,7 +8578,7 @@ "isExactName": false }, { - "$id": "699", + "$id": "703", "kind": "property", "name": "label", "apiVersions": [ @@ -8553,7 +8587,7 @@ ], "serializedName": "label", "type": { - "$id": "700", + "$id": "704", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8568,14 +8602,14 @@ "name": "TypeSpec.Xml.@ns", "arguments": { "ns": { - "$id": "701", + "$id": "705", "kind": "enumvalue", "decorators": [], "name": "ns1", "isExactName": false, "value": "https://example.com/ns1", "enumType": { - "$id": "702", + "$id": "706", "kind": "enum", "decorators": [ { @@ -8588,7 +8622,7 @@ "isExactName": false, "namespace": "SampleTypeSpec", "valueType": { - "$id": "703", + "$id": "707", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -8597,32 +8631,32 @@ }, "values": [ { - "$id": "704", + "$id": "708", "kind": "enumvalue", "decorators": [], "name": "ns1", "isExactName": false, "value": "https://example.com/ns1", "enumType": { - "$ref": "702" + "$ref": "706" }, "valueType": { - "$ref": "703" + "$ref": "707" }, "crossLanguageDefinitionId": "SampleTypeSpec.XmlNamespaces.ns1" }, { - "$id": "705", + "$id": "709", "kind": "enumvalue", "decorators": [], "name": "ns2", "isExactName": false, "value": "https://example.com/ns2", "enumType": { - "$ref": "702" + "$ref": "706" }, "valueType": { - "$ref": "703" + "$ref": "707" }, "crossLanguageDefinitionId": "SampleTypeSpec.XmlNamespaces.ns2" } @@ -8640,7 +8674,7 @@ "__accessSet": true }, "valueType": { - "$ref": "703" + "$ref": "707" }, "crossLanguageDefinitionId": "SampleTypeSpec.XmlNamespaces.ns1" } @@ -8667,7 +8701,7 @@ "isExactName": false }, { - "$id": "706", + "$id": "710", "kind": "property", "name": "daysUsed", "apiVersions": [ @@ -8676,7 +8710,7 @@ ], "serializedName": "daysUsed", "type": { - "$id": "707", + "$id": "711", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -8691,17 +8725,17 @@ "name": "TypeSpec.Xml.@ns", "arguments": { "ns": { - "$id": "708", + "$id": "712", "kind": "enumvalue", "decorators": [], "name": "ns2", "isExactName": false, "value": "https://example.com/ns2", "enumType": { - "$ref": "702" + "$ref": "706" }, "valueType": { - "$ref": "703" + "$ref": "707" }, "crossLanguageDefinitionId": "SampleTypeSpec.XmlNamespaces.ns2" } @@ -8724,7 +8758,7 @@ "isExactName": false }, { - "$id": "709", + "$id": "713", "kind": "property", "name": "fooItems", "apiVersions": [ @@ -8733,7 +8767,7 @@ ], "serializedName": "fooItems", "type": { - "$ref": "476" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -8765,7 +8799,7 @@ "isExactName": false }, { - "$id": "710", + "$id": "714", "kind": "property", "name": "anotherModel", "apiVersions": [ @@ -8774,7 +8808,7 @@ ], "serializedName": "anotherModel", "type": { - "$ref": "676" + "$ref": "680" }, "optional": false, "readOnly": false, @@ -8805,7 +8839,7 @@ "isExactName": false }, { - "$id": "711", + "$id": "715", "kind": "property", "name": "modelsWithNamespaces", "apiVersions": [ @@ -8814,11 +8848,11 @@ ], "serializedName": "modelsWithNamespaces", "type": { - "$id": "712", + "$id": "716", "kind": "array", "name": "ArrayXmlModelWithNamespace", "valueType": { - "$id": "713", + "$id": "717", "kind": "model", "name": "XmlModelWithNamespace", "apiVersions": [ @@ -8851,7 +8885,7 @@ "isExactName": false, "properties": [ { - "$id": "714", + "$id": "718", "kind": "property", "name": "foo", "apiVersions": [ @@ -8860,7 +8894,7 @@ ], "serializedName": "foo", "type": { - "$id": "715", + "$id": "719", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8909,7 +8943,7 @@ "isExactName": false }, { - "$id": "716", + "$id": "720", "kind": "property", "name": "unwrappedModelsWithNamespaces", "apiVersions": [ @@ -8918,7 +8952,7 @@ ], "serializedName": "unwrappedModelsWithNamespaces", "type": { - "$ref": "712" + "$ref": "716" }, "optional": false, "readOnly": false, @@ -8943,7 +8977,7 @@ "isExactName": false }, { - "$id": "717", + "$id": "721", "kind": "property", "name": "listOfListFoo", "apiVersions": [ @@ -8952,11 +8986,11 @@ ], "serializedName": "listOfListFoo", "type": { - "$id": "718", + "$id": "722", "kind": "array", "name": "ArrayArray1", "valueType": { - "$ref": "665" + "$ref": "669" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -8979,7 +9013,7 @@ "isExactName": false }, { - "$id": "719", + "$id": "723", "kind": "property", "name": "dictionaryFoo", "apiVersions": [ @@ -8988,17 +9022,17 @@ ], "serializedName": "dictionaryFoo", "type": { - "$id": "720", + "$id": "724", "kind": "dict", "keyType": { - "$id": "721", + "$id": "725", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "666" + "$ref": "670" }, "decorators": [] }, @@ -9019,7 +9053,7 @@ "isExactName": false }, { - "$id": "722", + "$id": "726", "kind": "property", "name": "dictionaryOfDictionaryFoo", "apiVersions": [ @@ -9028,17 +9062,17 @@ ], "serializedName": "dictionaryOfDictionaryFoo", "type": { - "$id": "723", + "$id": "727", "kind": "dict", "keyType": { - "$id": "724", + "$id": "728", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "720" + "$ref": "724" }, "decorators": [] }, @@ -9059,7 +9093,7 @@ "isExactName": false }, { - "$id": "725", + "$id": "729", "kind": "property", "name": "dictionaryListFoo", "apiVersions": [ @@ -9068,17 +9102,17 @@ ], "serializedName": "dictionaryListFoo", "type": { - "$id": "726", + "$id": "730", "kind": "dict", "keyType": { - "$id": "727", + "$id": "731", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "665" + "$ref": "669" }, "decorators": [] }, @@ -9099,7 +9133,7 @@ "isExactName": false }, { - "$id": "728", + "$id": "732", "kind": "property", "name": "listOfDictionaryFoo", "apiVersions": [ @@ -9108,11 +9142,11 @@ ], "serializedName": "listOfDictionaryFoo", "type": { - "$id": "729", + "$id": "733", "kind": "array", "name": "ArrayRecord1", "valueType": { - "$ref": "720" + "$ref": "724" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -9137,16 +9171,16 @@ ] }, { - "$ref": "666" + "$ref": "670" }, { - "$ref": "676" + "$ref": "680" }, { - "$ref": "713" + "$ref": "717" }, { - "$id": "730", + "$id": "734", "kind": "model", "name": "Cat", "apiVersions": [ @@ -9161,7 +9195,7 @@ "isExactName": false, "properties": [ { - "$id": "731", + "$id": "735", "kind": "property", "name": "id", "apiVersions": [ @@ -9170,7 +9204,7 @@ ], "serializedName": "id", "type": { - "$id": "732", + "$id": "736", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9197,7 +9231,7 @@ "isExactName": false }, { - "$id": "733", + "$id": "737", "kind": "property", "name": "boolPart", "apiVersions": [ @@ -9206,7 +9240,7 @@ ], "serializedName": "boolPart", "type": { - "$id": "734", + "$id": "738", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -9233,7 +9267,7 @@ "isExactName": false }, { - "$id": "735", + "$id": "739", "kind": "property", "name": "int32Part", "apiVersions": [ @@ -9242,7 +9276,7 @@ ], "serializedName": "int32Part", "type": { - "$id": "736", + "$id": "740", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -9269,7 +9303,7 @@ "isExactName": false }, { - "$id": "737", + "$id": "741", "kind": "property", "name": "int64Part", "apiVersions": [ @@ -9278,7 +9312,7 @@ ], "serializedName": "int64Part", "type": { - "$id": "738", + "$id": "742", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -9305,7 +9339,7 @@ "isExactName": false }, { - "$id": "739", + "$id": "743", "kind": "property", "name": "float32Part", "apiVersions": [ @@ -9314,7 +9348,7 @@ ], "serializedName": "float32Part", "type": { - "$id": "740", + "$id": "744", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -9341,7 +9375,7 @@ "isExactName": false }, { - "$id": "741", + "$id": "745", "kind": "property", "name": "float64Part", "apiVersions": [ @@ -9350,7 +9384,7 @@ ], "serializedName": "float64Part", "type": { - "$id": "742", + "$id": "746", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -9377,7 +9411,7 @@ "isExactName": false }, { - "$id": "743", + "$id": "747", "kind": "property", "name": "decimalPart", "apiVersions": [ @@ -9386,7 +9420,7 @@ ], "serializedName": "decimalPart", "type": { - "$id": "744", + "$id": "748", "kind": "decimal128", "name": "decimal128", "crossLanguageDefinitionId": "TypeSpec.decimal128", @@ -9413,7 +9447,7 @@ "isExactName": false }, { - "$id": "745", + "$id": "749", "kind": "property", "name": "int8Part", "apiVersions": [ @@ -9422,7 +9456,7 @@ ], "serializedName": "int8Part", "type": { - "$id": "746", + "$id": "750", "kind": "int8", "name": "int8", "crossLanguageDefinitionId": "TypeSpec.int8", @@ -9449,7 +9483,7 @@ "isExactName": false }, { - "$id": "747", + "$id": "751", "kind": "property", "name": "uint8Part", "apiVersions": [ @@ -9458,7 +9492,7 @@ ], "serializedName": "uint8Part", "type": { - "$id": "748", + "$id": "752", "kind": "uint8", "name": "uint8", "crossLanguageDefinitionId": "TypeSpec.uint8", @@ -9485,7 +9519,7 @@ "isExactName": false }, { - "$id": "749", + "$id": "753", "kind": "property", "name": "dictionaryPart", "apiVersions": [ @@ -9494,7 +9528,7 @@ ], "serializedName": "dictionaryPart", "type": { - "$ref": "683" + "$ref": "687" }, "optional": false, "readOnly": false, @@ -9517,7 +9551,7 @@ "isExactName": false }, { - "$id": "750", + "$id": "754", "kind": "property", "name": "dictionaryModelPart", "apiVersions": [ @@ -9526,17 +9560,17 @@ ], "serializedName": "dictionaryModelPart", "type": { - "$id": "751", + "$id": "755", "kind": "dict", "keyType": { - "$id": "752", + "$id": "756", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "470" + "$ref": "474" }, "decorators": [] }, @@ -9561,7 +9595,7 @@ "isExactName": false }, { - "$id": "753", + "$id": "757", "kind": "property", "name": "listPart", "apiVersions": [ @@ -9570,7 +9604,7 @@ ], "serializedName": "listPart", "type": { - "$ref": "476" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -9593,7 +9627,7 @@ "isExactName": false }, { - "$id": "754", + "$id": "758", "kind": "property", "name": "listModelPart", "apiVersions": [ @@ -9602,7 +9636,7 @@ ], "serializedName": "listModelPart", "type": { - "$ref": "570" + "$ref": "574" }, "optional": false, "readOnly": false, @@ -9625,7 +9659,7 @@ "isExactName": false }, { - "$id": "755", + "$id": "759", "kind": "property", "name": "multipleListPart", "apiVersions": [ @@ -9634,11 +9668,11 @@ ], "serializedName": "multipleListPart", "type": { - "$id": "756", + "$id": "760", "kind": "array", "name": "ArrayHttpPart", "valueType": { - "$id": "757", + "$id": "761", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9668,7 +9702,7 @@ "isExactName": false }, { - "$id": "758", + "$id": "762", "kind": "property", "name": "profileImage", "apiVersions": [ @@ -9677,7 +9711,7 @@ ], "serializedName": "profileImage", "type": { - "$id": "759", + "$id": "763", "kind": "model", "name": "File", "apiVersions": [], @@ -9692,14 +9726,14 @@ "isFileType": true, "properties": [ { - "$id": "760", + "$id": "764", "kind": "property", "name": "contentType", "apiVersions": [], "summary": "The allowed media (MIME) types of the file contents.", "doc": "The allowed media (MIME) types of the file contents.\n\nIn file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies,\nthis value is serialized as a field in the response.\n\nNOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but\nit will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the\n_contents_ of the file, and not necessarily the way the file itself is transmitted or serialized.", "type": { - "$id": "761", + "$id": "765", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9716,14 +9750,14 @@ "isExactName": false }, { - "$id": "762", + "$id": "766", "kind": "property", "name": "filename", "apiVersions": [], "summary": "The name of the file, if any.", "doc": "The name of the file, if any.\n\nIn file bodies, this value comes from the `filename` parameter of the `Content-Disposition` header of the response\nor multipart payload. In JSON bodies, this value is serialized as a field in the response.\n\nNOTE: By default, `filename` cannot be sent in request payloads and can only be sent in responses and multipart\npayloads, as the `Content-Disposition` header is not valid in requests. If you want to send the `filename` in a request,\nyou must extend the `File` model and override the `filename` property with a different location defined by HTTP metadata\ndecorators.", "type": { - "$id": "763", + "$id": "767", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9740,14 +9774,14 @@ "isExactName": false }, { - "$id": "764", + "$id": "768", "kind": "property", "name": "contents", "apiVersions": [], "summary": "The contents of the file.", "doc": "The contents of the file.\n\nIn file bodies, this value comes from the body of the request, response, or multipart payload. In JSON bodies,\nthis value is serialized as a field in the response.", "type": { - "$id": "765", + "$id": "769", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -9777,12 +9811,12 @@ "isFilePart": true, "isMulti": false, "filename": { - "$id": "766", + "$id": "770", "doc": "The name of the file, if any.\n\nIn file bodies, this value comes from the `filename` parameter of the `Content-Disposition` header of the response\nor multipart payload. In JSON bodies, this value is serialized as a field in the response.\n\nNOTE: By default, `filename` cannot be sent in request payloads and can only be sent in responses and multipart\npayloads, as the `Content-Disposition` header is not valid in requests. If you want to send the `filename` in a request,\nyou must extend the `File` model and override the `filename` property with a different location defined by HTTP metadata\ndecorators.", "summary": "The name of the file, if any.", "apiVersions": [], "type": { - "$id": "767", + "$id": "771", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -9813,12 +9847,12 @@ "serializationOptions": {} }, "contentType": { - "$id": "768", + "$id": "772", "doc": "The allowed media (MIME) types of the file contents.\n\nIn file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies,\nthis value is serialized as a field in the response.\n\nNOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but\nit will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the\n_contents_ of the file, and not necessarily the way the file itself is transmitted or serialized.", "summary": "The allowed media (MIME) types of the file contents.", "apiVersions": [], "type": { - "$id": "769", + "$id": "773", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -9859,7 +9893,7 @@ "isExactName": false }, { - "$id": "770", + "$id": "774", "kind": "property", "name": "extensibleEnumPart", "apiVersions": [ @@ -9891,7 +9925,7 @@ "isExactName": false }, { - "$id": "771", + "$id": "775", "kind": "property", "name": "fixedEnumPart", "apiVersions": [ @@ -9923,7 +9957,7 @@ "isExactName": false }, { - "$id": "772", + "$id": "776", "kind": "property", "name": "intExtensibleEnumPart", "apiVersions": [ @@ -9955,7 +9989,7 @@ "isExactName": false }, { - "$id": "773", + "$id": "777", "kind": "property", "name": "intFixedEnumPart", "apiVersions": [ @@ -9989,7 +10023,7 @@ ] }, { - "$id": "774", + "$id": "778", "kind": "model", "name": "File", "apiVersions": [], @@ -10004,18 +10038,18 @@ "isFileType": true, "properties": [ { - "$ref": "760" + "$ref": "764" }, { - "$ref": "762" + "$ref": "766" }, { - "$ref": "764" + "$ref": "768" } ] }, { - "$id": "775", + "$id": "779", "kind": "model", "name": "StreamingItem", "apiVersions": [ @@ -10034,7 +10068,7 @@ "isExactName": false, "properties": [ { - "$id": "776", + "$id": "780", "kind": "property", "name": "message", "apiVersions": [ @@ -10043,7 +10077,7 @@ ], "serializedName": "message", "type": { - "$id": "777", + "$id": "781", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10066,7 +10100,7 @@ ] }, { - "$id": "778", + "$id": "782", "kind": "model", "name": "PreviewDetails", "apiVersions": [ @@ -10085,7 +10119,7 @@ "isExactName": false, "properties": [ { - "$id": "779", + "$id": "783", "kind": "property", "name": "choice", "apiVersions": [ @@ -10119,7 +10153,7 @@ } }, { - "$id": "780", + "$id": "784", "kind": "model", "name": "LifecycleModel", "apiVersions": [ @@ -10138,7 +10172,7 @@ "isExactName": false, "properties": [ { - "$id": "781", + "$id": "785", "kind": "property", "name": "preview", "apiVersions": [ @@ -10147,7 +10181,7 @@ ], "serializedName": "preview", "type": { - "$ref": "778" + "$ref": "782" }, "optional": true, "readOnly": false, @@ -10170,7 +10204,7 @@ } }, { - "$id": "782", + "$id": "786", "kind": "property", "name": "choice", "apiVersions": [ @@ -10198,7 +10232,7 @@ ] }, { - "$id": "783", + "$id": "787", "kind": "model", "name": "PagePreviewDetails", "apiVersions": [ @@ -10217,7 +10251,7 @@ "isExactName": false, "properties": [ { - "$id": "784", + "$id": "788", "kind": "property", "name": "items", "apiVersions": [ @@ -10226,11 +10260,11 @@ ], "serializedName": "items", "type": { - "$id": "785", + "$id": "789", "kind": "array", "name": "ArrayPreviewDetails", "valueType": { - "$ref": "778" + "$ref": "782" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -10252,7 +10286,7 @@ ] }, { - "$id": "786", + "$id": "790", "kind": "model", "name": "Animal", "apiVersions": [ @@ -10271,7 +10305,7 @@ }, "isExactName": false, "discriminatorProperty": { - "$id": "787", + "$id": "791", "kind": "property", "name": "kind", "apiVersions": [ @@ -10281,7 +10315,7 @@ "serializedName": "kind", "doc": "The kind of animal", "type": { - "$id": "788", + "$id": "792", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10303,10 +10337,10 @@ }, "properties": [ { - "$ref": "787" + "$ref": "791" }, { - "$id": "789", + "$id": "793", "kind": "property", "name": "name", "apiVersions": [ @@ -10316,7 +10350,7 @@ "serializedName": "name", "doc": "Name of the animal", "type": { - "$id": "790", + "$id": "794", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10339,7 +10373,7 @@ ], "discriminatedSubtypes": { "pet": { - "$id": "791", + "$id": "795", "kind": "model", "name": "Pet", "apiVersions": [ @@ -10359,7 +10393,7 @@ }, "isExactName": false, "discriminatorProperty": { - "$id": "792", + "$id": "796", "kind": "property", "name": "kind", "apiVersions": [ @@ -10385,14 +10419,14 @@ "isExactName": false }, "baseModel": { - "$ref": "786" + "$ref": "790" }, "properties": [ { - "$ref": "792" + "$ref": "796" }, { - "$id": "793", + "$id": "797", "kind": "property", "name": "trained", "apiVersions": [ @@ -10402,7 +10436,7 @@ "serializedName": "trained", "doc": "Whether the pet is trained", "type": { - "$id": "794", + "$id": "798", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -10425,7 +10459,7 @@ ], "discriminatedSubtypes": { "dog": { - "$id": "795", + "$id": "799", "kind": "model", "name": "Dog", "apiVersions": [ @@ -10445,11 +10479,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "791" + "$ref": "795" }, "properties": [ { - "$id": "796", + "$id": "800", "kind": "property", "name": "kind", "apiVersions": [ @@ -10475,7 +10509,7 @@ "isExactName": false }, { - "$id": "797", + "$id": "801", "kind": "property", "name": "breed", "apiVersions": [ @@ -10485,7 +10519,7 @@ "serializedName": "breed", "doc": "The breed of the dog", "type": { - "$id": "798", + "$id": "802", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10510,18 +10544,18 @@ } }, "dog": { - "$ref": "795" + "$ref": "799" } } }, { - "$ref": "791" + "$ref": "795" }, { - "$ref": "795" + "$ref": "799" }, { - "$id": "799", + "$id": "803", "kind": "model", "name": "Tree", "apiVersions": [ @@ -10546,7 +10580,7 @@ }, "isExactName": false, "baseModel": { - "$id": "800", + "$id": "804", "kind": "model", "name": "Plant", "apiVersions": [ @@ -10570,7 +10604,7 @@ }, "isExactName": false, "discriminatorProperty": { - "$id": "801", + "$id": "805", "kind": "property", "name": "species", "apiVersions": [ @@ -10580,7 +10614,7 @@ "serializedName": "species", "doc": "The species of plant", "type": { - "$id": "802", + "$id": "806", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10607,10 +10641,10 @@ }, "properties": [ { - "$ref": "801" + "$ref": "805" }, { - "$id": "803", + "$id": "807", "kind": "property", "name": "id", "apiVersions": [ @@ -10620,7 +10654,7 @@ "serializedName": "id", "doc": "The unique identifier of the plant", "type": { - "$id": "804", + "$id": "808", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10646,7 +10680,7 @@ "isExactName": false }, { - "$id": "805", + "$id": "809", "kind": "property", "name": "height", "apiVersions": [ @@ -10656,7 +10690,7 @@ "serializedName": "height", "doc": "The height of the plant in centimeters", "type": { - "$id": "806", + "$id": "810", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -10684,13 +10718,13 @@ ], "discriminatedSubtypes": { "tree": { - "$ref": "799" + "$ref": "803" } } }, "properties": [ { - "$id": "807", + "$id": "811", "kind": "property", "name": "species", "apiVersions": [ @@ -10721,7 +10755,7 @@ "isExactName": false }, { - "$id": "808", + "$id": "812", "kind": "property", "name": "age", "apiVersions": [ @@ -10731,7 +10765,7 @@ "serializedName": "age", "doc": "The age of the tree in years", "type": { - "$id": "809", + "$id": "813", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -10757,7 +10791,7 @@ "isExactName": false }, { - "$id": "810", + "$id": "814", "kind": "property", "name": "nullableText", "apiVersions": [ @@ -10766,10 +10800,10 @@ ], "serializedName": "nullableText", "type": { - "$id": "811", + "$id": "815", "kind": "nullable", "type": { - "$id": "812", + "$id": "816", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10797,7 +10831,7 @@ "isExactName": false }, { - "$id": "813", + "$id": "817", "kind": "property", "name": "nullableLabels", "apiVersions": [ @@ -10806,10 +10840,10 @@ ], "serializedName": "nullableLabels", "type": { - "$id": "814", + "$id": "818", "kind": "nullable", "type": { - "$ref": "683" + "$ref": "687" }, "namespace": "SampleTypeSpec" }, @@ -10835,10 +10869,63 @@ ] }, { - "$ref": "800" + "$ref": "804" + }, + { + "$id": "819", + "kind": "model", + "name": "XmlTreeContainer", + "apiVersions": [ + "2024-07-16-preview", + "2024-08-16-preview" + ], + "namespace": "SampleTypeSpec", + "crossLanguageDefinitionId": "SampleTypeSpec.XmlTreeContainer", + "usage": "Output,Xml", + "doc": "XML-only container whose nested tree also supports JSON", + "decorators": [], + "serializationOptions": { + "xml": { + "name": "XmlTreeContainer", + "attribute": false, + "unwrapped": false + } + }, + "isExactName": false, + "properties": [ + { + "$id": "820", + "kind": "property", + "name": "tree", + "apiVersions": [ + "2024-07-16-preview", + "2024-08-16-preview" + ], + "serializedName": "tree", + "doc": "The nested tree", + "type": { + "$ref": "803" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "SampleTypeSpec.XmlTreeContainer.tree", + "serializationOptions": { + "xml": { + "name": "tree", + "attribute": false, + "unwrapped": false + } + }, + "isHttpMetadata": false, + "isExactName": false + } + ] }, { - "$id": "815", + "$id": "821", "kind": "model", "name": "GetWidgetMetricsResponse", "apiVersions": [ @@ -10857,7 +10944,7 @@ "isExactName": false, "properties": [ { - "$id": "816", + "$id": "822", "kind": "property", "name": "numSold", "apiVersions": [ @@ -10866,7 +10953,7 @@ ], "serializedName": "numSold", "type": { - "$id": "817", + "$id": "823", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -10887,7 +10974,7 @@ "isExactName": false }, { - "$id": "818", + "$id": "824", "kind": "property", "name": "averagePrice", "apiVersions": [ @@ -10896,7 +10983,7 @@ ], "serializedName": "averagePrice", "type": { - "$id": "819", + "$id": "825", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -10919,7 +11006,7 @@ ] }, { - "$id": "820", + "$id": "826", "kind": "model", "name": "GetNotebookResponse", "apiVersions": [ @@ -10938,7 +11025,7 @@ "isExactName": false, "properties": [ { - "$id": "821", + "$id": "827", "kind": "property", "name": "name", "apiVersions": [ @@ -10947,7 +11034,7 @@ ], "serializedName": "name", "type": { - "$id": "822", + "$id": "828", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10968,7 +11055,7 @@ "isExactName": false }, { - "$id": "823", + "$id": "829", "kind": "property", "name": "content", "apiVersions": [ @@ -10977,7 +11064,7 @@ ], "serializedName": "content", "type": { - "$id": "824", + "$id": "830", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11000,7 +11087,7 @@ ] }, { - "$id": "825", + "$id": "831", "kind": "model", "name": "UnionCat", "apiVersions": [ @@ -11018,7 +11105,7 @@ }, "isExactName": false, "baseModel": { - "$id": "826", + "$id": "832", "kind": "model", "name": "UnionPet", "apiVersions": [ @@ -11037,7 +11124,7 @@ "isExactName": false, "properties": [ { - "$id": "827", + "$id": "833", "kind": "property", "name": "name", "apiVersions": [ @@ -11046,7 +11133,7 @@ ], "serializedName": "name", "type": { - "$id": "828", + "$id": "834", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11070,7 +11157,7 @@ }, "properties": [ { - "$id": "829", + "$id": "835", "kind": "property", "name": "meow", "apiVersions": [ @@ -11079,7 +11166,7 @@ ], "serializedName": "meow", "type": { - "$id": "830", + "$id": "836", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -11102,10 +11189,10 @@ ] }, { - "$ref": "826" + "$ref": "832" }, { - "$id": "831", + "$id": "837", "kind": "model", "name": "UnionDog", "apiVersions": [ @@ -11123,11 +11210,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "826" + "$ref": "832" }, "properties": [ { - "$id": "832", + "$id": "838", "kind": "property", "name": "bark", "apiVersions": [ @@ -11136,7 +11223,7 @@ ], "serializedName": "bark", "type": { - "$id": "833", + "$id": "839", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -11159,7 +11246,7 @@ ] }, { - "$id": "834", + "$id": "840", "kind": "model", "name": "XmlUnionCat", "apiVersions": [ @@ -11182,7 +11269,7 @@ }, "isExactName": false, "baseModel": { - "$id": "835", + "$id": "841", "kind": "model", "name": "XmlUnionPet", "apiVersions": [ @@ -11206,7 +11293,7 @@ "isExactName": false, "properties": [ { - "$id": "836", + "$id": "842", "kind": "property", "name": "name", "apiVersions": [ @@ -11215,7 +11302,7 @@ ], "serializedName": "name", "type": { - "$id": "837", + "$id": "843", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11244,7 +11331,7 @@ }, "properties": [ { - "$id": "838", + "$id": "844", "kind": "property", "name": "meow", "apiVersions": [ @@ -11253,7 +11340,7 @@ ], "serializedName": "meow", "type": { - "$id": "839", + "$id": "845", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -11281,10 +11368,10 @@ ] }, { - "$ref": "835" + "$ref": "841" }, { - "$id": "840", + "$id": "846", "kind": "model", "name": "UnionPetContainer", "apiVersions": [ @@ -11303,7 +11390,7 @@ "isExactName": false, "properties": [ { - "$id": "841", + "$id": "847", "kind": "property", "name": "pet", "apiVersions": [ @@ -11312,31 +11399,31 @@ ], "serializedName": "pet", "type": { - "$id": "842", + "$id": "848", "kind": "union", "name": "UnionPets", "variantTypes": [ { - "$ref": "825" + "$ref": "831" }, { - "$ref": "831" + "$ref": "837" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "826" + "$ref": "832" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "825" + "$ref": "831" }, "dog": { - "$ref": "831" + "$ref": "837" } } }, @@ -11355,7 +11442,7 @@ "isExactName": false }, { - "$id": "843", + "$id": "849", "kind": "property", "name": "nullablePet", "apiVersions": [ @@ -11364,10 +11451,10 @@ ], "serializedName": "nullablePet", "type": { - "$id": "844", + "$id": "850", "kind": "nullable", "type": { - "$ref": "842" + "$ref": "848" }, "namespace": "SampleTypeSpec" }, @@ -11386,7 +11473,7 @@ "isExactName": false }, { - "$id": "845", + "$id": "851", "kind": "property", "name": "pets", "apiVersions": [ @@ -11395,11 +11482,11 @@ ], "serializedName": "pets", "type": { - "$id": "846", + "$id": "852", "kind": "array", "name": "ArrayUnionPets", "valueType": { - "$ref": "842" + "$ref": "848" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -11419,7 +11506,7 @@ "isExactName": false }, { - "$id": "847", + "$id": "853", "kind": "property", "name": "lookup", "apiVersions": [ @@ -11428,17 +11515,17 @@ ], "serializedName": "lookup", "type": { - "$id": "848", + "$id": "854", "kind": "dict", "keyType": { - "$id": "849", + "$id": "855", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "842" + "$ref": "848" }, "decorators": [] }, @@ -11457,7 +11544,7 @@ "isExactName": false }, { - "$id": "850", + "$id": "856", "kind": "property", "name": "alternatePet", "apiVersions": [ @@ -11466,31 +11553,31 @@ ], "serializedName": "alternatePet", "type": { - "$id": "851", + "$id": "857", "kind": "union", "name": "AlternateUnionPets", "variantTypes": [ { - "$ref": "825" + "$ref": "831" }, { - "$ref": "831" + "$ref": "837" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "826" + "$ref": "832" }, "discriminatorPropertyName": "type", "envelopePropertyName": "data", "discriminatedSubtypes": { "feline": { - "$ref": "825" + "$ref": "831" }, "canine": { - "$ref": "831" + "$ref": "837" } } }, @@ -11511,7 +11598,7 @@ ] }, { - "$id": "852", + "$id": "858", "kind": "model", "name": "RawUnionPetContainer", "apiVersions": [ @@ -11530,7 +11617,7 @@ "isExactName": false, "properties": [ { - "$id": "853", + "$id": "859", "kind": "property", "name": "pet", "apiVersions": [ @@ -11539,7 +11626,7 @@ ], "serializedName": "pet", "type": { - "$ref": "842" + "$ref": "848" }, "optional": false, "readOnly": false, @@ -11556,7 +11643,7 @@ "isExactName": false }, { - "$id": "854", + "$id": "860", "kind": "property", "name": "nullablePet", "apiVersions": [ @@ -11565,10 +11652,10 @@ ], "serializedName": "nullablePet", "type": { - "$id": "855", + "$id": "861", "kind": "nullable", "type": { - "$ref": "842" + "$ref": "848" }, "namespace": "SampleTypeSpec" }, @@ -11587,7 +11674,7 @@ "isExactName": false }, { - "$id": "856", + "$id": "862", "kind": "property", "name": "pets", "apiVersions": [ @@ -11596,7 +11683,7 @@ ], "serializedName": "pets", "type": { - "$ref": "846" + "$ref": "852" }, "optional": true, "readOnly": false, @@ -11613,7 +11700,7 @@ "isExactName": false }, { - "$id": "857", + "$id": "863", "kind": "property", "name": "lookup", "apiVersions": [ @@ -11622,7 +11709,7 @@ ], "serializedName": "lookup", "type": { - "$ref": "848" + "$ref": "854" }, "optional": true, "readOnly": false, @@ -11639,7 +11726,7 @@ "isExactName": false }, { - "$id": "858", + "$id": "864", "kind": "property", "name": "rawPets", "apiVersions": [ @@ -11648,7 +11735,7 @@ ], "serializedName": "rawPets", "type": { - "$ref": "846" + "$ref": "852" }, "optional": true, "readOnly": false, @@ -11665,7 +11752,7 @@ "isExactName": false }, { - "$id": "859", + "$id": "865", "kind": "property", "name": "rawLookup", "apiVersions": [ @@ -11674,7 +11761,7 @@ ], "serializedName": "rawLookup", "type": { - "$ref": "848" + "$ref": "854" }, "optional": true, "readOnly": false, @@ -11693,7 +11780,7 @@ ] }, { - "$id": "860", + "$id": "866", "kind": "model", "name": "NestedMammal", "apiVersions": [ @@ -11711,7 +11798,7 @@ }, "isExactName": false, "baseModel": { - "$id": "861", + "$id": "867", "kind": "model", "name": "CollisionPetsUnion", "apiVersions": [ @@ -11730,7 +11817,7 @@ "isExactName": false, "properties": [ { - "$id": "862", + "$id": "868", "kind": "property", "name": "name", "apiVersions": [ @@ -11739,7 +11826,7 @@ ], "serializedName": "name", "type": { - "$id": "863", + "$id": "869", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11764,10 +11851,10 @@ "properties": [] }, { - "$ref": "861" + "$ref": "867" }, { - "$id": "864", + "$id": "870", "kind": "model", "name": "ExperimentalUnionCat", "apiVersions": [ @@ -11785,11 +11872,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "860" + "$ref": "866" }, "properties": [ { - "$id": "865", + "$id": "871", "kind": "property", "name": "meow", "apiVersions": [ @@ -11798,7 +11885,7 @@ ], "serializedName": "meow", "type": { - "$id": "866", + "$id": "872", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -11825,7 +11912,7 @@ } }, { - "$id": "867", + "$id": "873", "kind": "model", "name": "MappedUnionCat", "apiVersions": [ @@ -11843,7 +11930,7 @@ }, "isExactName": false, "baseModel": { - "$id": "868", + "$id": "874", "kind": "model", "name": "MappedUnionPet", "apiVersions": [ @@ -11864,7 +11951,7 @@ }, "properties": [ { - "$id": "869", + "$id": "875", "kind": "property", "name": "name", "apiVersions": [ @@ -11873,7 +11960,7 @@ ], "serializedName": "name", "type": { - "$id": "870", + "$id": "876", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11896,10 +11983,10 @@ ] }, { - "$ref": "868" + "$ref": "874" }, { - "$id": "871", + "$id": "877", "kind": "model", "name": "ExternalUnionCat", "apiVersions": [ @@ -11917,7 +12004,7 @@ }, "isExactName": false, "baseModel": { - "$id": "872", + "$id": "878", "kind": "model", "name": "ExternalUnionBase", "apiVersions": [ @@ -11941,7 +12028,7 @@ }, "properties": [ { - "$id": "873", + "$id": "879", "kind": "property", "name": "name", "apiVersions": [ @@ -11950,7 +12037,7 @@ ], "serializedName": "name", "type": { - "$id": "874", + "$id": "880", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11973,10 +12060,10 @@ ] }, { - "$ref": "872" + "$ref": "878" }, { - "$id": "875", + "$id": "881", "kind": "model", "name": "ExternalVariantCat", "apiVersions": [ @@ -11997,7 +12084,7 @@ }, "isExactName": false, "baseModel": { - "$id": "876", + "$id": "882", "kind": "model", "name": "ExternalVariantBase", "apiVersions": [ @@ -12018,7 +12105,7 @@ }, "properties": [ { - "$id": "877", + "$id": "883", "kind": "property", "name": "name", "apiVersions": [ @@ -12027,7 +12114,7 @@ ], "serializedName": "name", "type": { - "$id": "878", + "$id": "884", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12050,10 +12137,10 @@ ] }, { - "$ref": "876" + "$ref": "882" }, { - "$id": "879", + "$id": "885", "kind": "model", "name": "DirectUnionPet", "apiVersions": [ @@ -12072,7 +12159,7 @@ "isExactName": false, "properties": [ { - "$id": "880", + "$id": "886", "kind": "property", "name": "name", "apiVersions": [ @@ -12081,7 +12168,7 @@ ], "serializedName": "name", "type": { - "$id": "881", + "$id": "887", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12102,7 +12189,7 @@ "isExactName": false }, { - "$id": "882", + "$id": "888", "kind": "property", "name": "deserializeDirectPetsUnion", "apiVersions": [ @@ -12111,7 +12198,7 @@ ], "serializedName": "deserializeDirectPetsUnion", "type": { - "$id": "883", + "$id": "889", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12132,7 +12219,7 @@ "isExactName": false }, { - "$id": "884", + "$id": "890", "kind": "property", "name": "serializeDirectPetsUnion", "apiVersions": [ @@ -12141,7 +12228,7 @@ ], "serializedName": "serializeDirectPetsUnion", "type": { - "$id": "885", + "$id": "891", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12164,7 +12251,7 @@ ] }, { - "$id": "886", + "$id": "892", "kind": "model", "name": "DirectUnionCat", "apiVersions": [ @@ -12182,11 +12269,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "879" + "$ref": "885" }, "properties": [ { - "$id": "887", + "$id": "893", "kind": "property", "name": "meow", "apiVersions": [ @@ -12195,7 +12282,7 @@ ], "serializedName": "meow", "type": { - "$id": "888", + "$id": "894", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -12218,7 +12305,7 @@ ] }, { - "$id": "889", + "$id": "895", "kind": "model", "name": "DirectUnionPetContainer", "apiVersions": [ @@ -12237,7 +12324,7 @@ "isExactName": false, "properties": [ { - "$id": "890", + "$id": "896", "kind": "property", "name": "pet", "apiVersions": [ @@ -12246,7 +12333,7 @@ ], "serializedName": "pet", "type": { - "$ref": "879" + "$ref": "885" }, "optional": false, "readOnly": false, @@ -12265,7 +12352,7 @@ ] }, { - "$id": "891", + "$id": "897", "kind": "model", "name": "DynamicUnionPetContainer", "apiVersions": [ @@ -12291,7 +12378,7 @@ "isExactName": false, "properties": [ { - "$id": "892", + "$id": "898", "kind": "property", "name": "pets", "apiVersions": [ @@ -12300,14 +12387,14 @@ ], "serializedName": "pets", "type": { - "$id": "893", + "$id": "899", "kind": "array", "name": "Array2", "valueType": { - "$id": "894", + "$id": "900", "kind": "nullable", "type": { - "$ref": "842" + "$ref": "848" }, "namespace": "SampleTypeSpec" }, @@ -12329,7 +12416,7 @@ "isExactName": false }, { - "$id": "895", + "$id": "901", "kind": "property", "name": "lookup", "apiVersions": [ @@ -12338,20 +12425,20 @@ ], "serializedName": "lookup", "type": { - "$id": "896", + "$id": "902", "kind": "dict", "keyType": { - "$id": "897", + "$id": "903", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "898", + "$id": "904", "kind": "nullable", "type": { - "$ref": "842" + "$ref": "848" }, "namespace": "SampleTypeSpec" }, @@ -12372,7 +12459,7 @@ "isExactName": false }, { - "$id": "899", + "$id": "905", "kind": "property", "name": "nested", "apiVersions": [ @@ -12381,18 +12468,18 @@ ], "serializedName": "nested", "type": { - "$id": "900", + "$id": "906", "kind": "array", "name": "ArrayArray2", "valueType": { - "$id": "901", + "$id": "907", "kind": "array", "name": "Array3", "valueType": { - "$id": "902", + "$id": "908", "kind": "nullable", "type": { - "$ref": "842" + "$ref": "848" }, "namespace": "SampleTypeSpec" }, @@ -12417,7 +12504,7 @@ "isExactName": false }, { - "$id": "903", + "$id": "909", "kind": "property", "name": "nestedLookup", "apiVersions": [ @@ -12426,24 +12513,24 @@ ], "serializedName": "nestedLookup", "type": { - "$id": "904", + "$id": "910", "kind": "array", "name": "ArrayRecord2", "valueType": { - "$id": "905", + "$id": "911", "kind": "dict", "keyType": { - "$id": "906", + "$id": "912", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "907", + "$id": "913", "kind": "nullable", "type": { - "$ref": "842" + "$ref": "848" }, "namespace": "SampleTypeSpec" }, @@ -12469,7 +12556,7 @@ ] }, { - "$id": "908", + "$id": "914", "kind": "model", "name": "DescendantUnionCat", "apiVersions": [ @@ -12487,7 +12574,7 @@ }, "isExactName": false, "baseModel": { - "$id": "909", + "$id": "915", "kind": "model", "name": "DescendantUnionPet", "apiVersions": [ @@ -12506,7 +12593,7 @@ "isExactName": false, "properties": [ { - "$id": "910", + "$id": "916", "kind": "property", "name": "name", "apiVersions": [ @@ -12515,7 +12602,7 @@ ], "serializedName": "name", "type": { - "$id": "911", + "$id": "917", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12539,7 +12626,7 @@ }, "properties": [ { - "$id": "912", + "$id": "918", "kind": "property", "name": "deserializeDescendantPetsUnion", "apiVersions": [ @@ -12548,7 +12635,7 @@ ], "serializedName": "deserializeDescendantPetsUnion", "type": { - "$id": "913", + "$id": "919", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12569,7 +12656,7 @@ "isExactName": false }, { - "$id": "914", + "$id": "920", "kind": "property", "name": "serializeDescendantPetsUnion", "apiVersions": [ @@ -12578,7 +12665,7 @@ ], "serializedName": "serializeDescendantPetsUnion", "type": { - "$id": "915", + "$id": "921", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12601,10 +12688,10 @@ ] }, { - "$ref": "909" + "$ref": "915" }, { - "$id": "916", + "$id": "922", "kind": "model", "name": "IntermediateUnionCat", "apiVersions": [ @@ -12622,7 +12709,7 @@ }, "isExactName": false, "baseModel": { - "$id": "917", + "$id": "923", "kind": "model", "name": "IntermediateUnionMammal", "apiVersions": [ @@ -12643,7 +12730,7 @@ }, "isExactName": false, "baseModel": { - "$id": "918", + "$id": "924", "kind": "model", "name": "IntermediateUnionPet", "apiVersions": [ @@ -12666,7 +12753,7 @@ }, "properties": [ { - "$id": "919", + "$id": "925", "kind": "property", "name": "name", "apiVersions": [ @@ -12675,7 +12762,7 @@ ], "serializedName": "name", "type": { - "$id": "920", + "$id": "926", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12698,13 +12785,13 @@ ] }, { - "$ref": "917" + "$ref": "923" }, { - "$ref": "918" + "$ref": "924" }, { - "$id": "921", + "$id": "927", "kind": "model", "name": "SerializeNamedCat", "apiVersions": [ @@ -12722,7 +12809,7 @@ }, "isExactName": false, "baseModel": { - "$id": "922", + "$id": "928", "kind": "model", "name": "SerializePetsUnion", "apiVersions": [ @@ -12741,7 +12828,7 @@ "isExactName": false, "properties": [ { - "$id": "923", + "$id": "929", "kind": "property", "name": "name", "apiVersions": [ @@ -12750,7 +12837,7 @@ ], "serializedName": "name", "type": { - "$id": "924", + "$id": "930", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12775,10 +12862,10 @@ "properties": [] }, { - "$ref": "922" + "$ref": "928" }, { - "$id": "925", + "$id": "931", "kind": "model", "name": "DeserializeNamedCat", "apiVersions": [ @@ -12796,7 +12883,7 @@ }, "isExactName": false, "baseModel": { - "$id": "926", + "$id": "932", "kind": "model", "name": "DeserializePetsUnion", "apiVersions": [ @@ -12815,7 +12902,7 @@ "isExactName": false, "properties": [ { - "$id": "927", + "$id": "933", "kind": "property", "name": "name", "apiVersions": [ @@ -12824,7 +12911,7 @@ ], "serializedName": "name", "type": { - "$id": "928", + "$id": "934", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12849,10 +12936,10 @@ "properties": [] }, { - "$ref": "926" + "$ref": "932" }, { - "$id": "929", + "$id": "935", "kind": "model", "name": "CustomUnionCat", "apiVersions": [ @@ -12870,7 +12957,7 @@ }, "isExactName": false, "baseModel": { - "$id": "930", + "$id": "936", "kind": "model", "name": "CustomUnionPet", "apiVersions": [ @@ -12889,7 +12976,7 @@ "isExactName": false, "properties": [ { - "$id": "931", + "$id": "937", "kind": "property", "name": "name", "apiVersions": [ @@ -12898,7 +12985,7 @@ ], "serializedName": "name", "type": { - "$id": "932", + "$id": "938", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12919,7 +13006,7 @@ "isExactName": false }, { - "$id": "933", + "$id": "939", "kind": "property", "name": "children", "apiVersions": [ @@ -12928,29 +13015,29 @@ ], "serializedName": "children", "type": { - "$id": "934", + "$id": "940", "kind": "array", "name": "ArrayCustomUnionPets", "valueType": { - "$id": "935", + "$id": "941", "kind": "union", "name": "CustomUnionPets", "variantTypes": [ { - "$ref": "929" + "$ref": "935" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "930" + "$ref": "936" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "929" + "$ref": "935" } } }, @@ -12975,7 +13062,7 @@ }, "properties": [ { - "$id": "936", + "$id": "942", "kind": "property", "name": "meow", "apiVersions": [ @@ -12984,7 +13071,7 @@ ], "serializedName": "meow", "type": { - "$id": "937", + "$id": "943", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -13007,10 +13094,10 @@ ] }, { - "$ref": "930" + "$ref": "936" }, { - "$id": "938", + "$id": "944", "kind": "model", "name": "CustomIntermediateCat", "apiVersions": [ @@ -13028,7 +13115,7 @@ }, "isExactName": false, "baseModel": { - "$id": "939", + "$id": "945", "kind": "model", "name": "CustomIntermediateMammal", "apiVersions": [ @@ -13046,7 +13133,7 @@ }, "isExactName": false, "baseModel": { - "$id": "940", + "$id": "946", "kind": "model", "name": "CustomIntermediatePet", "apiVersions": [ @@ -13069,7 +13156,7 @@ }, "properties": [ { - "$id": "941", + "$id": "947", "kind": "property", "name": "meow", "apiVersions": [ @@ -13078,7 +13165,7 @@ ], "serializedName": "meow", "type": { - "$id": "942", + "$id": "948", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -13101,13 +13188,13 @@ ] }, { - "$ref": "939" + "$ref": "945" }, { - "$ref": "940" + "$ref": "946" }, { - "$id": "943", + "$id": "949", "kind": "model", "name": "RebasedUnionA", "apiVersions": [ @@ -13125,7 +13212,7 @@ }, "isExactName": false, "baseModel": { - "$id": "944", + "$id": "950", "kind": "model", "name": "RebasedUnionPet", "apiVersions": [ @@ -13144,7 +13231,7 @@ "isExactName": false, "properties": [ { - "$id": "945", + "$id": "951", "kind": "property", "name": "name", "apiVersions": [ @@ -13153,7 +13240,7 @@ ], "serializedName": "name", "type": { - "$id": "946", + "$id": "952", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13178,10 +13265,10 @@ "properties": [] }, { - "$ref": "944" + "$ref": "950" }, { - "$id": "947", + "$id": "953", "kind": "model", "name": "RebasedUnionB", "apiVersions": [ @@ -13199,12 +13286,12 @@ }, "isExactName": false, "baseModel": { - "$ref": "944" + "$ref": "950" }, "properties": [] }, { - "$id": "948", + "$id": "954", "kind": "model", "name": "RebasedUnionALeaf", "apiVersions": [ @@ -13222,12 +13309,12 @@ }, "isExactName": false, "baseModel": { - "$ref": "943" + "$ref": "949" }, "properties": [] }, { - "$id": "949", + "$id": "955", "kind": "model", "name": "RebasedUnionBLeaf", "apiVersions": [ @@ -13245,12 +13332,12 @@ }, "isExactName": false, "baseModel": { - "$ref": "947" + "$ref": "953" }, "properties": [] }, { - "$id": "950", + "$id": "956", "kind": "model", "name": "PetsUnion", "apiVersions": [ @@ -13268,7 +13355,7 @@ }, "isExactName": false, "baseModel": { - "$id": "951", + "$id": "957", "kind": "model", "name": "DeserializerPet", "apiVersions": [ @@ -13287,7 +13374,7 @@ "isExactName": false, "properties": [ { - "$id": "952", + "$id": "958", "kind": "property", "name": "name", "apiVersions": [ @@ -13296,7 +13383,7 @@ ], "serializedName": "name", "type": { - "$id": "953", + "$id": "959", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13321,10 +13408,10 @@ "properties": [] }, { - "$ref": "951" + "$ref": "957" }, { - "$id": "954", + "$id": "960", "kind": "model", "name": "ConstructorOverride", "apiVersions": [ @@ -13342,7 +13429,7 @@ }, "isExactName": false, "baseModel": { - "$id": "955", + "$id": "961", "kind": "model", "name": "ConstructorBase", "apiVersions": [ @@ -13361,7 +13448,7 @@ "isExactName": false, "properties": [ { - "$id": "956", + "$id": "962", "kind": "property", "name": "value", "apiVersions": [ @@ -13370,7 +13457,7 @@ ], "serializedName": "value", "type": { - "$id": "957", + "$id": "963", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13391,7 +13478,7 @@ "isExactName": false }, { - "$id": "958", + "$id": "964", "kind": "property", "name": "mode", "apiVersions": [ @@ -13417,7 +13504,7 @@ "isExactName": false }, { - "$id": "959", + "$id": "965", "kind": "property", "name": "items", "apiVersions": [ @@ -13426,7 +13513,7 @@ ], "serializedName": "items", "type": { - "$ref": "476" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -13446,7 +13533,7 @@ }, "properties": [ { - "$id": "960", + "$id": "966", "kind": "property", "name": "value", "apiVersions": [ @@ -13455,7 +13542,7 @@ ], "serializedName": "value", "type": { - "$id": "961", + "$id": "967", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13479,10 +13566,10 @@ ] }, { - "$ref": "955" + "$ref": "961" }, { - "$id": "962", + "$id": "968", "kind": "model", "name": "ConstructorReadOnlyOverride", "apiVersions": [ @@ -13500,7 +13587,7 @@ }, "isExactName": false, "baseModel": { - "$id": "963", + "$id": "969", "kind": "model", "name": "ConstructorReadOnlyBase", "apiVersions": [ @@ -13519,7 +13606,7 @@ "isExactName": false, "properties": [ { - "$id": "964", + "$id": "970", "kind": "property", "name": "value", "apiVersions": [ @@ -13528,7 +13615,7 @@ ], "serializedName": "value", "type": { - "$id": "965", + "$id": "971", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13552,7 +13639,7 @@ }, "properties": [ { - "$id": "966", + "$id": "972", "kind": "property", "name": "value", "apiVersions": [ @@ -13561,7 +13648,7 @@ ], "serializedName": "value", "type": { - "$id": "967", + "$id": "973", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13585,10 +13672,10 @@ ] }, { - "$ref": "963" + "$ref": "969" }, { - "$id": "968", + "$id": "974", "kind": "model", "name": "ConstructorReadOnlyLeaf", "apiVersions": [ @@ -13606,11 +13693,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "962" + "$ref": "968" }, "properties": [ { - "$id": "969", + "$id": "975", "kind": "property", "name": "value", "apiVersions": [ @@ -13619,7 +13706,7 @@ ], "serializedName": "value", "type": { - "$id": "970", + "$id": "976", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13643,7 +13730,7 @@ ] }, { - "$id": "971", + "$id": "977", "kind": "model", "name": "XmlConstructorOverride", "apiVersions": [ @@ -13663,7 +13750,7 @@ }, "isExactName": false, "baseModel": { - "$id": "972", + "$id": "978", "kind": "model", "name": "XmlConstructorMiddle", "apiVersions": [ @@ -13683,7 +13770,7 @@ }, "isExactName": false, "baseModel": { - "$id": "973", + "$id": "979", "kind": "model", "name": "XmlConstructorBase", "apiVersions": [ @@ -13704,7 +13791,7 @@ "isExactName": false, "properties": [ { - "$id": "974", + "$id": "980", "kind": "property", "name": "value", "apiVersions": [ @@ -13713,7 +13800,7 @@ ], "serializedName": "value", "type": { - "$id": "975", + "$id": "981", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13736,7 +13823,7 @@ "isExactName": false }, { - "$id": "976", + "$id": "982", "kind": "property", "name": "title", "apiVersions": [ @@ -13745,7 +13832,7 @@ ], "serializedName": "title", "type": { - "$id": "977", + "$id": "983", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13771,7 +13858,7 @@ }, "properties": [ { - "$id": "978", + "$id": "984", "kind": "property", "name": "note", "apiVersions": [ @@ -13780,7 +13867,7 @@ ], "serializedName": "note", "type": { - "$id": "979", + "$id": "985", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13806,7 +13893,7 @@ }, "properties": [ { - "$id": "980", + "$id": "986", "kind": "property", "name": "value", "apiVersions": [ @@ -13815,7 +13902,7 @@ ], "serializedName": "value", "type": { - "$id": "981", + "$id": "987", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13841,13 +13928,13 @@ ] }, { - "$ref": "972" + "$ref": "978" }, { - "$ref": "973" + "$ref": "979" }, { - "$id": "982", + "$id": "988", "kind": "model", "name": "ConstructorInheritedLeaf", "apiVersions": [ @@ -13865,12 +13952,12 @@ }, "isExactName": false, "baseModel": { - "$ref": "954" + "$ref": "960" }, "properties": [] }, { - "$id": "983", + "$id": "989", "kind": "model", "name": "RenamedConstructorOverride", "apiVersions": [ @@ -13888,7 +13975,7 @@ }, "isExactName": false, "baseModel": { - "$id": "984", + "$id": "990", "kind": "model", "name": "RenamedConstructorBase", "apiVersions": [ @@ -13907,7 +13994,7 @@ "isExactName": false, "properties": [ { - "$id": "985", + "$id": "991", "kind": "property", "name": "value", "apiVersions": [ @@ -13916,7 +14003,7 @@ ], "serializedName": "value", "type": { - "$id": "986", + "$id": "992", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13937,7 +14024,7 @@ "isExactName": false }, { - "$id": "987", + "$id": "993", "kind": "property", "name": "title", "apiVersions": [ @@ -13946,7 +14033,7 @@ ], "serializedName": "title", "type": { - "$id": "988", + "$id": "994", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13970,7 +14057,7 @@ }, "properties": [ { - "$id": "989", + "$id": "995", "kind": "property", "name": "renamedValue", "originalName": "value", @@ -13980,7 +14067,7 @@ ], "serializedName": "value", "type": { - "$id": "990", + "$id": "996", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14004,10 +14091,10 @@ ] }, { - "$ref": "984" + "$ref": "990" }, { - "$id": "991", + "$id": "997", "kind": "model", "name": "RenamedConstructorLeaf", "apiVersions": [ @@ -14025,12 +14112,12 @@ }, "isExactName": false, "baseModel": { - "$ref": "983" + "$ref": "989" }, "properties": [] }, { - "$id": "992", + "$id": "998", "kind": "model", "name": "ConstructorWritableLeaf", "apiVersions": [ @@ -14048,7 +14135,7 @@ }, "isExactName": false, "baseModel": { - "$id": "993", + "$id": "999", "kind": "model", "name": "ConstructorReadOnlyMiddle", "apiVersions": [ @@ -14066,7 +14153,7 @@ }, "isExactName": false, "baseModel": { - "$id": "994", + "$id": "1000", "kind": "model", "name": "ConstructorWritableBase", "apiVersions": [ @@ -14085,7 +14172,7 @@ "isExactName": false, "properties": [ { - "$id": "995", + "$id": "1001", "kind": "property", "name": "value", "apiVersions": [ @@ -14094,7 +14181,7 @@ ], "serializedName": "value", "type": { - "$id": "996", + "$id": "1002", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14118,7 +14205,7 @@ }, "properties": [ { - "$id": "997", + "$id": "1003", "kind": "property", "name": "value", "apiVersions": [ @@ -14127,7 +14214,7 @@ ], "serializedName": "value", "type": { - "$id": "998", + "$id": "1004", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14151,7 +14238,7 @@ }, "properties": [ { - "$id": "999", + "$id": "1005", "kind": "property", "name": "value", "apiVersions": [ @@ -14160,7 +14247,7 @@ ], "serializedName": "value", "type": { - "$id": "1000", + "$id": "1006", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14184,13 +14271,13 @@ ] }, { - "$ref": "993" + "$ref": "999" }, { - "$ref": "994" + "$ref": "1000" }, { - "$id": "1001", + "$id": "1007", "kind": "model", "name": "RenamedConstructorReturnedName", "apiVersions": [ @@ -14208,11 +14295,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "983" + "$ref": "989" }, "properties": [ { - "$id": "1002", + "$id": "1008", "kind": "property", "name": "value", "apiVersions": [ @@ -14221,7 +14308,7 @@ ], "serializedName": "value", "type": { - "$id": "1003", + "$id": "1009", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14245,7 +14332,7 @@ ] }, { - "$id": "1004", + "$id": "1010", "kind": "model", "name": "RequiredRenamedConstructorOverride", "apiVersions": [ @@ -14263,11 +14350,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "983" + "$ref": "989" }, "properties": [ { - "$id": "1005", + "$id": "1011", "kind": "property", "name": "requiredValue", "originalName": "value", @@ -14277,7 +14364,7 @@ ], "serializedName": "value", "type": { - "$id": "1006", + "$id": "1012", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14300,7 +14387,7 @@ ] }, { - "$id": "1007", + "$id": "1013", "kind": "model", "name": "ConstructorReadOnlyCollectionOverride", "apiVersions": [ @@ -14318,7 +14405,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1008", + "$id": "1014", "kind": "model", "name": "ConstructorReadOnlyCollectionBase", "apiVersions": [ @@ -14337,7 +14424,7 @@ "isExactName": false, "properties": [ { - "$id": "1009", + "$id": "1015", "kind": "property", "name": "items", "apiVersions": [ @@ -14346,7 +14433,7 @@ ], "serializedName": "items", "type": { - "$ref": "476" + "$ref": "480" }, "optional": false, "readOnly": true, @@ -14363,7 +14450,7 @@ "isExactName": false }, { - "$id": "1010", + "$id": "1016", "kind": "property", "name": "values", "apiVersions": [ @@ -14372,7 +14459,7 @@ ], "serializedName": "values", "type": { - "$ref": "683" + "$ref": "687" }, "optional": false, "readOnly": true, @@ -14392,7 +14479,7 @@ }, "properties": [ { - "$id": "1011", + "$id": "1017", "kind": "property", "name": "renamedItems", "originalName": "items", @@ -14402,7 +14489,7 @@ ], "serializedName": "items", "type": { - "$ref": "476" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -14420,7 +14507,7 @@ "requiredInConstructor": false }, { - "$id": "1012", + "$id": "1018", "kind": "property", "name": "renamedValues", "originalName": "values", @@ -14430,7 +14517,7 @@ ], "serializedName": "values", "type": { - "$ref": "683" + "$ref": "687" }, "optional": false, "readOnly": false, @@ -14450,10 +14537,10 @@ ] }, { - "$ref": "1008" + "$ref": "1014" }, { - "$id": "1013", + "$id": "1019", "kind": "model", "name": "ConstructorRequiredCollectionOverride", "apiVersions": [ @@ -14471,11 +14558,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "1007" + "$ref": "1013" }, "properties": [ { - "$id": "1014", + "$id": "1020", "kind": "property", "name": "requiredItems", "originalName": "items", @@ -14485,7 +14572,7 @@ ], "serializedName": "items", "type": { - "$ref": "476" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -14502,7 +14589,7 @@ "isExactName": false }, { - "$id": "1015", + "$id": "1021", "kind": "property", "name": "requiredValues", "originalName": "values", @@ -14512,7 +14599,7 @@ ], "serializedName": "values", "type": { - "$ref": "683" + "$ref": "687" }, "optional": false, "readOnly": false, @@ -14531,7 +14618,7 @@ ] }, { - "$id": "1016", + "$id": "1022", "kind": "model", "name": "RenamedLiteralConstructorOverride", "apiVersions": [ @@ -14549,7 +14636,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1017", + "$id": "1023", "kind": "model", "name": "LiteralConstructorBase", "apiVersions": [ @@ -14568,7 +14655,7 @@ "isExactName": false, "properties": [ { - "$id": "1018", + "$id": "1024", "kind": "property", "name": "value", "apiVersions": [ @@ -14577,7 +14664,7 @@ ], "serializedName": "value", "type": { - "$id": "1019", + "$id": "1025", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14601,7 +14688,7 @@ }, "properties": [ { - "$id": "1020", + "$id": "1026", "kind": "property", "name": "renamedValue", "originalName": "value", @@ -14630,10 +14717,10 @@ ] }, { - "$ref": "1017" + "$ref": "1023" }, { - "$id": "1021", + "$id": "1027", "kind": "model", "name": "ConstructorClientNameCollisionLeaf", "apiVersions": [ @@ -14651,7 +14738,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1022", + "$id": "1028", "kind": "model", "name": "ConstructorClientNameCollision", "apiVersions": [ @@ -14669,7 +14756,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1023", + "$id": "1029", "kind": "model", "name": "ConstructorClientNameCollisionBase", "apiVersions": [ @@ -14688,7 +14775,7 @@ "isExactName": false, "properties": [ { - "$id": "1024", + "$id": "1030", "kind": "property", "name": "value", "originalName": "original", @@ -14698,7 +14785,7 @@ ], "serializedName": "original", "type": { - "$id": "1025", + "$id": "1031", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14722,7 +14809,7 @@ }, "properties": [ { - "$id": "1026", + "$id": "1032", "kind": "property", "name": "value", "originalName": "other", @@ -14732,7 +14819,7 @@ ], "serializedName": "other", "type": { - "$id": "1027", + "$id": "1033", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14757,13 +14844,13 @@ "properties": [] }, { - "$ref": "1022" + "$ref": "1028" }, { - "$ref": "1023" + "$ref": "1029" }, { - "$id": "1028", + "$id": "1034", "kind": "model", "name": "NullableDynamicModel", "apiVersions": [ @@ -14790,7 +14877,7 @@ "isExactName": false, "properties": [ { - "$id": "1029", + "$id": "1035", "kind": "property", "name": "modelValue", "apiVersions": [ @@ -14799,10 +14886,10 @@ ], "serializedName": "modelValue", "type": { - "$id": "1030", + "$id": "1036", "kind": "nullable", "type": { - "$ref": "616" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -14821,7 +14908,7 @@ "isExactName": false }, { - "$id": "1031", + "$id": "1037", "kind": "property", "name": "children", "apiVersions": [ @@ -14830,17 +14917,17 @@ ], "serializedName": "children", "type": { - "$id": "1032", + "$id": "1038", "kind": "nullable", "type": { - "$id": "1033", + "$id": "1039", "kind": "array", "name": "Array4", "valueType": { - "$id": "1034", + "$id": "1040", "kind": "nullable", "type": { - "$ref": "616" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -14864,7 +14951,7 @@ "isExactName": false }, { - "$id": "1035", + "$id": "1041", "kind": "property", "name": "childDictionary", "apiVersions": [ @@ -14873,23 +14960,23 @@ ], "serializedName": "childDictionary", "type": { - "$id": "1036", + "$id": "1042", "kind": "nullable", "type": { - "$id": "1037", + "$id": "1043", "kind": "dict", "keyType": { - "$id": "1038", + "$id": "1044", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1039", + "$id": "1045", "kind": "nullable", "type": { - "$ref": "616" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -14912,7 +14999,7 @@ "isExactName": false }, { - "$id": "1040", + "$id": "1046", "kind": "property", "name": "nestedChildren", "apiVersions": [ @@ -14921,24 +15008,24 @@ ], "serializedName": "nestedChildren", "type": { - "$id": "1041", + "$id": "1047", "kind": "nullable", "type": { - "$id": "1042", + "$id": "1048", "kind": "array", "name": "Array5", "valueType": { - "$id": "1043", + "$id": "1049", "kind": "nullable", "type": { - "$id": "1044", + "$id": "1050", "kind": "array", "name": "Array6", "valueType": { - "$id": "1045", + "$id": "1051", "kind": "nullable", "type": { - "$ref": "616" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -14967,7 +15054,7 @@ "isExactName": false }, { - "$id": "1046", + "$id": "1052", "kind": "property", "name": "nestedChildDictionary", "apiVersions": [ @@ -14976,36 +15063,36 @@ ], "serializedName": "nestedChildDictionary", "type": { - "$id": "1047", + "$id": "1053", "kind": "nullable", "type": { - "$id": "1048", + "$id": "1054", "kind": "dict", "keyType": { - "$id": "1049", + "$id": "1055", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1050", + "$id": "1056", "kind": "nullable", "type": { - "$id": "1051", + "$id": "1057", "kind": "dict", "keyType": { - "$id": "1052", + "$id": "1058", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1053", + "$id": "1059", "kind": "nullable", "type": { - "$ref": "616" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -15032,7 +15119,7 @@ "isExactName": false }, { - "$id": "1054", + "$id": "1060", "kind": "property", "name": "dictionaryChildren", "apiVersions": [ @@ -15041,30 +15128,30 @@ ], "serializedName": "dictionaryChildren", "type": { - "$id": "1055", + "$id": "1061", "kind": "nullable", "type": { - "$id": "1056", + "$id": "1062", "kind": "dict", "keyType": { - "$id": "1057", + "$id": "1063", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1058", + "$id": "1064", "kind": "nullable", "type": { - "$id": "1059", + "$id": "1065", "kind": "array", "name": "Array7", "valueType": { - "$id": "1060", + "$id": "1066", "kind": "nullable", "type": { - "$ref": "616" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -15092,7 +15179,7 @@ "isExactName": false }, { - "$id": "1061", + "$id": "1067", "kind": "property", "name": "listOfDictionaries", "apiVersions": [ @@ -15101,30 +15188,30 @@ ], "serializedName": "listOfDictionaries", "type": { - "$id": "1062", + "$id": "1068", "kind": "nullable", "type": { - "$id": "1063", + "$id": "1069", "kind": "array", "name": "Array8", "valueType": { - "$id": "1064", + "$id": "1070", "kind": "nullable", "type": { - "$id": "1065", + "$id": "1071", "kind": "dict", "keyType": { - "$id": "1066", + "$id": "1072", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1067", + "$id": "1073", "kind": "nullable", "type": { - "$ref": "616" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -15154,7 +15241,7 @@ ] }, { - "$id": "1068", + "$id": "1074", "kind": "model", "name": "OptionalNullableDynamicProperties", "apiVersions": [ @@ -15180,7 +15267,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1069", + "$id": "1075", "kind": "model", "name": "OptionalNullableBase", "apiVersions": [ @@ -15200,7 +15287,7 @@ "isExactName": false, "properties": [ { - "$id": "1070", + "$id": "1076", "kind": "property", "name": "inheritedNullable", "apiVersions": [ @@ -15209,10 +15296,10 @@ ], "serializedName": "inheritedNullable", "type": { - "$id": "1071", + "$id": "1077", "kind": "nullable", "type": { - "$id": "1072", + "$id": "1078", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15239,10 +15326,10 @@ "properties": [] }, { - "$ref": "1069" + "$ref": "1075" }, { - "$id": "1073", + "$id": "1079", "kind": "model", "name": "OptionalNullableChild", "apiVersions": [ @@ -15262,7 +15349,7 @@ "isExactName": false, "properties": [ { - "$id": "1074", + "$id": "1080", "kind": "property", "name": "value", "apiVersions": [ @@ -15271,7 +15358,7 @@ ], "serializedName": "value", "type": { - "$id": "1075", + "$id": "1081", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15294,7 +15381,7 @@ ] }, { - "$id": "1076", + "$id": "1082", "kind": "model", "name": "OptionalNullableProperties", "apiVersions": [ @@ -15313,11 +15400,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "1069" + "$ref": "1075" }, "properties": [ { - "$id": "1077", + "$id": "1083", "kind": "property", "name": "nullableModel", "apiVersions": [ @@ -15326,10 +15413,10 @@ ], "serializedName": "nullableModel", "type": { - "$id": "1078", + "$id": "1084", "kind": "nullable", "type": { - "$ref": "1073" + "$ref": "1079" }, "namespace": "SampleTypeSpec" }, @@ -15348,7 +15435,7 @@ "isExactName": false }, { - "$id": "1079", + "$id": "1085", "kind": "property", "name": "nullableString", "apiVersions": [ @@ -15357,10 +15444,10 @@ ], "serializedName": "nullableString", "type": { - "$id": "1080", + "$id": "1086", "kind": "nullable", "type": { - "$id": "1081", + "$id": "1087", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15383,7 +15470,7 @@ "isExactName": false }, { - "$id": "1082", + "$id": "1088", "kind": "property", "name": "nullableInt", "apiVersions": [ @@ -15392,10 +15479,10 @@ ], "serializedName": "nullableInt", "type": { - "$id": "1083", + "$id": "1089", "kind": "nullable", "type": { - "$id": "1084", + "$id": "1090", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -15418,7 +15505,7 @@ "isExactName": false }, { - "$id": "1085", + "$id": "1091", "kind": "property", "name": "nullableBoolean", "apiVersions": [ @@ -15427,10 +15514,10 @@ ], "serializedName": "nullableBoolean", "type": { - "$id": "1086", + "$id": "1092", "kind": "nullable", "type": { - "$id": "1087", + "$id": "1093", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -15453,7 +15540,7 @@ "isExactName": false }, { - "$id": "1088", + "$id": "1094", "kind": "property", "name": "nullableEnum", "apiVersions": [ @@ -15462,7 +15549,7 @@ ], "serializedName": "nullableEnum", "type": { - "$id": "1089", + "$id": "1095", "kind": "nullable", "type": { "$ref": "17" @@ -15484,7 +15571,7 @@ "isExactName": false }, { - "$id": "1090", + "$id": "1096", "kind": "property", "name": "nullableDateTime", "apiVersions": [ @@ -15493,15 +15580,15 @@ ], "serializedName": "nullableDateTime", "type": { - "$id": "1091", + "$id": "1097", "kind": "nullable", "type": { - "$id": "1092", + "$id": "1098", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "1093", + "$id": "1099", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15527,7 +15614,7 @@ "isExactName": false }, { - "$id": "1094", + "$id": "1100", "kind": "property", "name": "nullableBytes", "apiVersions": [ @@ -15536,10 +15623,10 @@ ], "serializedName": "nullableBytes", "type": { - "$id": "1095", + "$id": "1101", "kind": "nullable", "type": { - "$id": "1096", + "$id": "1102", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -15563,7 +15650,7 @@ "isExactName": false }, { - "$id": "1097", + "$id": "1103", "kind": "property", "name": "nullableList", "apiVersions": [ @@ -15572,17 +15659,17 @@ ], "serializedName": "nullableList", "type": { - "$id": "1098", + "$id": "1104", "kind": "nullable", "type": { - "$id": "1099", + "$id": "1105", "kind": "array", "name": "Array9", "valueType": { - "$id": "1100", + "$id": "1106", "kind": "nullable", "type": { - "$id": "1101", + "$id": "1107", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15610,7 +15697,7 @@ "isExactName": false }, { - "$id": "1102", + "$id": "1108", "kind": "property", "name": "nullableDictionary", "apiVersions": [ @@ -15619,23 +15706,23 @@ ], "serializedName": "nullableDictionary", "type": { - "$id": "1103", + "$id": "1109", "kind": "nullable", "type": { - "$id": "1104", + "$id": "1110", "kind": "dict", "keyType": { - "$id": "1105", + "$id": "1111", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1106", + "$id": "1112", "kind": "nullable", "type": { - "$id": "1107", + "$id": "1113", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -15662,7 +15749,7 @@ "isExactName": false }, { - "$id": "1108", + "$id": "1114", "kind": "property", "name": "readOnlyNullable", "apiVersions": [ @@ -15671,10 +15758,10 @@ ], "serializedName": "readOnlyNullable", "type": { - "$id": "1109", + "$id": "1115", "kind": "nullable", "type": { - "$id": "1110", + "$id": "1116", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15697,7 +15784,7 @@ "isExactName": false }, { - "$id": "1111", + "$id": "1117", "kind": "property", "name": "requiredNullable", "apiVersions": [ @@ -15706,10 +15793,10 @@ ], "serializedName": "requiredNullable", "type": { - "$id": "1112", + "$id": "1118", "kind": "nullable", "type": { - "$id": "1113", + "$id": "1119", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15732,7 +15819,7 @@ "isExactName": false }, { - "$id": "1114", + "$id": "1120", "kind": "property", "name": "optionalNonNullable", "apiVersions": [ @@ -15741,7 +15828,7 @@ ], "serializedName": "optionalNonNullable", "type": { - "$id": "1115", + "$id": "1121", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15762,7 +15849,7 @@ "isExactName": false }, { - "$id": "1116", + "$id": "1122", "kind": "property", "name": "optionalNonNullableInt", "apiVersions": [ @@ -15771,7 +15858,7 @@ ], "serializedName": "optionalNonNullableInt", "type": { - "$id": "1117", + "$id": "1123", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -15794,7 +15881,7 @@ ] }, { - "$id": "1118", + "$id": "1124", "kind": "model", "name": "OptionalNullableContainer", "apiVersions": [ @@ -15814,7 +15901,7 @@ "isExactName": false, "properties": [ { - "$id": "1119", + "$id": "1125", "kind": "property", "name": "child", "apiVersions": [ @@ -15823,7 +15910,7 @@ ], "serializedName": "child", "type": { - "$ref": "1076" + "$ref": "1082" }, "optional": false, "readOnly": false, @@ -15842,7 +15929,7 @@ ] }, { - "$id": "1120", + "$id": "1126", "kind": "model", "name": "OptionalNullableFieldNames", "apiVersions": [ @@ -15861,10 +15948,10 @@ }, "isExactName": false, "additionalProperties": { - "$id": "1121", + "$id": "1127", "kind": "nullable", "type": { - "$id": "1122", + "$id": "1128", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15874,7 +15961,7 @@ }, "properties": [ { - "$id": "1123", + "$id": "1129", "kind": "property", "name": "additionalStringProperties", "apiVersions": [ @@ -15883,10 +15970,10 @@ ], "serializedName": "additionalStringProperties", "type": { - "$id": "1124", + "$id": "1130", "kind": "nullable", "type": { - "$id": "1125", + "$id": "1131", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15909,7 +15996,7 @@ "isExactName": false }, { - "$id": "1126", + "$id": "1132", "kind": "property", "name": "additionalStringPropertiesIsDefined", "apiVersions": [ @@ -15918,10 +16005,10 @@ ], "serializedName": "additionalStringPropertiesIsDefined", "type": { - "$id": "1127", + "$id": "1133", "kind": "nullable", "type": { - "$id": "1128", + "$id": "1134", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15946,7 +16033,7 @@ ] }, { - "$id": "1129", + "$id": "1135", "kind": "model", "name": "UnionAdditionalProperties", "apiVersions": [ @@ -15965,29 +16052,29 @@ }, "isExactName": false, "additionalProperties": { - "$id": "1130", + "$id": "1136", "kind": "nullable", "type": { - "$id": "1131", + "$id": "1137", "kind": "union", "name": "UnionAdditionalPropertiesAdditionalProperty", "variantTypes": [ { - "$id": "1132", + "$id": "1138", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "1133", + "$id": "1139", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, { - "$id": "1134", + "$id": "1140", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -16003,7 +16090,7 @@ "properties": [] }, { - "$id": "1135", + "$id": "1141", "kind": "model", "name": "JsonlStreamStreamingItem", "apiVersions": [], @@ -16016,7 +16103,7 @@ "isExactName": false, "properties": [ { - "$id": "1136", + "$id": "1142", "kind": "property", "name": "contentType", "apiVersions": [ @@ -16037,7 +16124,7 @@ "isExactName": false }, { - "$id": "1137", + "$id": "1143", "kind": "property", "name": "body", "apiVersions": [ @@ -16045,7 +16132,7 @@ "2024-08-16-preview" ], "type": { - "$id": "1138", + "$id": "1144", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "", @@ -16066,7 +16153,7 @@ ], "clients": [ { - "$id": "1139", + "$id": "1145", "kind": "client", "name": "SampleTypeSpecClient", "isExactName": false, @@ -16074,7 +16161,7 @@ "doc": "This is a sample typespec project.", "methods": [ { - "$id": "1140", + "$id": "1146", "kind": "basic", "name": "sayHi", "isExactName": false, @@ -16085,19 +16172,19 @@ ], "doc": "Return hi", "operation": { - "$id": "1141", + "$id": "1147", "name": "sayHi", "isExactName": false, "doc": "Return hi", "accessibility": "public", "parameters": [ { - "$id": "1142", + "$id": "1148", "kind": "header", "name": "headParameter", "serializedName": "head-parameter", "type": { - "$id": "1143", + "$id": "1149", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16112,12 +16199,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sayHi.headParameter", "methodParameterSegments": [ { - "$id": "1144", + "$id": "1150", "kind": "method", "name": "headParameter", "serializedName": "head-parameter", "type": { - "$id": "1145", + "$id": "1151", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16137,12 +16224,12 @@ "isExactName": false }, { - "$id": "1146", + "$id": "1152", "kind": "query", "name": "queryParameter", "serializedName": "queryParameter", "type": { - "$id": "1147", + "$id": "1153", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16157,12 +16244,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1148", + "$id": "1154", "kind": "method", "name": "queryParameter", "serializedName": "queryParameter", "type": { - "$id": "1149", + "$id": "1155", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16182,12 +16269,12 @@ "isExactName": false }, { - "$id": "1150", + "$id": "1156", "kind": "query", "name": "optionalQuery", "serializedName": "optionalQuery", "type": { - "$id": "1151", + "$id": "1157", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16202,12 +16289,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1152", + "$id": "1158", "kind": "method", "name": "optionalQuery", "serializedName": "optionalQuery", "type": { - "$id": "1153", + "$id": "1159", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16227,7 +16314,7 @@ "isExactName": false }, { - "$id": "1154", + "$id": "1160", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -16243,7 +16330,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sayHi.accept", "methodParameterSegments": [ { - "$id": "1155", + "$id": "1161", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -16270,7 +16357,7 @@ 200 ], "bodyType": { - "$ref": "470" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -16296,21 +16383,21 @@ }, "parameters": [ { - "$ref": "1144" + "$ref": "1150" }, { - "$ref": "1148" + "$ref": "1154" }, { - "$ref": "1152" + "$ref": "1158" }, { - "$ref": "1155" + "$ref": "1161" } ], "response": { "type": { - "$ref": "470" + "$ref": "474" } }, "isOverride": false, @@ -16319,7 +16406,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sayHi" }, { - "$id": "1156", + "$id": "1162", "kind": "basic", "name": "helloAgain", "isExactName": false, @@ -16330,19 +16417,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "1157", + "$id": "1163", "name": "helloAgain", "isExactName": false, "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "1158", + "$id": "1164", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "1159", + "$id": "1165", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16357,12 +16444,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.p1", "methodParameterSegments": [ { - "$id": "1160", + "$id": "1166", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "1161", + "$id": "1167", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16382,7 +16469,7 @@ "isExactName": false }, { - "$id": "1162", + "$id": "1168", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -16398,7 +16485,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.contentType", "methodParameterSegments": [ { - "$id": "1163", + "$id": "1169", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -16419,12 +16506,12 @@ "isExactName": false }, { - "$id": "1164", + "$id": "1170", "kind": "path", "name": "p2", "serializedName": "p2", "type": { - "$id": "1165", + "$id": "1171", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16442,12 +16529,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.p2", "methodParameterSegments": [ { - "$id": "1166", + "$id": "1172", "kind": "method", "name": "p2", "serializedName": "p2", "type": { - "$id": "1167", + "$id": "1173", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16467,7 +16554,7 @@ "isExactName": false }, { - "$id": "1168", + "$id": "1174", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -16483,7 +16570,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.accept", "methodParameterSegments": [ { - "$id": "1169", + "$id": "1175", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -16504,12 +16591,12 @@ "isExactName": false }, { - "$id": "1170", + "$id": "1176", "kind": "body", "name": "action", "serializedName": "action", "type": { - "$ref": "505" + "$ref": "509" }, "isApiVersion": false, "contentTypes": [ @@ -16523,12 +16610,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.action", "methodParameterSegments": [ { - "$id": "1171", + "$id": "1177", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$ref": "505" + "$ref": "509" }, "location": "Body", "isApiVersion": false, @@ -16551,7 +16638,7 @@ 200 ], "bodyType": { - "$ref": "505" + "$ref": "509" }, "headers": [], "isErrorResponse": false, @@ -16580,24 +16667,24 @@ }, "parameters": [ { - "$ref": "1160" + "$ref": "1166" }, { - "$ref": "1171" + "$ref": "1177" }, { - "$ref": "1163" + "$ref": "1169" }, { - "$ref": "1166" + "$ref": "1172" }, { - "$ref": "1169" + "$ref": "1175" } ], "response": { "type": { - "$ref": "505" + "$ref": "509" } }, "isOverride": false, @@ -16606,7 +16693,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain" }, { - "$id": "1172", + "$id": "1178", "kind": "basic", "name": "noContentType", "isExactName": false, @@ -16617,19 +16704,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "1173", + "$id": "1179", "name": "noContentType", "isExactName": false, "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "1174", + "$id": "1180", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "1175", + "$id": "1181", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16644,12 +16731,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.p1", "methodParameterSegments": [ { - "$id": "1176", + "$id": "1182", "kind": "method", "name": "info", "serializedName": "info", "type": { - "$ref": "555" + "$ref": "559" }, "location": "", "isApiVersion": false, @@ -16662,13 +16749,13 @@ "isExactName": false }, { - "$id": "1177", + "$id": "1183", "kind": "method", "name": "p1", "serializedName": "p1", "doc": "header parameter", "type": { - "$ref": "557" + "$ref": "561" }, "location": "", "isApiVersion": false, @@ -16684,12 +16771,12 @@ "isExactName": false }, { - "$id": "1178", + "$id": "1184", "kind": "path", "name": "p2", "serializedName": "p2", "type": { - "$id": "1179", + "$id": "1185", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16707,16 +16794,16 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.p2", "methodParameterSegments": [ { - "$ref": "1176" + "$ref": "1182" }, { - "$id": "1180", + "$id": "1186", "kind": "method", "name": "p2", "serializedName": "p2", "doc": "path parameter", "type": { - "$ref": "560" + "$ref": "564" }, "location": "", "isApiVersion": false, @@ -16732,7 +16819,7 @@ "isExactName": false }, { - "$id": "1181", + "$id": "1187", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -16749,7 +16836,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.contentType", "methodParameterSegments": [ { - "$id": "1182", + "$id": "1188", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -16771,7 +16858,7 @@ "isExactName": false }, { - "$id": "1183", + "$id": "1189", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -16787,7 +16874,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.accept", "methodParameterSegments": [ { - "$id": "1184", + "$id": "1190", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -16808,12 +16895,12 @@ "isExactName": false }, { - "$id": "1185", + "$id": "1191", "kind": "body", "name": "action", "serializedName": "action", "type": { - "$ref": "505" + "$ref": "509" }, "isApiVersion": false, "contentTypes": [ @@ -16827,16 +16914,16 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.action", "methodParameterSegments": [ { - "$ref": "1176" + "$ref": "1182" }, { - "$id": "1186", + "$id": "1192", "kind": "method", "name": "action", "serializedName": "action", "doc": "body parameter", "type": { - "$ref": "505" + "$ref": "509" }, "location": "", "isApiVersion": false, @@ -16863,7 +16950,7 @@ 200 ], "bodyType": { - "$ref": "505" + "$ref": "509" }, "headers": [], "isErrorResponse": false, @@ -16892,18 +16979,18 @@ }, "parameters": [ { - "$ref": "1176" + "$ref": "1182" }, { - "$ref": "1182" + "$ref": "1188" }, { - "$ref": "1184" + "$ref": "1190" } ], "response": { "type": { - "$ref": "505" + "$ref": "509" } }, "isOverride": true, @@ -16912,7 +16999,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType" }, { - "$id": "1187", + "$id": "1193", "kind": "basic", "name": "helloDemo2", "isExactName": false, @@ -16923,14 +17010,14 @@ ], "doc": "Return hi in demo2", "operation": { - "$id": "1188", + "$id": "1194", "name": "helloDemo2", "isExactName": false, "doc": "Return hi in demo2", "accessibility": "public", "parameters": [ { - "$id": "1189", + "$id": "1195", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -16946,7 +17033,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloDemo2.accept", "methodParameterSegments": [ { - "$id": "1190", + "$id": "1196", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -16973,7 +17060,7 @@ 200 ], "bodyType": { - "$ref": "470" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -17003,12 +17090,12 @@ }, "parameters": [ { - "$ref": "1190" + "$ref": "1196" } ], "response": { "type": { - "$ref": "470" + "$ref": "474" } }, "isOverride": false, @@ -17017,7 +17104,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloDemo2" }, { - "$id": "1191", + "$id": "1197", "kind": "basic", "name": "createLiteral", "isExactName": false, @@ -17028,14 +17115,14 @@ ], "doc": "Create with literal value", "operation": { - "$id": "1192", + "$id": "1198", "name": "createLiteral", "isExactName": false, "doc": "Create with literal value", "accessibility": "public", "parameters": [ { - "$id": "1193", + "$id": "1199", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -17052,7 +17139,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral.contentType", "methodParameterSegments": [ { - "$id": "1194", + "$id": "1200", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -17074,7 +17161,7 @@ "isExactName": false }, { - "$id": "1195", + "$id": "1201", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17090,7 +17177,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral.accept", "methodParameterSegments": [ { - "$id": "1196", + "$id": "1202", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17111,12 +17198,12 @@ "isExactName": false }, { - "$id": "1197", + "$id": "1203", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "470" + "$ref": "474" }, "isApiVersion": false, "contentTypes": [ @@ -17130,12 +17217,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral.body", "methodParameterSegments": [ { - "$id": "1198", + "$id": "1204", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "470" + "$ref": "474" }, "location": "Body", "isApiVersion": false, @@ -17162,7 +17249,7 @@ 200 ], "bodyType": { - "$ref": "470" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -17191,18 +17278,18 @@ }, "parameters": [ { - "$ref": "1198" + "$ref": "1204" }, { - "$ref": "1194" + "$ref": "1200" }, { - "$ref": "1196" + "$ref": "1202" } ], "response": { "type": { - "$ref": "470" + "$ref": "474" } }, "isOverride": false, @@ -17211,7 +17298,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral" }, { - "$id": "1199", + "$id": "1205", "kind": "basic", "name": "helloLiteral", "isExactName": false, @@ -17222,14 +17309,14 @@ ], "doc": "Send literal parameters", "operation": { - "$id": "1200", + "$id": "1206", "name": "helloLiteral", "isExactName": false, "doc": "Send literal parameters", "accessibility": "public", "parameters": [ { - "$id": "1201", + "$id": "1207", "kind": "header", "name": "p1", "serializedName": "p1", @@ -17245,7 +17332,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral.p1", "methodParameterSegments": [ { - "$id": "1202", + "$id": "1208", "kind": "method", "name": "p1", "serializedName": "p1", @@ -17266,7 +17353,7 @@ "isExactName": false }, { - "$id": "1203", + "$id": "1209", "kind": "path", "name": "p2", "serializedName": "p2", @@ -17285,7 +17372,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral.p2", "methodParameterSegments": [ { - "$id": "1204", + "$id": "1210", "kind": "method", "name": "p2", "serializedName": "p2", @@ -17306,7 +17393,7 @@ "isExactName": false }, { - "$id": "1205", + "$id": "1211", "kind": "query", "name": "p3", "serializedName": "p3", @@ -17322,7 +17409,7 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1206", + "$id": "1212", "kind": "method", "name": "p3", "serializedName": "p3", @@ -17343,7 +17430,7 @@ "isExactName": false }, { - "$id": "1207", + "$id": "1213", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17359,7 +17446,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral.accept", "methodParameterSegments": [ { - "$id": "1208", + "$id": "1214", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17386,7 +17473,7 @@ 200 ], "bodyType": { - "$ref": "470" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -17412,21 +17499,21 @@ }, "parameters": [ { - "$ref": "1202" + "$ref": "1208" }, { - "$ref": "1204" + "$ref": "1210" }, { - "$ref": "1206" + "$ref": "1212" }, { - "$ref": "1208" + "$ref": "1214" } ], "response": { "type": { - "$ref": "470" + "$ref": "474" } }, "isOverride": false, @@ -17435,7 +17522,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral" }, { - "$id": "1209", + "$id": "1215", "kind": "basic", "name": "topAction", "isExactName": false, @@ -17446,24 +17533,24 @@ ], "doc": "top level method", "operation": { - "$id": "1210", + "$id": "1216", "name": "topAction", "isExactName": false, "doc": "top level method", "accessibility": "public", "parameters": [ { - "$id": "1211", + "$id": "1217", "kind": "path", "name": "action", "serializedName": "action", "type": { - "$id": "1212", + "$id": "1218", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "1213", + "$id": "1219", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17484,17 +17571,17 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction.action", "methodParameterSegments": [ { - "$id": "1214", + "$id": "1220", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$id": "1215", + "$id": "1221", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "1216", + "$id": "1222", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17517,7 +17604,7 @@ "isExactName": false }, { - "$id": "1217", + "$id": "1223", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17533,7 +17620,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction.accept", "methodParameterSegments": [ { - "$id": "1218", + "$id": "1224", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17560,7 +17647,7 @@ 200 ], "bodyType": { - "$ref": "470" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -17586,15 +17673,15 @@ }, "parameters": [ { - "$ref": "1214" + "$ref": "1220" }, { - "$ref": "1218" + "$ref": "1224" } ], "response": { "type": { - "$ref": "470" + "$ref": "474" } }, "isOverride": false, @@ -17603,7 +17690,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction" }, { - "$id": "1219", + "$id": "1225", "kind": "basic", "name": "topAction2", "isExactName": false, @@ -17614,14 +17701,14 @@ ], "doc": "top level method2", "operation": { - "$id": "1220", + "$id": "1226", "name": "topAction2", "isExactName": false, "doc": "top level method2", "accessibility": "public", "parameters": [ { - "$id": "1221", + "$id": "1227", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17637,7 +17724,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction2.accept", "methodParameterSegments": [ { - "$id": "1222", + "$id": "1228", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17664,7 +17751,7 @@ 200 ], "bodyType": { - "$ref": "470" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -17690,12 +17777,12 @@ }, "parameters": [ { - "$ref": "1222" + "$ref": "1228" } ], "response": { "type": { - "$ref": "470" + "$ref": "474" } }, "isOverride": false, @@ -17704,7 +17791,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction2" }, { - "$id": "1223", + "$id": "1229", "kind": "basic", "name": "patchAction", "isExactName": false, @@ -17715,14 +17802,14 @@ ], "doc": "top level patch", "operation": { - "$id": "1224", + "$id": "1230", "name": "patchAction", "isExactName": false, "doc": "top level patch", "accessibility": "public", "parameters": [ { - "$id": "1225", + "$id": "1231", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -17739,7 +17826,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction.contentType", "methodParameterSegments": [ { - "$id": "1226", + "$id": "1232", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -17761,7 +17848,7 @@ "isExactName": false }, { - "$id": "1227", + "$id": "1233", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17777,7 +17864,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction.accept", "methodParameterSegments": [ { - "$id": "1228", + "$id": "1234", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17798,12 +17885,12 @@ "isExactName": false }, { - "$id": "1229", + "$id": "1235", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "470" + "$ref": "474" }, "isApiVersion": false, "contentTypes": [ @@ -17817,12 +17904,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction.body", "methodParameterSegments": [ { - "$id": "1230", + "$id": "1236", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "470" + "$ref": "474" }, "location": "Body", "isApiVersion": false, @@ -17849,7 +17936,7 @@ 200 ], "bodyType": { - "$ref": "470" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -17878,18 +17965,18 @@ }, "parameters": [ { - "$ref": "1230" + "$ref": "1236" }, { - "$ref": "1226" + "$ref": "1232" }, { - "$ref": "1228" + "$ref": "1234" } ], "response": { "type": { - "$ref": "470" + "$ref": "474" } }, "isOverride": false, @@ -17898,7 +17985,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction" }, { - "$id": "1231", + "$id": "1237", "kind": "basic", "name": "anonymousBody", "isExactName": false, @@ -17909,14 +17996,14 @@ ], "doc": "body parameter without body decorator", "operation": { - "$id": "1232", + "$id": "1238", "name": "anonymousBody", "isExactName": false, "doc": "body parameter without body decorator", "accessibility": "public", "parameters": [ { - "$id": "1233", + "$id": "1239", "kind": "query", "name": "requiredQueryParam", "serializedName": "requiredQueryParam", @@ -17932,7 +18019,7 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1234", + "$id": "1240", "kind": "method", "name": "requiredQueryParam", "serializedName": "requiredQueryParam", @@ -17953,7 +18040,7 @@ "isExactName": false }, { - "$id": "1235", + "$id": "1241", "kind": "header", "name": "requiredHeader", "serializedName": "required-header", @@ -17969,7 +18056,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.requiredHeader", "methodParameterSegments": [ { - "$id": "1236", + "$id": "1242", "kind": "method", "name": "requiredHeader", "serializedName": "required-header", @@ -17990,7 +18077,7 @@ "isExactName": false }, { - "$id": "1237", + "$id": "1243", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -18007,7 +18094,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.contentType", "methodParameterSegments": [ { - "$id": "1238", + "$id": "1244", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -18029,7 +18116,7 @@ "isExactName": false }, { - "$id": "1239", + "$id": "1245", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -18045,7 +18132,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.accept", "methodParameterSegments": [ { - "$id": "1240", + "$id": "1246", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -18066,12 +18153,12 @@ "isExactName": false }, { - "$id": "1241", + "$id": "1247", "kind": "body", "name": "thing", "serializedName": "thing", "type": { - "$ref": "470" + "$ref": "474" }, "isApiVersion": false, "contentTypes": [ @@ -18085,13 +18172,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.body", "methodParameterSegments": [ { - "$id": "1242", + "$id": "1248", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the Thing", "type": { - "$id": "1243", + "$id": "1249", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18122,7 +18209,7 @@ 200 ], "bodyType": { - "$ref": "470" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -18151,16 +18238,16 @@ }, "parameters": [ { - "$ref": "1242" + "$ref": "1248" }, { - "$id": "1244", + "$id": "1250", "kind": "method", "name": "requiredUnion", "serializedName": "requiredUnion", "doc": "required Union", "type": { - "$ref": "474" + "$ref": "478" }, "location": "Body", "isApiVersion": false, @@ -18173,7 +18260,7 @@ "isExactName": false }, { - "$id": "1245", + "$id": "1251", "kind": "method", "name": "requiredLiteralString", "serializedName": "requiredLiteralString", @@ -18192,13 +18279,13 @@ "isExactName": false }, { - "$id": "1246", + "$id": "1252", "kind": "method", "name": "requiredNullableString", "serializedName": "requiredNullableString", "doc": "required nullable string", "type": { - "$ref": "481" + "$ref": "485" }, "location": "Body", "isApiVersion": false, @@ -18211,13 +18298,13 @@ "isExactName": false }, { - "$id": "1247", + "$id": "1253", "kind": "method", "name": "optionalNullableString", "serializedName": "optionalNullableString", "doc": "required optional string", "type": { - "$ref": "484" + "$ref": "488" }, "location": "Body", "isApiVersion": false, @@ -18230,7 +18317,7 @@ "isExactName": false }, { - "$id": "1248", + "$id": "1254", "kind": "method", "name": "requiredLiteralInt", "serializedName": "requiredLiteralInt", @@ -18249,7 +18336,7 @@ "isExactName": false }, { - "$id": "1249", + "$id": "1255", "kind": "method", "name": "requiredLiteralFloat", "serializedName": "requiredLiteralFloat", @@ -18268,7 +18355,7 @@ "isExactName": false }, { - "$id": "1250", + "$id": "1256", "kind": "method", "name": "requiredLiteralBool", "serializedName": "requiredLiteralBool", @@ -18287,19 +18374,19 @@ "isExactName": false }, { - "$id": "1251", + "$id": "1257", "kind": "method", "name": "optionalLiteralString", "serializedName": "optionalLiteralString", "doc": "optional literal string", "type": { - "$id": "1252", + "$id": "1258", "kind": "enum", "name": "ThingOptionalLiteralString", "apiVersions": [], "crossLanguageDefinitionId": "", "valueType": { - "$id": "1253", + "$id": "1259", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18307,12 +18394,12 @@ }, "values": [ { - "$id": "1254", + "$id": "1260", "kind": "enumvalue", "name": "reject", "value": "reject", "valueType": { - "$id": "1255", + "$id": "1261", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -18320,7 +18407,7 @@ "crossLanguageDefinitionId": "TypeSpec.string" }, "enumType": { - "$ref": "1252" + "$ref": "1258" }, "decorators": [], "isExactName": false @@ -18344,13 +18431,13 @@ "isExactName": false }, { - "$id": "1256", + "$id": "1262", "kind": "method", "name": "requiredNullableLiteralString", "serializedName": "requiredNullableLiteralString", "doc": "required nullable literal string", "type": { - "$ref": "491" + "$ref": "495" }, "location": "Body", "isApiVersion": false, @@ -18363,19 +18450,19 @@ "isExactName": false }, { - "$id": "1257", + "$id": "1263", "kind": "method", "name": "optionalLiteralInt", "serializedName": "optionalLiteralInt", "doc": "optional literal int", "type": { - "$id": "1258", + "$id": "1264", "kind": "enum", "name": "ThingOptionalLiteralInt", "apiVersions": [], "crossLanguageDefinitionId": "", "valueType": { - "$id": "1259", + "$id": "1265", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -18383,12 +18470,12 @@ }, "values": [ { - "$id": "1260", + "$id": "1266", "kind": "enumvalue", "name": "456", "value": 456, "valueType": { - "$id": "1261", + "$id": "1267", "kind": "int32", "decorators": [], "doc": "A 32-bit integer. (`-2,147,483,648` to `2,147,483,647`)", @@ -18396,7 +18483,7 @@ "crossLanguageDefinitionId": "TypeSpec.int32" }, "enumType": { - "$ref": "1258" + "$ref": "1264" }, "decorators": [], "isExactName": false @@ -18420,19 +18507,19 @@ "isExactName": false }, { - "$id": "1262", + "$id": "1268", "kind": "method", "name": "optionalLiteralFloat", "serializedName": "optionalLiteralFloat", "doc": "optional literal float", "type": { - "$id": "1263", + "$id": "1269", "kind": "enum", "name": "ThingOptionalLiteralFloat", "apiVersions": [], "crossLanguageDefinitionId": "", "valueType": { - "$id": "1264", + "$id": "1270", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18440,12 +18527,12 @@ }, "values": [ { - "$id": "1265", + "$id": "1271", "kind": "enumvalue", "name": "4.56", "value": 4.56, "valueType": { - "$id": "1266", + "$id": "1272", "kind": "float32", "decorators": [], "doc": "A 32 bit floating point number. (`±1.5 x 10^−45` to `±3.4 x 10^38`)", @@ -18453,7 +18540,7 @@ "crossLanguageDefinitionId": "TypeSpec.float32" }, "enumType": { - "$ref": "1263" + "$ref": "1269" }, "decorators": [], "isExactName": false @@ -18477,7 +18564,7 @@ "isExactName": false }, { - "$id": "1267", + "$id": "1273", "kind": "method", "name": "optionalLiteralBool", "serializedName": "optionalLiteralBool", @@ -18496,13 +18583,13 @@ "isExactName": false }, { - "$id": "1268", + "$id": "1274", "kind": "method", "name": "requiredBadDescription", "serializedName": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "1269", + "$id": "1275", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18519,13 +18606,13 @@ "isExactName": false }, { - "$id": "1270", + "$id": "1276", "kind": "method", "name": "optionalNullableList", "serializedName": "optionalNullableList", "doc": "optional nullable collection", "type": { - "$ref": "498" + "$ref": "502" }, "location": "Body", "isApiVersion": false, @@ -18538,13 +18625,13 @@ "isExactName": false }, { - "$id": "1271", + "$id": "1277", "kind": "method", "name": "requiredNullableList", "serializedName": "requiredNullableList", "doc": "required nullable collection", "type": { - "$ref": "502" + "$ref": "506" }, "location": "Body", "isApiVersion": false, @@ -18557,13 +18644,13 @@ "isExactName": false }, { - "$id": "1272", + "$id": "1278", "kind": "method", "name": "propertyWithSpecialDocs", "serializedName": "propertyWithSpecialDocs", "doc": "This tests:\n- Simple bullet point. This bullet point is going to be very long to test how text wrapping is handled in bullet points within documentation comments. It should properly indent the wrapped lines.\n- Another bullet point with **bold text**. This bullet point is also intentionally long to see how the formatting is preserved when the text wraps onto multiple lines in the generated documentation.\n- Third bullet point with *italic text*. Similar to the previous points, this one is extended to ensure that the wrapping and formatting are correctly applied in the output.\n- Complex bullet point with **bold** and *italic* combined. This bullet point combines both bold and italic formatting and is long enough to test the wrapping behavior in such cases.\n- **Bold bullet point**: A bullet point that is entirely bolded. This point is also made lengthy to observe how the bold formatting is maintained across wrapped lines.\n- *Italic bullet point*: A bullet point that is entirely italicized. This final point is extended to verify that italic formatting is correctly applied even when the text spans multiple lines.", "type": { - "$id": "1273", + "$id": "1279", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18580,21 +18667,21 @@ "isExactName": false }, { - "$ref": "1234" + "$ref": "1240" }, { - "$ref": "1236" + "$ref": "1242" }, { - "$ref": "1238" + "$ref": "1244" }, { - "$ref": "1240" + "$ref": "1246" } ], "response": { "type": { - "$ref": "470" + "$ref": "474" } }, "isOverride": false, @@ -18603,7 +18690,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody" }, { - "$id": "1274", + "$id": "1280", "kind": "basic", "name": "friendlyModel", "isExactName": false, @@ -18614,14 +18701,14 @@ ], "doc": "Model can have its friendly name", "operation": { - "$id": "1275", + "$id": "1281", "name": "friendlyModel", "isExactName": false, "doc": "Model can have its friendly name", "accessibility": "public", "parameters": [ { - "$id": "1276", + "$id": "1282", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -18638,7 +18725,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel.contentType", "methodParameterSegments": [ { - "$id": "1277", + "$id": "1283", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -18660,7 +18747,7 @@ "isExactName": false }, { - "$id": "1278", + "$id": "1284", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -18676,7 +18763,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel.accept", "methodParameterSegments": [ { - "$id": "1279", + "$id": "1285", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -18697,12 +18784,12 @@ "isExactName": false }, { - "$id": "1280", + "$id": "1286", "kind": "body", "name": "friend", "serializedName": "friend", "type": { - "$ref": "561" + "$ref": "565" }, "isApiVersion": false, "contentTypes": [ @@ -18716,13 +18803,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel.body", "methodParameterSegments": [ { - "$id": "1281", + "$id": "1287", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "1282", + "$id": "1288", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18753,7 +18840,7 @@ 200 ], "bodyType": { - "$ref": "561" + "$ref": "565" }, "headers": [], "isErrorResponse": false, @@ -18782,18 +18869,18 @@ }, "parameters": [ { - "$ref": "1281" + "$ref": "1287" }, { - "$ref": "1277" + "$ref": "1283" }, { - "$ref": "1279" + "$ref": "1285" } ], "response": { "type": { - "$ref": "561" + "$ref": "565" } }, "isOverride": false, @@ -18802,7 +18889,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel" }, { - "$id": "1283", + "$id": "1289", "kind": "basic", "name": "addTimeHeader", "isExactName": false, @@ -18812,23 +18899,23 @@ "2024-08-16-preview" ], "operation": { - "$id": "1284", + "$id": "1290", "name": "addTimeHeader", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1285", + "$id": "1291", "kind": "header", "name": "repeatabilityFirstSent", "serializedName": "Repeatability-First-Sent", "type": { - "$id": "1286", + "$id": "1292", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "1287", + "$id": "1293", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18846,17 +18933,17 @@ "crossLanguageDefinitionId": "SampleTypeSpec.addTimeHeader.repeatabilityFirstSent", "methodParameterSegments": [ { - "$id": "1288", + "$id": "1294", "kind": "method", "name": "repeatabilityFirstSent", "serializedName": "Repeatability-First-Sent", "type": { - "$id": "1289", + "$id": "1295", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "1290", + "$id": "1296", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18901,7 +18988,7 @@ }, "parameters": [ { - "$ref": "1288" + "$ref": "1294" } ], "response": {}, @@ -18911,7 +18998,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.addTimeHeader" }, { - "$id": "1291", + "$id": "1297", "kind": "basic", "name": "projectedNameModel", "isExactName": false, @@ -18922,14 +19009,14 @@ ], "doc": "Model can have its projected name", "operation": { - "$id": "1292", + "$id": "1298", "name": "projectedNameModel", "isExactName": false, "doc": "Model can have its projected name", "accessibility": "public", "parameters": [ { - "$id": "1293", + "$id": "1299", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -18946,7 +19033,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel.contentType", "methodParameterSegments": [ { - "$id": "1294", + "$id": "1300", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -18968,7 +19055,7 @@ "isExactName": false }, { - "$id": "1295", + "$id": "1301", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -18984,7 +19071,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel.accept", "methodParameterSegments": [ { - "$id": "1296", + "$id": "1302", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19005,12 +19092,12 @@ "isExactName": false }, { - "$id": "1297", + "$id": "1303", "kind": "body", "name": "renamedModel", "serializedName": "renamedModel", "type": { - "$ref": "564" + "$ref": "568" }, "isApiVersion": false, "contentTypes": [ @@ -19024,13 +19111,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel.body", "methodParameterSegments": [ { - "$id": "1298", + "$id": "1304", "kind": "method", "name": "otherName", "serializedName": "otherName", "doc": "name of the ModelWithClientName", "type": { - "$id": "1299", + "$id": "1305", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19061,7 +19148,7 @@ 200 ], "bodyType": { - "$ref": "564" + "$ref": "568" }, "headers": [], "isErrorResponse": false, @@ -19090,18 +19177,18 @@ }, "parameters": [ { - "$ref": "1298" + "$ref": "1304" }, { - "$ref": "1294" + "$ref": "1300" }, { - "$ref": "1296" + "$ref": "1302" } ], "response": { "type": { - "$ref": "564" + "$ref": "568" } }, "isOverride": false, @@ -19110,7 +19197,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel" }, { - "$id": "1300", + "$id": "1306", "kind": "basic", "name": "returnsAnonymousModel", "isExactName": false, @@ -19121,14 +19208,14 @@ ], "doc": "return anonymous model", "operation": { - "$id": "1301", + "$id": "1307", "name": "returnsAnonymousModel", "isExactName": false, "doc": "return anonymous model", "accessibility": "public", "parameters": [ { - "$id": "1302", + "$id": "1308", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19144,7 +19231,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.returnsAnonymousModel.accept", "methodParameterSegments": [ { - "$id": "1303", + "$id": "1309", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19171,7 +19258,7 @@ 200 ], "bodyType": { - "$ref": "567" + "$ref": "571" }, "headers": [], "isErrorResponse": false, @@ -19197,12 +19284,12 @@ }, "parameters": [ { - "$ref": "1303" + "$ref": "1309" } ], "response": { "type": { - "$ref": "567" + "$ref": "571" } }, "isOverride": false, @@ -19211,7 +19298,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.returnsAnonymousModel" }, { - "$id": "1304", + "$id": "1310", "kind": "basic", "name": "getUnknownValue", "isExactName": false, @@ -19222,14 +19309,14 @@ ], "doc": "get extensible enum", "operation": { - "$id": "1305", + "$id": "1311", "name": "getUnknownValue", "isExactName": false, "doc": "get extensible enum", "accessibility": "public", "parameters": [ { - "$id": "1306", + "$id": "1312", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19245,7 +19332,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getUnknownValue.accept", "methodParameterSegments": [ { - "$id": "1307", + "$id": "1313", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19294,7 +19381,7 @@ }, "parameters": [ { - "$ref": "1307" + "$ref": "1313" } ], "response": { @@ -19308,7 +19395,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getUnknownValue" }, { - "$id": "1308", + "$id": "1314", "kind": "basic", "name": "internalProtocol", "isExactName": false, @@ -19319,14 +19406,14 @@ ], "doc": "When set protocol false and convenient true, then the protocol method should be internal", "operation": { - "$id": "1309", + "$id": "1315", "name": "internalProtocol", "isExactName": false, "doc": "When set protocol false and convenient true, then the protocol method should be internal", "accessibility": "public", "parameters": [ { - "$id": "1310", + "$id": "1316", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -19343,7 +19430,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol.contentType", "methodParameterSegments": [ { - "$id": "1311", + "$id": "1317", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -19365,7 +19452,7 @@ "isExactName": false }, { - "$id": "1312", + "$id": "1318", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19381,7 +19468,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol.accept", "methodParameterSegments": [ { - "$id": "1313", + "$id": "1319", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19402,12 +19489,12 @@ "isExactName": false }, { - "$id": "1314", + "$id": "1320", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "470" + "$ref": "474" }, "isApiVersion": false, "contentTypes": [ @@ -19421,12 +19508,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol.body", "methodParameterSegments": [ { - "$id": "1315", + "$id": "1321", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "470" + "$ref": "474" }, "location": "Body", "isApiVersion": false, @@ -19453,7 +19540,7 @@ 200 ], "bodyType": { - "$ref": "470" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -19482,18 +19569,18 @@ }, "parameters": [ { - "$ref": "1315" + "$ref": "1321" }, { - "$ref": "1311" + "$ref": "1317" }, { - "$ref": "1313" + "$ref": "1319" } ], "response": { "type": { - "$ref": "470" + "$ref": "474" } }, "isOverride": false, @@ -19502,7 +19589,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol" }, { - "$id": "1316", + "$id": "1322", "kind": "basic", "name": "stillConvenient", "isExactName": false, @@ -19513,7 +19600,7 @@ ], "doc": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "operation": { - "$id": "1317", + "$id": "1323", "name": "stillConvenient", "isExactName": false, "doc": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", @@ -19547,7 +19634,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.stillConvenient" }, { - "$id": "1318", + "$id": "1324", "kind": "basic", "name": "headAsBoolean", "isExactName": false, @@ -19558,19 +19645,19 @@ ], "doc": "Check whether a resource exists: return true for success, false for 404, and throw for unexpected responses.", "operation": { - "$id": "1319", + "$id": "1325", "name": "headAsBoolean", "isExactName": false, "doc": "Check whether a resource exists: return true for success, false for 404, and throw for unexpected responses.", "accessibility": "public", "parameters": [ { - "$id": "1320", + "$id": "1326", "kind": "path", "name": "id", "serializedName": "id", "type": { - "$id": "1321", + "$id": "1327", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19588,12 +19675,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.headAsBoolean.id", "methodParameterSegments": [ { - "$id": "1322", + "$id": "1328", "kind": "method", "name": "id", "serializedName": "id", "type": { - "$id": "1323", + "$id": "1329", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19644,12 +19731,12 @@ }, "parameters": [ { - "$ref": "1322" + "$ref": "1328" } ], "response": { "type": { - "$id": "1324", + "$id": "1330", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -19662,7 +19749,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.headAsBoolean" }, { - "$id": "1325", + "$id": "1331", "kind": "basic", "name": "WithApiVersion", "isExactName": false, @@ -19673,19 +19760,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "1326", + "$id": "1332", "name": "WithApiVersion", "isExactName": false, "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "1327", + "$id": "1333", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "1328", + "$id": "1334", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19700,12 +19787,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.WithApiVersion.p1", "methodParameterSegments": [ { - "$id": "1329", + "$id": "1335", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "1330", + "$id": "1336", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19725,12 +19812,12 @@ "isExactName": false }, { - "$id": "1331", + "$id": "1337", "kind": "query", "name": "apiVersion", "serializedName": "apiVersion", "type": { - "$id": "1332", + "$id": "1338", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19740,7 +19827,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1333", + "$id": "1339", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -19754,12 +19841,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1334", + "$id": "1340", "kind": "method", "name": "apiVersion", "serializedName": "apiVersion", "type": { - "$id": "1335", + "$id": "1341", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19769,7 +19856,7 @@ "isApiVersion": true, "defaultValue": { "type": { - "$id": "1336", + "$id": "1342", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -19810,7 +19897,7 @@ }, "parameters": [ { - "$ref": "1329" + "$ref": "1335" } ], "response": {}, @@ -19820,7 +19907,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.WithApiVersion" }, { - "$id": "1337", + "$id": "1343", "kind": "paging", "name": "ListWithNextLink", "isExactName": false, @@ -19831,14 +19918,14 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "1338", + "$id": "1344", "name": "ListWithNextLink", "isExactName": false, "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "1339", + "$id": "1345", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19854,7 +19941,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithNextLink.accept", "methodParameterSegments": [ { - "$id": "1340", + "$id": "1346", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19881,7 +19968,7 @@ 200 ], "bodyType": { - "$ref": "568" + "$ref": "572" }, "headers": [], "isErrorResponse": false, @@ -19907,12 +19994,12 @@ }, "parameters": [ { - "$ref": "1340" + "$ref": "1346" } ], "response": { "type": { - "$ref": "570" + "$ref": "574" }, "resultSegments": [ "things" @@ -19937,7 +20024,7 @@ } }, { - "$id": "1341", + "$id": "1347", "kind": "paging", "name": "ListWithStringNextLink", "isExactName": false, @@ -19948,14 +20035,14 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "1342", + "$id": "1348", "name": "ListWithStringNextLink", "isExactName": false, "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "1343", + "$id": "1349", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19971,7 +20058,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithStringNextLink.accept", "methodParameterSegments": [ { - "$id": "1344", + "$id": "1350", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19998,7 +20085,7 @@ 200 ], "bodyType": { - "$ref": "573" + "$ref": "577" }, "headers": [], "isErrorResponse": false, @@ -20024,12 +20111,12 @@ }, "parameters": [ { - "$ref": "1344" + "$ref": "1350" } ], "response": { "type": { - "$ref": "570" + "$ref": "574" }, "resultSegments": [ "things" @@ -20054,7 +20141,7 @@ } }, { - "$id": "1345", + "$id": "1351", "kind": "paging", "name": "ListWithContinuationToken", "isExactName": false, @@ -20065,19 +20152,19 @@ ], "doc": "List things with continuation token", "operation": { - "$id": "1346", + "$id": "1352", "name": "ListWithContinuationToken", "isExactName": false, "doc": "List things with continuation token", "accessibility": "public", "parameters": [ { - "$id": "1347", + "$id": "1353", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "1348", + "$id": "1354", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20092,12 +20179,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1349", + "$id": "1355", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "1350", + "$id": "1356", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20118,7 +20205,7 @@ "isContinuationToken": true }, { - "$id": "1351", + "$id": "1357", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -20134,7 +20221,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithContinuationToken.accept", "methodParameterSegments": [ { - "$id": "1352", + "$id": "1358", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -20161,7 +20248,7 @@ 200 ], "bodyType": { - "$ref": "577" + "$ref": "581" }, "headers": [], "isErrorResponse": false, @@ -20187,15 +20274,15 @@ }, "parameters": [ { - "$ref": "1349" + "$ref": "1355" }, { - "$ref": "1352" + "$ref": "1358" } ], "response": { "type": { - "$ref": "570" + "$ref": "574" }, "resultSegments": [ "things" @@ -20211,7 +20298,7 @@ ], "continuationToken": { "parameter": { - "$ref": "1347" + "$ref": "1353" }, "responseSegments": [ "nextToken" @@ -20222,7 +20309,7 @@ } }, { - "$id": "1353", + "$id": "1359", "kind": "paging", "name": "ListWithContinuationTokenHeaderResponse", "isExactName": false, @@ -20233,19 +20320,19 @@ ], "doc": "List things with continuation token header response", "operation": { - "$id": "1354", + "$id": "1360", "name": "ListWithContinuationTokenHeaderResponse", "isExactName": false, "doc": "List things with continuation token header response", "accessibility": "public", "parameters": [ { - "$id": "1355", + "$id": "1361", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "1356", + "$id": "1362", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20260,12 +20347,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1357", + "$id": "1363", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "1358", + "$id": "1364", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20286,7 +20373,7 @@ "isContinuationToken": true }, { - "$id": "1359", + "$id": "1365", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -20302,7 +20389,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithContinuationTokenHeaderResponse.accept", "methodParameterSegments": [ { - "$id": "1360", + "$id": "1366", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -20329,14 +20416,14 @@ 200 ], "bodyType": { - "$ref": "581" + "$ref": "585" }, "headers": [ { "name": "nextToken", "nameInResponse": "next-token", "type": { - "$id": "1361", + "$id": "1367", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20367,15 +20454,15 @@ }, "parameters": [ { - "$ref": "1357" + "$ref": "1363" }, { - "$ref": "1360" + "$ref": "1366" } ], "response": { "type": { - "$ref": "570" + "$ref": "574" }, "resultSegments": [ "things" @@ -20391,7 +20478,7 @@ ], "continuationToken": { "parameter": { - "$ref": "1355" + "$ref": "1361" }, "responseSegments": [ "next-token" @@ -20402,7 +20489,7 @@ } }, { - "$id": "1362", + "$id": "1368", "kind": "paging", "name": "ListWithPaging", "isExactName": false, @@ -20413,14 +20500,14 @@ ], "doc": "List things with paging", "operation": { - "$id": "1363", + "$id": "1369", "name": "ListWithPaging", "isExactName": false, "doc": "List things with paging", "accessibility": "public", "parameters": [ { - "$id": "1364", + "$id": "1370", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -20436,7 +20523,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithPaging.accept", "methodParameterSegments": [ { - "$id": "1365", + "$id": "1371", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -20463,7 +20550,7 @@ 200 ], "bodyType": { - "$ref": "583" + "$ref": "587" }, "headers": [], "isErrorResponse": false, @@ -20489,12 +20576,12 @@ }, "parameters": [ { - "$ref": "1365" + "$ref": "1371" } ], "response": { "type": { - "$ref": "570" + "$ref": "574" }, "resultSegments": [ "items" @@ -20512,7 +20599,7 @@ } }, { - "$id": "1366", + "$id": "1372", "kind": "basic", "name": "EmbeddedParameters", "isExactName": false, @@ -20523,20 +20610,20 @@ ], "doc": "An operation with embedded parameters within the body", "operation": { - "$id": "1367", + "$id": "1373", "name": "EmbeddedParameters", "isExactName": false, "doc": "An operation with embedded parameters within the body", "accessibility": "public", "parameters": [ { - "$id": "1368", + "$id": "1374", "kind": "header", "name": "requiredHeader", "serializedName": "required-header", "doc": "required header parameter", "type": { - "$id": "1369", + "$id": "1375", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20551,12 +20638,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ModelWithEmbeddedNonBodyParameters.requiredHeader", "methodParameterSegments": [ { - "$id": "1370", + "$id": "1376", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "585" + "$ref": "589" }, "location": "Body", "isApiVersion": false, @@ -20569,13 +20656,13 @@ "isExactName": false }, { - "$id": "1371", + "$id": "1377", "kind": "method", "name": "requiredHeader", "serializedName": "requiredHeader", "doc": "required header parameter", "type": { - "$ref": "589" + "$ref": "593" }, "location": "", "isApiVersion": false, @@ -20591,13 +20678,13 @@ "isExactName": false }, { - "$id": "1372", + "$id": "1378", "kind": "header", "name": "optionalHeader", "serializedName": "optional-header", "doc": "optional header parameter", "type": { - "$id": "1373", + "$id": "1379", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20612,16 +20699,16 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ModelWithEmbeddedNonBodyParameters.optionalHeader", "methodParameterSegments": [ { - "$ref": "1370" + "$ref": "1376" }, { - "$id": "1374", + "$id": "1380", "kind": "method", "name": "optionalHeader", "serializedName": "optionalHeader", "doc": "optional header parameter", "type": { - "$ref": "591" + "$ref": "595" }, "location": "", "isApiVersion": false, @@ -20637,13 +20724,13 @@ "isExactName": false }, { - "$id": "1375", + "$id": "1381", "kind": "query", "name": "requiredQuery", "serializedName": "requiredQuery", "doc": "required query parameter", "type": { - "$id": "1376", + "$id": "1382", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20658,16 +20745,16 @@ "readOnly": false, "methodParameterSegments": [ { - "$ref": "1370" + "$ref": "1376" }, { - "$id": "1377", + "$id": "1383", "kind": "method", "name": "requiredQuery", "serializedName": "requiredQuery", "doc": "required query parameter", "type": { - "$ref": "593" + "$ref": "597" }, "location": "", "isApiVersion": false, @@ -20683,13 +20770,13 @@ "isExactName": false }, { - "$id": "1378", + "$id": "1384", "kind": "query", "name": "optionalQuery", "serializedName": "optionalQuery", "doc": "optional query parameter", "type": { - "$id": "1379", + "$id": "1385", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20704,16 +20791,16 @@ "readOnly": false, "methodParameterSegments": [ { - "$ref": "1370" + "$ref": "1376" }, { - "$id": "1380", + "$id": "1386", "kind": "method", "name": "optionalQuery", "serializedName": "optionalQuery", "doc": "optional query parameter", "type": { - "$ref": "595" + "$ref": "599" }, "location": "", "isApiVersion": false, @@ -20729,7 +20816,7 @@ "isExactName": false }, { - "$id": "1381", + "$id": "1387", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -20746,7 +20833,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.EmbeddedParameters.contentType", "methodParameterSegments": [ { - "$id": "1382", + "$id": "1388", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -20768,12 +20855,12 @@ "isExactName": false }, { - "$id": "1383", + "$id": "1389", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "585" + "$ref": "589" }, "isApiVersion": false, "contentTypes": [ @@ -20787,7 +20874,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.EmbeddedParameters.body", "methodParameterSegments": [ { - "$ref": "1370" + "$ref": "1376" } ], "isExactName": false, @@ -20823,10 +20910,10 @@ }, "parameters": [ { - "$ref": "1370" + "$ref": "1376" }, { - "$ref": "1382" + "$ref": "1388" } ], "response": {}, @@ -20836,7 +20923,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.EmbeddedParameters" }, { - "$id": "1384", + "$id": "1390", "kind": "basic", "name": "DynamicModelOperation", "isExactName": false, @@ -20847,14 +20934,14 @@ ], "doc": "An operation with a dynamic model", "operation": { - "$id": "1385", + "$id": "1391", "name": "DynamicModelOperation", "isExactName": false, "doc": "An operation with a dynamic model", "accessibility": "public", "parameters": [ { - "$id": "1386", + "$id": "1392", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -20871,7 +20958,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DynamicModelOperation.contentType", "methodParameterSegments": [ { - "$id": "1387", + "$id": "1393", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -20893,12 +20980,12 @@ "isExactName": false }, { - "$id": "1388", + "$id": "1394", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "596" + "$ref": "600" }, "isApiVersion": false, "contentTypes": [ @@ -20912,12 +20999,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DynamicModelOperation.body", "methodParameterSegments": [ { - "$id": "1389", + "$id": "1395", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "596" + "$ref": "600" }, "location": "Body", "isApiVersion": false, @@ -20969,10 +21056,10 @@ }, "parameters": [ { - "$ref": "1389" + "$ref": "1395" }, { - "$ref": "1387" + "$ref": "1393" } ], "response": {}, @@ -20982,7 +21069,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DynamicModelOperation" }, { - "$id": "1390", + "$id": "1396", "kind": "basic", "name": "GetXmlAdvancedModel", "isExactName": false, @@ -20993,14 +21080,14 @@ ], "doc": "Get an advanced XML model with various property types", "operation": { - "$id": "1391", + "$id": "1397", "name": "GetXmlAdvancedModel", "isExactName": false, "doc": "Get an advanced XML model with various property types", "accessibility": "public", "parameters": [ { - "$id": "1392", + "$id": "1398", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -21016,7 +21103,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.GetXmlAdvancedModel.accept", "methodParameterSegments": [ { - "$id": "1393", + "$id": "1399", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -21043,7 +21130,7 @@ 200 ], "bodyType": { - "$ref": "634" + "$ref": "638" }, "headers": [ { @@ -21077,12 +21164,12 @@ }, "parameters": [ { - "$ref": "1393" + "$ref": "1399" } ], "response": { "type": { - "$ref": "634" + "$ref": "638" } }, "isOverride": false, @@ -21091,7 +21178,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.GetXmlAdvancedModel" }, { - "$id": "1394", + "$id": "1400", "kind": "basic", "name": "UpdateXmlAdvancedModel", "isExactName": false, @@ -21102,14 +21189,14 @@ ], "doc": "Update an advanced XML model with various property types", "operation": { - "$id": "1395", + "$id": "1401", "name": "UpdateXmlAdvancedModel", "isExactName": false, "doc": "Update an advanced XML model with various property types", "accessibility": "public", "parameters": [ { - "$id": "1396", + "$id": "1402", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -21125,7 +21212,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UpdateXmlAdvancedModel.contentType", "methodParameterSegments": [ { - "$id": "1397", + "$id": "1403", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -21146,7 +21233,7 @@ "isExactName": false }, { - "$id": "1398", + "$id": "1404", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -21162,7 +21249,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UpdateXmlAdvancedModel.accept", "methodParameterSegments": [ { - "$id": "1399", + "$id": "1405", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -21183,12 +21270,12 @@ "isExactName": false }, { - "$id": "1400", + "$id": "1406", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "634" + "$ref": "638" }, "isApiVersion": false, "contentTypes": [ @@ -21202,12 +21289,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UpdateXmlAdvancedModel.body", "methodParameterSegments": [ { - "$id": "1401", + "$id": "1407", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "634" + "$ref": "638" }, "location": "Body", "isApiVersion": false, @@ -21234,7 +21321,7 @@ 200 ], "bodyType": { - "$ref": "634" + "$ref": "638" }, "headers": [ { @@ -21271,18 +21358,18 @@ }, "parameters": [ { - "$ref": "1401" + "$ref": "1407" }, { - "$ref": "1397" + "$ref": "1403" }, { - "$ref": "1399" + "$ref": "1405" } ], "response": { "type": { - "$ref": "634" + "$ref": "638" } }, "isOverride": false, @@ -21291,7 +21378,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UpdateXmlAdvancedModel" }, { - "$id": "1402", + "$id": "1408", "kind": "basic", "name": "uploadCat", "isExactName": false, @@ -21301,13 +21388,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1403", + "$id": "1409", "name": "uploadCat", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1404", + "$id": "1410", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -21323,7 +21410,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.uploadCat.contentType", "methodParameterSegments": [ { - "$id": "1405", + "$id": "1411", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -21344,12 +21431,12 @@ "isExactName": false }, { - "$id": "1406", + "$id": "1412", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "730" + "$ref": "734" }, "isApiVersion": false, "contentTypes": [ @@ -21363,12 +21450,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.uploadCat.body", "methodParameterSegments": [ { - "$id": "1407", + "$id": "1413", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "730" + "$ref": "734" }, "location": "Body", "isApiVersion": false, @@ -21410,10 +21497,10 @@ }, "parameters": [ { - "$ref": "1405" + "$ref": "1411" }, { - "$ref": "1407" + "$ref": "1413" } ], "response": {}, @@ -21423,7 +21510,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.uploadCat" }, { - "$id": "1408", + "$id": "1414", "kind": "basic", "name": "sendJsonLines", "isExactName": false, @@ -21433,13 +21520,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1409", + "$id": "1415", "name": "sendJsonLines", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1410", + "$id": "1416", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -21455,16 +21542,16 @@ "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.contentType", "methodParameterSegments": [ { - "$id": "1411", + "$id": "1417", "kind": "method", "name": "stream", "serializedName": "stream", "type": { - "$id": "1412", + "$id": "1418", "kind": "streaming", "name": "JsonlStreamStreamingItem", "valueType": { - "$ref": "775" + "$ref": "779" }, "streamKind": "jsonl", "contentTypes": [ @@ -21483,7 +21570,7 @@ "isExactName": false }, { - "$id": "1413", + "$id": "1419", "kind": "method", "name": "contentType", "serializedName": "contentType", @@ -21504,16 +21591,16 @@ "isExactName": false }, { - "$id": "1414", + "$id": "1420", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$id": "1415", + "$id": "1421", "kind": "streaming", "name": "JsonlStreamStreamingItem", "valueType": { - "$ref": "775" + "$ref": "779" }, "streamKind": "jsonl", "contentTypes": [ @@ -21533,15 +21620,15 @@ "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.body", "methodParameterSegments": [ { - "$ref": "1411" + "$ref": "1417" }, { - "$id": "1416", + "$id": "1422", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1138" + "$ref": "1144" }, "location": "", "isApiVersion": false, @@ -21587,7 +21674,7 @@ }, "parameters": [ { - "$ref": "1411" + "$ref": "1417" } ], "response": {}, @@ -21597,7 +21684,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sendJsonLines" }, { - "$id": "1417", + "$id": "1423", "kind": "basic", "name": "receiveJsonLines", "isExactName": false, @@ -21607,13 +21694,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1418", + "$id": "1424", "name": "receiveJsonLines", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1419", + "$id": "1425", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -21629,7 +21716,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveJsonLines.accept", "methodParameterSegments": [ { - "$id": "1420", + "$id": "1426", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -21656,11 +21743,11 @@ 200 ], "bodyType": { - "$id": "1421", + "$id": "1427", "kind": "streaming", "name": "JsonlStreamStreamingItem", "valueType": { - "$ref": "775" + "$ref": "779" }, "streamKind": "jsonl", "contentTypes": [ @@ -21700,16 +21787,16 @@ }, "parameters": [ { - "$ref": "1420" + "$ref": "1426" } ], "response": { "type": { - "$id": "1422", + "$id": "1428", "kind": "streaming", "name": "JsonlStreamStreamingItem", "valueType": { - "$ref": "775" + "$ref": "779" }, "streamKind": "jsonl", "contentTypes": [ @@ -21724,7 +21811,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveJsonLines" }, { - "$id": "1423", + "$id": "1429", "kind": "basic", "name": "receiveSse", "isExactName": false, @@ -21734,13 +21821,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1424", + "$id": "1430", "name": "receiveSse", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1425", + "$id": "1431", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -21756,7 +21843,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveSse.accept", "methodParameterSegments": [ { - "$id": "1426", + "$id": "1432", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -21783,16 +21870,16 @@ 200 ], "bodyType": { - "$id": "1427", + "$id": "1433", "kind": "streaming", "name": "SSEStreamSampleEvents", "valueType": { - "$id": "1428", + "$id": "1434", "kind": "union", "name": "SampleEvents", "variantTypes": [ { - "$ref": "775" + "$ref": "779" }, { "$ref": "238" @@ -21837,16 +21924,16 @@ }, "parameters": [ { - "$ref": "1426" + "$ref": "1432" } ], "response": { "type": { - "$id": "1429", + "$id": "1435", "kind": "streaming", "name": "SSEStreamSampleEvents", "valueType": { - "$ref": "1428" + "$ref": "1434" }, "streamKind": "sse", "contentTypes": [ @@ -21862,7 +21949,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveSse" }, { - "$id": "1430", + "$id": "1436", "kind": "basic", "name": "receiveExperimentalJsonLines", "isExactName": false, @@ -21872,13 +21959,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1431", + "$id": "1437", "name": "receiveExperimentalJsonLines", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1432", + "$id": "1438", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -21894,7 +21981,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveExperimentalJsonLines.accept", "methodParameterSegments": [ { - "$id": "1433", + "$id": "1439", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -21921,11 +22008,11 @@ 200 ], "bodyType": { - "$id": "1434", + "$id": "1440", "kind": "streaming", "name": "JsonlStreamPreviewDetails", "valueType": { - "$ref": "778" + "$ref": "782" }, "streamKind": "jsonl", "contentTypes": [ @@ -21965,16 +22052,16 @@ }, "parameters": [ { - "$ref": "1433" + "$ref": "1439" } ], "response": { "type": { - "$id": "1435", + "$id": "1441", "kind": "streaming", "name": "JsonlStreamPreviewDetails", "valueType": { - "$ref": "778" + "$ref": "782" }, "streamKind": "jsonl", "contentTypes": [ @@ -21989,7 +22076,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveExperimentalJsonLines" }, { - "$id": "1436", + "$id": "1442", "kind": "basic", "name": "getAcronymParameters", "isExactName": false, @@ -22000,19 +22087,19 @@ ], "doc": "Send acronym-named path, query, and header parameters.", "operation": { - "$id": "1437", + "$id": "1443", "name": "getAcronymParameters", "isExactName": false, "doc": "Send acronym-named path, query, and header parameters.", "accessibility": "public", "parameters": [ { - "$id": "1438", + "$id": "1444", "kind": "path", "name": "targetDbName", "serializedName": "targetDbName", "type": { - "$id": "1439", + "$id": "1445", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22030,12 +22117,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getAcronymParameters.targetDbName", "methodParameterSegments": [ { - "$id": "1440", + "$id": "1446", "kind": "method", "name": "targetDbName", "serializedName": "targetDbName", "type": { - "$id": "1441", + "$id": "1447", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22055,12 +22142,12 @@ "isExactName": false }, { - "$id": "1442", + "$id": "1448", "kind": "query", "name": "sourceIpAddress", "serializedName": "sourceIpAddress", "type": { - "$id": "1443", + "$id": "1449", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22075,12 +22162,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1444", + "$id": "1450", "kind": "method", "name": "sourceIpAddress", "serializedName": "sourceIpAddress", "type": { - "$id": "1445", + "$id": "1451", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22100,12 +22187,12 @@ "isExactName": false }, { - "$id": "1446", + "$id": "1452", "kind": "header", "name": "guestOsType", "serializedName": "X-Guest-OS-Type", "type": { - "$id": "1447", + "$id": "1453", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22120,12 +22207,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getAcronymParameters.guestOsType", "methodParameterSegments": [ { - "$id": "1448", + "$id": "1454", "kind": "method", "name": "guestOsType", "serializedName": "X-Guest-OS-Type", "type": { - "$id": "1449", + "$id": "1455", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22167,13 +22254,13 @@ }, "parameters": [ { - "$ref": "1440" + "$ref": "1446" }, { - "$ref": "1444" + "$ref": "1450" }, { - "$ref": "1448" + "$ref": "1454" } ], "response": {}, @@ -22183,7 +22270,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getAcronymParameters" }, { - "$id": "1450", + "$id": "1456", "kind": "basic", "name": "setAcronymAddresses", "isExactName": false, @@ -22194,19 +22281,19 @@ ], "doc": "Send parameters with leading IP version acronyms.", "operation": { - "$id": "1451", + "$id": "1457", "name": "setAcronymAddresses", "isExactName": false, "doc": "Send parameters with leading IP version acronyms.", "accessibility": "public", "parameters": [ { - "$id": "1452", + "$id": "1458", "kind": "query", "name": "ipV4Address", "serializedName": "ipV4Address", "type": { - "$id": "1453", + "$id": "1459", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22221,12 +22308,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1454", + "$id": "1460", "kind": "method", "name": "ipV4Address", "serializedName": "ipV4Address", "type": { - "$id": "1455", + "$id": "1461", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22246,12 +22333,12 @@ "isExactName": false }, { - "$id": "1456", + "$id": "1462", "kind": "query", "name": "ipV6Address", "serializedName": "ipV6Address", "type": { - "$id": "1457", + "$id": "1463", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22266,12 +22353,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1458", + "$id": "1464", "kind": "method", "name": "ipV6Address", "serializedName": "ipV6Address", "type": { - "$id": "1459", + "$id": "1465", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22313,10 +22400,10 @@ }, "parameters": [ { - "$ref": "1454" + "$ref": "1460" }, { - "$ref": "1458" + "$ref": "1464" } ], "response": {}, @@ -22328,12 +22415,12 @@ ], "parameters": [ { - "$id": "1460", + "$id": "1466", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1461", + "$id": "1467", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -22349,7 +22436,7 @@ "isExactName": false }, { - "$ref": "1334" + "$ref": "1340" } ], "initializedBy": 1, @@ -22361,14 +22448,14 @@ ], "children": [ { - "$id": "1462", + "$id": "1468", "kind": "client", "name": "ExperimentalSamples", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1463", + "$id": "1469", "kind": "basic", "name": "read", "isExactName": false, @@ -22378,13 +22465,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1464", + "$id": "1470", "name": "read", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1465", + "$id": "1471", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -22400,7 +22487,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ExperimentalSamples.read.accept", "methodParameterSegments": [ { - "$id": "1466", + "$id": "1472", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -22427,7 +22514,7 @@ 200 ], "bodyType": { - "$ref": "780" + "$ref": "784" }, "headers": [], "isErrorResponse": false, @@ -22453,12 +22540,12 @@ }, "parameters": [ { - "$ref": "1466" + "$ref": "1472" } ], "response": { "type": { - "$ref": "780" + "$ref": "784" } }, "isOverride": false, @@ -22467,7 +22554,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ExperimentalSamples.read" }, { - "$id": "1467", + "$id": "1473", "kind": "paging", "name": "list", "isExactName": false, @@ -22477,13 +22564,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1468", + "$id": "1474", "name": "list", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1469", + "$id": "1475", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -22499,7 +22586,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ExperimentalSamples.list.accept", "methodParameterSegments": [ { - "$id": "1470", + "$id": "1476", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -22526,7 +22613,7 @@ 200 ], "bodyType": { - "$ref": "783" + "$ref": "787" }, "headers": [], "isErrorResponse": false, @@ -22552,12 +22639,12 @@ }, "parameters": [ { - "$ref": "1470" + "$ref": "1476" } ], "response": { "type": { - "$ref": "785" + "$ref": "789" }, "resultSegments": [ "items" @@ -22577,12 +22664,12 @@ ], "parameters": [ { - "$id": "1471", + "$id": "1477", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1472", + "$id": "1478", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -22606,7 +22693,7 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1139" + "$ref": "1145" }, "isMultiServiceClient": false, "experimental": { @@ -22615,14 +22702,14 @@ } }, { - "$id": "1473", + "$id": "1479", "kind": "client", "name": "AnimalOperations", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1474", + "$id": "1480", "kind": "basic", "name": "updatePetAsAnimal", "isExactName": false, @@ -22633,14 +22720,14 @@ ], "doc": "Update a pet as an animal", "operation": { - "$id": "1475", + "$id": "1481", "name": "updatePetAsAnimal", "isExactName": false, "doc": "Update a pet as an animal", "accessibility": "public", "parameters": [ { - "$id": "1476", + "$id": "1482", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -22657,7 +22744,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal.contentType", "methodParameterSegments": [ { - "$id": "1477", + "$id": "1483", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -22679,7 +22766,7 @@ "isExactName": false }, { - "$id": "1478", + "$id": "1484", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -22695,7 +22782,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal.accept", "methodParameterSegments": [ { - "$id": "1479", + "$id": "1485", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -22716,12 +22803,12 @@ "isExactName": false }, { - "$id": "1480", + "$id": "1486", "kind": "body", "name": "animal", "serializedName": "animal", "type": { - "$ref": "786" + "$ref": "790" }, "isApiVersion": false, "contentTypes": [ @@ -22735,12 +22822,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal.animal", "methodParameterSegments": [ { - "$id": "1481", + "$id": "1487", "kind": "method", "name": "animal", "serializedName": "animal", "type": { - "$ref": "786" + "$ref": "790" }, "location": "Body", "isApiVersion": false, @@ -22767,7 +22854,7 @@ 200 ], "bodyType": { - "$ref": "786" + "$ref": "790" }, "headers": [], "isErrorResponse": false, @@ -22796,18 +22883,18 @@ }, "parameters": [ { - "$ref": "1481" + "$ref": "1487" }, { - "$ref": "1477" + "$ref": "1483" }, { - "$ref": "1479" + "$ref": "1485" } ], "response": { "type": { - "$ref": "786" + "$ref": "790" } }, "isOverride": false, @@ -22816,7 +22903,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal" }, { - "$id": "1482", + "$id": "1488", "kind": "basic", "name": "updateDogAsAnimal", "isExactName": false, @@ -22827,14 +22914,14 @@ ], "doc": "Update a dog as an animal", "operation": { - "$id": "1483", + "$id": "1489", "name": "updateDogAsAnimal", "isExactName": false, "doc": "Update a dog as an animal", "accessibility": "public", "parameters": [ { - "$id": "1484", + "$id": "1490", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -22851,7 +22938,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updateDogAsAnimal.contentType", "methodParameterSegments": [ { - "$id": "1485", + "$id": "1491", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -22873,7 +22960,7 @@ "isExactName": false }, { - "$id": "1486", + "$id": "1492", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -22889,7 +22976,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updateDogAsAnimal.accept", "methodParameterSegments": [ { - "$id": "1487", + "$id": "1493", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -22910,12 +22997,12 @@ "isExactName": false }, { - "$id": "1488", + "$id": "1494", "kind": "body", "name": "animal", "serializedName": "animal", "type": { - "$ref": "786" + "$ref": "790" }, "isApiVersion": false, "contentTypes": [ @@ -22929,12 +23016,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updateDogAsAnimal.animal", "methodParameterSegments": [ { - "$id": "1489", + "$id": "1495", "kind": "method", "name": "animal", "serializedName": "animal", "type": { - "$ref": "786" + "$ref": "790" }, "location": "Body", "isApiVersion": false, @@ -22961,7 +23048,7 @@ 200 ], "bodyType": { - "$ref": "786" + "$ref": "790" }, "headers": [], "isErrorResponse": false, @@ -22990,18 +23077,18 @@ }, "parameters": [ { - "$ref": "1489" + "$ref": "1495" }, { - "$ref": "1485" + "$ref": "1491" }, { - "$ref": "1487" + "$ref": "1493" } ], "response": { "type": { - "$ref": "786" + "$ref": "790" } }, "isOverride": false, @@ -23012,12 +23099,12 @@ ], "parameters": [ { - "$id": "1490", + "$id": "1496", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1491", + "$id": "1497", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -23041,19 +23128,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1139" + "$ref": "1145" }, "isMultiServiceClient": false }, { - "$id": "1492", + "$id": "1498", "kind": "client", "name": "PetOperations", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1493", + "$id": "1499", "kind": "basic", "name": "updatePetAsPet", "isExactName": false, @@ -23064,14 +23151,14 @@ ], "doc": "Update a pet as a pet", "operation": { - "$id": "1494", + "$id": "1500", "name": "updatePetAsPet", "isExactName": false, "doc": "Update a pet as a pet", "accessibility": "public", "parameters": [ { - "$id": "1495", + "$id": "1501", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -23088,7 +23175,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet.contentType", "methodParameterSegments": [ { - "$id": "1496", + "$id": "1502", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -23110,7 +23197,7 @@ "isExactName": false }, { - "$id": "1497", + "$id": "1503", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -23126,7 +23213,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet.accept", "methodParameterSegments": [ { - "$id": "1498", + "$id": "1504", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -23147,12 +23234,12 @@ "isExactName": false }, { - "$id": "1499", + "$id": "1505", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "791" + "$ref": "795" }, "isApiVersion": false, "contentTypes": [ @@ -23166,12 +23253,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet.pet", "methodParameterSegments": [ { - "$id": "1500", + "$id": "1506", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "791" + "$ref": "795" }, "location": "Body", "isApiVersion": false, @@ -23198,7 +23285,7 @@ 200 ], "bodyType": { - "$ref": "791" + "$ref": "795" }, "headers": [], "isErrorResponse": false, @@ -23227,18 +23314,18 @@ }, "parameters": [ { - "$ref": "1500" + "$ref": "1506" }, { - "$ref": "1496" + "$ref": "1502" }, { - "$ref": "1498" + "$ref": "1504" } ], "response": { "type": { - "$ref": "791" + "$ref": "795" } }, "isOverride": false, @@ -23247,7 +23334,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet" }, { - "$id": "1501", + "$id": "1507", "kind": "basic", "name": "updateDogAsPet", "isExactName": false, @@ -23258,14 +23345,14 @@ ], "doc": "Update a dog as a pet", "operation": { - "$id": "1502", + "$id": "1508", "name": "updateDogAsPet", "isExactName": false, "doc": "Update a dog as a pet", "accessibility": "public", "parameters": [ { - "$id": "1503", + "$id": "1509", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -23282,7 +23369,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updateDogAsPet.contentType", "methodParameterSegments": [ { - "$id": "1504", + "$id": "1510", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -23304,7 +23391,7 @@ "isExactName": false }, { - "$id": "1505", + "$id": "1511", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -23320,7 +23407,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updateDogAsPet.accept", "methodParameterSegments": [ { - "$id": "1506", + "$id": "1512", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -23341,12 +23428,12 @@ "isExactName": false }, { - "$id": "1507", + "$id": "1513", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "791" + "$ref": "795" }, "isApiVersion": false, "contentTypes": [ @@ -23360,12 +23447,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updateDogAsPet.pet", "methodParameterSegments": [ { - "$id": "1508", + "$id": "1514", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "791" + "$ref": "795" }, "location": "Body", "isApiVersion": false, @@ -23392,7 +23479,7 @@ 200 ], "bodyType": { - "$ref": "791" + "$ref": "795" }, "headers": [], "isErrorResponse": false, @@ -23421,18 +23508,18 @@ }, "parameters": [ { - "$ref": "1508" + "$ref": "1514" }, { - "$ref": "1504" + "$ref": "1510" }, { - "$ref": "1506" + "$ref": "1512" } ], "response": { "type": { - "$ref": "791" + "$ref": "795" } }, "isOverride": false, @@ -23443,12 +23530,12 @@ ], "parameters": [ { - "$id": "1509", + "$id": "1515", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1510", + "$id": "1516", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -23472,19 +23559,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1139" + "$ref": "1145" }, "isMultiServiceClient": false }, { - "$id": "1511", + "$id": "1517", "kind": "client", "name": "DogOperations", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1512", + "$id": "1518", "kind": "basic", "name": "updateDogAsDog", "isExactName": false, @@ -23495,14 +23582,14 @@ ], "doc": "Update a dog as a dog", "operation": { - "$id": "1513", + "$id": "1519", "name": "updateDogAsDog", "isExactName": false, "doc": "Update a dog as a dog", "accessibility": "public", "parameters": [ { - "$id": "1514", + "$id": "1520", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -23519,7 +23606,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DogOperations.updateDogAsDog.contentType", "methodParameterSegments": [ { - "$id": "1515", + "$id": "1521", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -23541,7 +23628,7 @@ "isExactName": false }, { - "$id": "1516", + "$id": "1522", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -23557,7 +23644,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DogOperations.updateDogAsDog.accept", "methodParameterSegments": [ { - "$id": "1517", + "$id": "1523", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -23578,12 +23665,12 @@ "isExactName": false }, { - "$id": "1518", + "$id": "1524", "kind": "body", "name": "dog", "serializedName": "dog", "type": { - "$ref": "795" + "$ref": "799" }, "isApiVersion": false, "contentTypes": [ @@ -23597,12 +23684,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DogOperations.updateDogAsDog.dog", "methodParameterSegments": [ { - "$id": "1519", + "$id": "1525", "kind": "method", "name": "dog", "serializedName": "dog", "type": { - "$ref": "795" + "$ref": "799" }, "location": "Body", "isApiVersion": false, @@ -23629,7 +23716,7 @@ 200 ], "bodyType": { - "$ref": "795" + "$ref": "799" }, "headers": [], "isErrorResponse": false, @@ -23658,18 +23745,18 @@ }, "parameters": [ { - "$ref": "1519" + "$ref": "1525" }, { - "$ref": "1515" + "$ref": "1521" }, { - "$ref": "1517" + "$ref": "1523" } ], "response": { "type": { - "$ref": "795" + "$ref": "799" } }, "isOverride": false, @@ -23680,12 +23767,12 @@ ], "parameters": [ { - "$id": "1520", + "$id": "1526", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1521", + "$id": "1527", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -23709,19 +23796,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1139" + "$ref": "1145" }, "isMultiServiceClient": false }, { - "$id": "1522", + "$id": "1528", "kind": "client", "name": "PlantOperations", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1523", + "$id": "1529", "kind": "basic", "name": "getTree", "isExactName": false, @@ -23732,14 +23819,14 @@ ], "doc": "Get a tree as a plant", "operation": { - "$id": "1524", + "$id": "1530", "name": "getTree", "isExactName": false, "doc": "Get a tree as a plant", "accessibility": "public", "parameters": [ { - "$id": "1525", + "$id": "1531", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -23755,7 +23842,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTree.accept", "methodParameterSegments": [ { - "$id": "1526", + "$id": "1532", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -23782,7 +23869,7 @@ 200 ], "bodyType": { - "$ref": "799" + "$ref": "803" }, "headers": [ { @@ -23816,12 +23903,12 @@ }, "parameters": [ { - "$ref": "1526" + "$ref": "1532" } ], "response": { "type": { - "$ref": "799" + "$ref": "803" } }, "isOverride": false, @@ -23830,7 +23917,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTree" }, { - "$id": "1527", + "$id": "1533", "kind": "basic", "name": "getTreeAsJson", "isExactName": false, @@ -23841,14 +23928,14 @@ ], "doc": "Get a tree as a plant", "operation": { - "$id": "1528", + "$id": "1534", "name": "getTreeAsJson", "isExactName": false, "doc": "Get a tree as a plant", "accessibility": "public", "parameters": [ { - "$id": "1529", + "$id": "1535", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -23864,7 +23951,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeAsJson.accept", "methodParameterSegments": [ { - "$id": "1530", + "$id": "1536", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -23891,7 +23978,7 @@ 200 ], "bodyType": { - "$ref": "799" + "$ref": "803" }, "headers": [ { @@ -23925,12 +24012,12 @@ }, "parameters": [ { - "$ref": "1530" + "$ref": "1536" } ], "response": { "type": { - "$ref": "799" + "$ref": "803" } }, "isOverride": false, @@ -23939,7 +24026,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeAsJson" }, { - "$id": "1531", + "$id": "1537", "kind": "basic", "name": "updateTree", "isExactName": false, @@ -23950,14 +24037,14 @@ ], "doc": "Update a tree as a plant", "operation": { - "$id": "1532", + "$id": "1538", "name": "updateTree", "isExactName": false, "doc": "Update a tree as a plant", "accessibility": "public", "parameters": [ { - "$id": "1533", + "$id": "1539", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -23973,7 +24060,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTree.contentType", "methodParameterSegments": [ { - "$id": "1534", + "$id": "1540", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -23994,7 +24081,7 @@ "isExactName": false }, { - "$id": "1535", + "$id": "1541", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -24010,7 +24097,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTree.accept", "methodParameterSegments": [ { - "$id": "1536", + "$id": "1542", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -24031,12 +24118,12 @@ "isExactName": false }, { - "$id": "1537", + "$id": "1543", "kind": "body", "name": "tree", "serializedName": "tree", "type": { - "$ref": "799" + "$ref": "803" }, "isApiVersion": false, "contentTypes": [ @@ -24050,12 +24137,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTree.tree", "methodParameterSegments": [ { - "$id": "1538", + "$id": "1544", "kind": "method", "name": "tree", "serializedName": "tree", "type": { - "$ref": "799" + "$ref": "803" }, "location": "Body", "isApiVersion": false, @@ -24082,7 +24169,7 @@ 200 ], "bodyType": { - "$ref": "799" + "$ref": "803" }, "headers": [ { @@ -24119,18 +24206,18 @@ }, "parameters": [ { - "$ref": "1538" + "$ref": "1544" }, { - "$ref": "1534" + "$ref": "1540" }, { - "$ref": "1536" + "$ref": "1542" } ], "response": { "type": { - "$ref": "799" + "$ref": "803" } }, "isOverride": false, @@ -24139,7 +24226,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTree" }, { - "$id": "1539", + "$id": "1545", "kind": "basic", "name": "updateTreeAsJson", "isExactName": false, @@ -24150,14 +24237,14 @@ ], "doc": "Update a tree as a plant", "operation": { - "$id": "1540", + "$id": "1546", "name": "updateTreeAsJson", "isExactName": false, "doc": "Update a tree as a plant", "accessibility": "public", "parameters": [ { - "$id": "1541", + "$id": "1547", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -24173,7 +24260,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson.contentType", "methodParameterSegments": [ { - "$id": "1542", + "$id": "1548", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -24194,7 +24281,7 @@ "isExactName": false }, { - "$id": "1543", + "$id": "1549", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -24210,7 +24297,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson.accept", "methodParameterSegments": [ { - "$id": "1544", + "$id": "1550", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -24231,12 +24318,12 @@ "isExactName": false }, { - "$id": "1545", + "$id": "1551", "kind": "body", "name": "tree", "serializedName": "tree", "type": { - "$ref": "799" + "$ref": "803" }, "isApiVersion": false, "contentTypes": [ @@ -24250,12 +24337,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson.tree", "methodParameterSegments": [ { - "$id": "1546", + "$id": "1552", "kind": "method", "name": "tree", "serializedName": "tree", "type": { - "$ref": "799" + "$ref": "803" }, "location": "Body", "isApiVersion": false, @@ -24282,7 +24369,7 @@ 200 ], "bodyType": { - "$ref": "799" + "$ref": "803" }, "headers": [ { @@ -24319,34 +24406,143 @@ }, "parameters": [ { - "$ref": "1546" + "$ref": "1552" }, { - "$ref": "1542" + "$ref": "1548" }, { - "$ref": "1544" + "$ref": "1550" } ], "response": { "type": { - "$ref": "799" + "$ref": "803" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson" + }, + { + "$id": "1553", + "kind": "basic", + "name": "getTreeContainer", + "isExactName": false, + "accessibility": "public", + "apiVersions": [ + "2024-07-16-preview", + "2024-08-16-preview" + ], + "doc": "Get an XML-only container that nests a tree, which also supports JSON", + "operation": { + "$id": "1554", + "name": "getTreeContainer", + "isExactName": false, + "doc": "Get an XML-only container that nests a tree, which also supports JSON", + "accessibility": "public", + "parameters": [ + { + "$id": "1555", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "294" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeContainer.accept", + "methodParameterSegments": [ + { + "$id": "1556", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "294" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeContainer.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "819" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "296" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ], + "serializationOptions": { + "xml": { + "name": "" + } + } + } + ], + "httpMethod": "GET", + "uri": "{sampleTypeSpecUrl}", + "path": "/plants/tree/container", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeContainer", + "decorators": [], + "namespace": "SampleTypeSpec" + }, + "parameters": [ + { + "$ref": "1556" + } + ], + "response": { + "type": { + "$ref": "819" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeContainer" } ], "parameters": [ { - "$id": "1547", + "$id": "1557", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1548", + "$id": "1558", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -24370,19 +24566,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1139" + "$ref": "1145" }, "isMultiServiceClient": false }, { - "$id": "1549", + "$id": "1559", "kind": "client", "name": "Metrics", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1550", + "$id": "1560", "kind": "basic", "name": "getWidgetMetrics", "isExactName": false, @@ -24393,19 +24589,19 @@ ], "doc": "Get Widget metrics for given day of week", "operation": { - "$id": "1551", + "$id": "1561", "name": "getWidgetMetrics", "isExactName": false, "doc": "Get Widget metrics for given day of week", "accessibility": "public", "parameters": [ { - "$id": "1552", + "$id": "1562", "kind": "path", "name": "metricsNamespace", "serializedName": "metricsNamespace", "type": { - "$id": "1553", + "$id": "1563", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24423,12 +24619,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Metrics.getWidgetMetrics.metricsNamespace", "methodParameterSegments": [ { - "$id": "1554", + "$id": "1564", "kind": "method", "name": "metricsNamespace", "serializedName": "metricsNamespace", "type": { - "$id": "1555", + "$id": "1565", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24448,7 +24644,7 @@ "isExactName": false }, { - "$id": "1556", + "$id": "1566", "kind": "path", "name": "day", "serializedName": "day", @@ -24467,7 +24663,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Metrics.getWidgetMetrics.day", "methodParameterSegments": [ { - "$id": "1557", + "$id": "1567", "kind": "method", "name": "day", "serializedName": "day", @@ -24488,12 +24684,12 @@ "isExactName": false }, { - "$id": "1558", + "$id": "1568", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "294" + "$ref": "298" }, "isApiVersion": false, "optional": false, @@ -24504,12 +24700,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Metrics.getWidgetMetrics.accept", "methodParameterSegments": [ { - "$id": "1559", + "$id": "1569", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "294" + "$ref": "298" }, "location": "Header", "isApiVersion": false, @@ -24531,7 +24727,7 @@ 200 ], "bodyType": { - "$ref": "815" + "$ref": "821" }, "headers": [], "isErrorResponse": false, @@ -24557,15 +24753,15 @@ }, "parameters": [ { - "$ref": "1557" + "$ref": "1567" }, { - "$ref": "1559" + "$ref": "1569" } ], "response": { "type": { - "$ref": "815" + "$ref": "821" } }, "isOverride": false, @@ -24576,12 +24772,12 @@ ], "parameters": [ { - "$id": "1560", + "$id": "1570", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1561", + "$id": "1571", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -24597,7 +24793,7 @@ "isExactName": false }, { - "$ref": "1554" + "$ref": "1564" } ], "initializedBy": 3, @@ -24608,19 +24804,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1139" + "$ref": "1145" }, "isMultiServiceClient": false }, { - "$id": "1562", + "$id": "1572", "kind": "client", "name": "Notebooks", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1563", + "$id": "1573", "kind": "basic", "name": "getNotebook", "isExactName": false, @@ -24631,19 +24827,19 @@ ], "doc": "Get a notebook by name", "operation": { - "$id": "1564", + "$id": "1574", "name": "getNotebook", "isExactName": false, "doc": "Get a notebook by name", "accessibility": "public", "parameters": [ { - "$id": "1565", + "$id": "1575", "kind": "path", "name": "notebookName", "serializedName": "notebookName", "type": { - "$id": "1566", + "$id": "1576", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24661,12 +24857,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Notebooks.getNotebook.notebookName", "methodParameterSegments": [ { - "$id": "1567", + "$id": "1577", "kind": "method", "name": "notebook", "serializedName": "notebook", "type": { - "$id": "1568", + "$id": "1578", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24687,12 +24883,12 @@ "isExactName": false }, { - "$id": "1569", + "$id": "1579", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "296" + "$ref": "300" }, "isApiVersion": false, "optional": false, @@ -24703,12 +24899,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Notebooks.getNotebook.accept", "methodParameterSegments": [ { - "$id": "1570", + "$id": "1580", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "296" + "$ref": "300" }, "location": "Header", "isApiVersion": false, @@ -24730,7 +24926,7 @@ 200 ], "bodyType": { - "$ref": "820" + "$ref": "826" }, "headers": [], "isErrorResponse": false, @@ -24756,12 +24952,12 @@ }, "parameters": [ { - "$ref": "1570" + "$ref": "1580" } ], "response": { "type": { - "$ref": "820" + "$ref": "826" } }, "isOverride": false, @@ -24772,12 +24968,12 @@ ], "parameters": [ { - "$id": "1571", + "$id": "1581", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1572", + "$id": "1582", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -24793,7 +24989,7 @@ "isExactName": false }, { - "$ref": "1567" + "$ref": "1577" } ], "initializedBy": 3, @@ -24804,19 +25000,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1139" + "$ref": "1145" }, "isMultiServiceClient": false }, { - "$id": "1573", + "$id": "1583", "kind": "client", "name": "UnionExtends", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1574", + "$id": "1584", "kind": "basic", "name": "echo", "isExactName": false, @@ -24826,19 +25022,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1575", + "$id": "1585", "name": "echo", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1576", + "$id": "1586", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "298" + "$ref": "302" }, "isApiVersion": false, "optional": false, @@ -24849,13 +25045,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echo.contentType", "methodParameterSegments": [ { - "$id": "1577", + "$id": "1587", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "298" + "$ref": "302" }, "location": "Header", "isApiVersion": false, @@ -24871,12 +25067,12 @@ "isExactName": false }, { - "$id": "1578", + "$id": "1588", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "300" + "$ref": "304" }, "isApiVersion": false, "optional": false, @@ -24887,12 +25083,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echo.accept", "methodParameterSegments": [ { - "$id": "1579", + "$id": "1589", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "300" + "$ref": "304" }, "location": "Header", "isApiVersion": false, @@ -24908,12 +25104,12 @@ "isExactName": false }, { - "$id": "1580", + "$id": "1590", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "842" + "$ref": "848" }, "isApiVersion": false, "contentTypes": [ @@ -24927,12 +25123,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echo.pet", "methodParameterSegments": [ { - "$id": "1581", + "$id": "1591", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "842" + "$ref": "848" }, "location": "Body", "isApiVersion": false, @@ -24959,7 +25155,7 @@ 200 ], "bodyType": { - "$ref": "842" + "$ref": "848" }, "headers": [], "isErrorResponse": false, @@ -24988,18 +25184,18 @@ }, "parameters": [ { - "$ref": "1581" + "$ref": "1591" }, { - "$ref": "1577" + "$ref": "1587" }, { - "$ref": "1579" + "$ref": "1589" } ], "response": { "type": { - "$ref": "842" + "$ref": "848" } }, "isOverride": false, @@ -25008,7 +25204,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echo" }, { - "$id": "1582", + "$id": "1592", "kind": "basic", "name": "readXmlUnion", "isExactName": false, @@ -25018,18 +25214,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1583", + "$id": "1593", "name": "readXmlUnion", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1584", + "$id": "1594", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "302" + "$ref": "306" }, "isApiVersion": false, "optional": false, @@ -25040,12 +25236,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.readXmlUnion.contentType", "methodParameterSegments": [ { - "$id": "1585", + "$id": "1595", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "302" + "$ref": "306" }, "location": "Header", "isApiVersion": false, @@ -25061,12 +25257,12 @@ "isExactName": false }, { - "$id": "1586", + "$id": "1596", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "306" + "$ref": "310" }, "isApiVersion": false, "optional": false, @@ -25077,12 +25273,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.readXmlUnion.accept", "methodParameterSegments": [ { - "$id": "1587", + "$id": "1597", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "306" + "$ref": "310" }, "location": "Header", "isApiVersion": false, @@ -25098,30 +25294,30 @@ "isExactName": false }, { - "$id": "1588", + "$id": "1598", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1589", + "$id": "1599", "kind": "union", "name": "XmlUnionPets", "variantTypes": [ { - "$ref": "834" + "$ref": "840" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "835" + "$ref": "841" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "834" + "$ref": "840" } } }, @@ -25137,12 +25333,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.readXmlUnion.pet", "methodParameterSegments": [ { - "$id": "1590", + "$id": "1600", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1589" + "$ref": "1599" }, "location": "Body", "isApiVersion": false, @@ -25169,14 +25365,14 @@ 200 ], "bodyType": { - "$ref": "1589" + "$ref": "1599" }, "headers": [ { "name": "contentType", "nameInResponse": "content-type", "type": { - "$ref": "308" + "$ref": "312" } } ], @@ -25206,18 +25402,18 @@ }, "parameters": [ { - "$ref": "1590" + "$ref": "1600" }, { - "$ref": "1585" + "$ref": "1595" }, { - "$ref": "1587" + "$ref": "1597" } ], "response": { "type": { - "$ref": "1589" + "$ref": "1599" } }, "isOverride": false, @@ -25226,7 +25422,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.readXmlUnion" }, { - "$id": "1591", + "$id": "1601", "kind": "basic", "name": "echoContainer", "isExactName": false, @@ -25236,19 +25432,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1592", + "$id": "1602", "name": "echoContainer", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1593", + "$id": "1603", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "310" + "$ref": "314" }, "isApiVersion": false, "optional": false, @@ -25259,13 +25455,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoContainer.contentType", "methodParameterSegments": [ { - "$id": "1594", + "$id": "1604", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "310" + "$ref": "314" }, "location": "Header", "isApiVersion": false, @@ -25281,12 +25477,12 @@ "isExactName": false }, { - "$id": "1595", + "$id": "1605", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "312" + "$ref": "316" }, "isApiVersion": false, "optional": false, @@ -25297,12 +25493,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoContainer.accept", "methodParameterSegments": [ { - "$id": "1596", + "$id": "1606", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "312" + "$ref": "316" }, "location": "Header", "isApiVersion": false, @@ -25318,12 +25514,12 @@ "isExactName": false }, { - "$id": "1597", + "$id": "1607", "kind": "body", "name": "container", "serializedName": "container", "type": { - "$ref": "840" + "$ref": "846" }, "isApiVersion": false, "contentTypes": [ @@ -25337,12 +25533,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoContainer.container", "methodParameterSegments": [ { - "$id": "1598", + "$id": "1608", "kind": "method", "name": "container", "serializedName": "container", "type": { - "$ref": "840" + "$ref": "846" }, "location": "Body", "isApiVersion": false, @@ -25369,7 +25565,7 @@ 200 ], "bodyType": { - "$ref": "840" + "$ref": "846" }, "headers": [], "isErrorResponse": false, @@ -25398,18 +25594,18 @@ }, "parameters": [ { - "$ref": "1598" + "$ref": "1608" }, { - "$ref": "1594" + "$ref": "1604" }, { - "$ref": "1596" + "$ref": "1606" } ], "response": { "type": { - "$ref": "840" + "$ref": "846" } }, "isOverride": false, @@ -25418,7 +25614,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoContainer" }, { - "$id": "1599", + "$id": "1609", "kind": "basic", "name": "echoRawContainer", "isExactName": false, @@ -25428,19 +25624,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1600", + "$id": "1610", "name": "echoRawContainer", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1601", + "$id": "1611", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "314" + "$ref": "318" }, "isApiVersion": false, "optional": false, @@ -25451,13 +25647,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRawContainer.contentType", "methodParameterSegments": [ { - "$id": "1602", + "$id": "1612", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "314" + "$ref": "318" }, "location": "Header", "isApiVersion": false, @@ -25473,12 +25669,12 @@ "isExactName": false }, { - "$id": "1603", + "$id": "1613", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "316" + "$ref": "320" }, "isApiVersion": false, "optional": false, @@ -25489,12 +25685,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRawContainer.accept", "methodParameterSegments": [ { - "$id": "1604", + "$id": "1614", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "316" + "$ref": "320" }, "location": "Header", "isApiVersion": false, @@ -25510,12 +25706,12 @@ "isExactName": false }, { - "$id": "1605", + "$id": "1615", "kind": "body", "name": "container", "serializedName": "container", "type": { - "$ref": "852" + "$ref": "858" }, "isApiVersion": false, "contentTypes": [ @@ -25529,12 +25725,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRawContainer.container", "methodParameterSegments": [ { - "$id": "1606", + "$id": "1616", "kind": "method", "name": "container", "serializedName": "container", "type": { - "$ref": "852" + "$ref": "858" }, "location": "Body", "isApiVersion": false, @@ -25561,7 +25757,7 @@ 200 ], "bodyType": { - "$ref": "852" + "$ref": "858" }, "headers": [], "isErrorResponse": false, @@ -25590,18 +25786,18 @@ }, "parameters": [ { - "$ref": "1606" + "$ref": "1616" }, { - "$ref": "1602" + "$ref": "1612" }, { - "$ref": "1604" + "$ref": "1614" } ], "response": { "type": { - "$ref": "852" + "$ref": "858" } }, "isOverride": false, @@ -25610,7 +25806,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRawContainer" }, { - "$id": "1607", + "$id": "1617", "kind": "basic", "name": "echoNestedOuter", "isExactName": false, @@ -25620,19 +25816,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1608", + "$id": "1618", "name": "echoNestedOuter", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1609", + "$id": "1619", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "318" + "$ref": "322" }, "isApiVersion": false, "optional": false, @@ -25643,13 +25839,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedOuter.contentType", "methodParameterSegments": [ { - "$id": "1610", + "$id": "1620", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "318" + "$ref": "322" }, "location": "Header", "isApiVersion": false, @@ -25665,12 +25861,12 @@ "isExactName": false }, { - "$id": "1611", + "$id": "1621", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "320" + "$ref": "324" }, "isApiVersion": false, "optional": false, @@ -25681,12 +25877,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedOuter.accept", "methodParameterSegments": [ { - "$id": "1612", + "$id": "1622", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "320" + "$ref": "324" }, "location": "Header", "isApiVersion": false, @@ -25702,30 +25898,30 @@ "isExactName": false }, { - "$id": "1613", + "$id": "1623", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1614", + "$id": "1624", "kind": "union", "name": "CollisionPets", "variantTypes": [ { - "$ref": "860" + "$ref": "866" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "861" + "$ref": "867" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "mammal": { - "$ref": "860" + "$ref": "866" } } }, @@ -25741,12 +25937,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedOuter.pet", "methodParameterSegments": [ { - "$id": "1615", + "$id": "1625", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1614" + "$ref": "1624" }, "location": "Body", "isApiVersion": false, @@ -25773,7 +25969,7 @@ 200 ], "bodyType": { - "$ref": "1614" + "$ref": "1624" }, "headers": [], "isErrorResponse": false, @@ -25802,18 +25998,18 @@ }, "parameters": [ { - "$ref": "1615" + "$ref": "1625" }, { - "$ref": "1610" + "$ref": "1620" }, { - "$ref": "1612" + "$ref": "1622" } ], "response": { "type": { - "$ref": "1614" + "$ref": "1624" } }, "isOverride": false, @@ -25822,7 +26018,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedOuter" }, { - "$id": "1616", + "$id": "1626", "kind": "basic", "name": "echoNestedInner", "isExactName": false, @@ -25832,19 +26028,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1617", + "$id": "1627", "name": "echoNestedInner", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1618", + "$id": "1628", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "322" + "$ref": "326" }, "isApiVersion": false, "optional": false, @@ -25855,13 +26051,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedInner.contentType", "methodParameterSegments": [ { - "$id": "1619", + "$id": "1629", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "322" + "$ref": "326" }, "location": "Header", "isApiVersion": false, @@ -25877,12 +26073,12 @@ "isExactName": false }, { - "$id": "1620", + "$id": "1630", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "324" + "$ref": "328" }, "isApiVersion": false, "optional": false, @@ -25893,12 +26089,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedInner.accept", "methodParameterSegments": [ { - "$id": "1621", + "$id": "1631", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "324" + "$ref": "328" }, "location": "Header", "isApiVersion": false, @@ -25914,30 +26110,30 @@ "isExactName": false }, { - "$id": "1622", + "$id": "1632", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1623", + "$id": "1633", "kind": "union", "name": "NestedPets", "variantTypes": [ { - "$ref": "864" + "$ref": "870" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "860" + "$ref": "866" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "864" + "$ref": "870" } } }, @@ -25953,12 +26149,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedInner.pet", "methodParameterSegments": [ { - "$id": "1624", + "$id": "1634", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1623" + "$ref": "1633" }, "location": "Body", "isApiVersion": false, @@ -25985,7 +26181,7 @@ 200 ], "bodyType": { - "$ref": "1623" + "$ref": "1633" }, "headers": [], "isErrorResponse": false, @@ -26014,18 +26210,18 @@ }, "parameters": [ { - "$ref": "1624" + "$ref": "1634" }, { - "$ref": "1619" + "$ref": "1629" }, { - "$ref": "1621" + "$ref": "1631" } ], "response": { "type": { - "$ref": "1623" + "$ref": "1633" } }, "isOverride": false, @@ -26034,7 +26230,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedInner" }, { - "$id": "1625", + "$id": "1635", "kind": "basic", "name": "echoNestedSameName", "isExactName": false, @@ -26044,19 +26240,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1626", + "$id": "1636", "name": "echoNestedSameName", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1627", + "$id": "1637", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "326" + "$ref": "330" }, "isApiVersion": false, "optional": false, @@ -26067,13 +26263,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedSameName.contentType", "methodParameterSegments": [ { - "$id": "1628", + "$id": "1638", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "326" + "$ref": "330" }, "location": "Header", "isApiVersion": false, @@ -26089,12 +26285,12 @@ "isExactName": false }, { - "$id": "1629", + "$id": "1639", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "328" + "$ref": "332" }, "isApiVersion": false, "optional": false, @@ -26105,12 +26301,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedSameName.accept", "methodParameterSegments": [ { - "$id": "1630", + "$id": "1640", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "328" + "$ref": "332" }, "location": "Header", "isApiVersion": false, @@ -26126,30 +26322,30 @@ "isExactName": false }, { - "$id": "1631", + "$id": "1641", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1632", + "$id": "1642", "kind": "union", "name": "CollisionPets", "variantTypes": [ { - "$ref": "864" + "$ref": "870" } ], "namespace": "SampleTypeSpec.NestedUnions", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "860" + "$ref": "866" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "864" + "$ref": "870" } } }, @@ -26165,12 +26361,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedSameName.pet", "methodParameterSegments": [ { - "$id": "1633", + "$id": "1643", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1632" + "$ref": "1642" }, "location": "Body", "isApiVersion": false, @@ -26197,7 +26393,7 @@ 200 ], "bodyType": { - "$ref": "1632" + "$ref": "1642" }, "headers": [], "isErrorResponse": false, @@ -26226,18 +26422,18 @@ }, "parameters": [ { - "$ref": "1633" + "$ref": "1643" }, { - "$ref": "1628" + "$ref": "1638" }, { - "$ref": "1630" + "$ref": "1640" } ], "response": { "type": { - "$ref": "1632" + "$ref": "1642" } }, "isOverride": false, @@ -26246,7 +26442,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedSameName" }, { - "$id": "1634", + "$id": "1644", "kind": "basic", "name": "echoXmlPets", "isExactName": false, @@ -26256,19 +26452,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1635", + "$id": "1645", "name": "echoXmlPets", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1636", + "$id": "1646", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "330" + "$ref": "334" }, "isApiVersion": false, "optional": false, @@ -26279,13 +26475,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlPets.contentType", "methodParameterSegments": [ { - "$id": "1637", + "$id": "1647", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "330" + "$ref": "334" }, "location": "Header", "isApiVersion": false, @@ -26301,12 +26497,12 @@ "isExactName": false }, { - "$id": "1638", + "$id": "1648", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "332" + "$ref": "336" }, "isApiVersion": false, "optional": false, @@ -26317,12 +26513,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlPets.accept", "methodParameterSegments": [ { - "$id": "1639", + "$id": "1649", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "332" + "$ref": "336" }, "location": "Header", "isApiVersion": false, @@ -26338,12 +26534,12 @@ "isExactName": false }, { - "$id": "1640", + "$id": "1650", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1589" + "$ref": "1599" }, "isApiVersion": false, "contentTypes": [ @@ -26357,12 +26553,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlPets.pet", "methodParameterSegments": [ { - "$id": "1641", + "$id": "1651", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1589" + "$ref": "1599" }, "location": "Body", "isApiVersion": false, @@ -26389,7 +26585,7 @@ 200 ], "bodyType": { - "$ref": "1589" + "$ref": "1599" }, "headers": [], "isErrorResponse": false, @@ -26418,18 +26614,18 @@ }, "parameters": [ { - "$ref": "1641" + "$ref": "1651" }, { - "$ref": "1637" + "$ref": "1647" }, { - "$ref": "1639" + "$ref": "1649" } ], "response": { "type": { - "$ref": "1589" + "$ref": "1599" } }, "isOverride": false, @@ -26438,7 +26634,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlPets" }, { - "$id": "1642", + "$id": "1652", "kind": "basic", "name": "echoXmlBase", "isExactName": false, @@ -26448,18 +26644,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1643", + "$id": "1653", "name": "echoXmlBase", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1644", + "$id": "1654", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "334" + "$ref": "338" }, "isApiVersion": false, "optional": false, @@ -26470,12 +26666,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlBase.contentType", "methodParameterSegments": [ { - "$id": "1645", + "$id": "1655", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "334" + "$ref": "338" }, "location": "Header", "isApiVersion": false, @@ -26491,12 +26687,12 @@ "isExactName": false }, { - "$id": "1646", + "$id": "1656", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "338" + "$ref": "342" }, "isApiVersion": false, "optional": false, @@ -26507,12 +26703,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlBase.accept", "methodParameterSegments": [ { - "$id": "1647", + "$id": "1657", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "338" + "$ref": "342" }, "location": "Header", "isApiVersion": false, @@ -26528,12 +26724,12 @@ "isExactName": false }, { - "$id": "1648", + "$id": "1658", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "835" + "$ref": "841" }, "isApiVersion": false, "contentTypes": [ @@ -26547,12 +26743,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlBase.pet", "methodParameterSegments": [ { - "$id": "1649", + "$id": "1659", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "835" + "$ref": "841" }, "location": "Body", "isApiVersion": false, @@ -26579,14 +26775,14 @@ 200 ], "bodyType": { - "$ref": "835" + "$ref": "841" }, "headers": [ { "name": "contentType", "nameInResponse": "content-type", "type": { - "$ref": "340" + "$ref": "344" } } ], @@ -26616,18 +26812,18 @@ }, "parameters": [ { - "$ref": "1649" + "$ref": "1659" }, { - "$ref": "1645" + "$ref": "1655" }, { - "$ref": "1647" + "$ref": "1657" } ], "response": { "type": { - "$ref": "835" + "$ref": "841" } }, "isOverride": false, @@ -26636,7 +26832,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlBase" }, { - "$id": "1650", + "$id": "1660", "kind": "basic", "name": "echoMappedUnion", "isExactName": false, @@ -26646,19 +26842,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1651", + "$id": "1661", "name": "echoMappedUnion", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1652", + "$id": "1662", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "342" + "$ref": "346" }, "isApiVersion": false, "optional": false, @@ -26669,13 +26865,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedUnion.contentType", "methodParameterSegments": [ { - "$id": "1653", + "$id": "1663", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "342" + "$ref": "346" }, "location": "Header", "isApiVersion": false, @@ -26691,12 +26887,12 @@ "isExactName": false }, { - "$id": "1654", + "$id": "1664", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "344" + "$ref": "348" }, "isApiVersion": false, "optional": false, @@ -26707,12 +26903,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedUnion.accept", "methodParameterSegments": [ { - "$id": "1655", + "$id": "1665", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "344" + "$ref": "348" }, "location": "Header", "isApiVersion": false, @@ -26728,17 +26924,17 @@ "isExactName": false }, { - "$id": "1656", + "$id": "1666", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1657", + "$id": "1667", "kind": "union", "name": "MappedUnionPets", "variantTypes": [ { - "$ref": "867" + "$ref": "873" } ], "namespace": "SampleTypeSpec", @@ -26748,13 +26944,13 @@ }, "isExactName": false, "baseModel": { - "$ref": "868" + "$ref": "874" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "867" + "$ref": "873" } } }, @@ -26770,12 +26966,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedUnion.pet", "methodParameterSegments": [ { - "$id": "1658", + "$id": "1668", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1657" + "$ref": "1667" }, "location": "Body", "isApiVersion": false, @@ -26802,7 +26998,7 @@ 200 ], "bodyType": { - "$ref": "1657" + "$ref": "1667" }, "headers": [], "isErrorResponse": false, @@ -26831,18 +27027,18 @@ }, "parameters": [ { - "$ref": "1658" + "$ref": "1668" }, { - "$ref": "1653" + "$ref": "1663" }, { - "$ref": "1655" + "$ref": "1665" } ], "response": { "type": { - "$ref": "1657" + "$ref": "1667" } }, "isOverride": false, @@ -26851,7 +27047,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedUnion" }, { - "$id": "1659", + "$id": "1669", "kind": "basic", "name": "echoMappedBase", "isExactName": false, @@ -26861,19 +27057,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1660", + "$id": "1670", "name": "echoMappedBase", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1661", + "$id": "1671", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "346" + "$ref": "350" }, "isApiVersion": false, "optional": false, @@ -26884,13 +27080,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedBase.contentType", "methodParameterSegments": [ { - "$id": "1662", + "$id": "1672", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "346" + "$ref": "350" }, "location": "Header", "isApiVersion": false, @@ -26906,12 +27102,12 @@ "isExactName": false }, { - "$id": "1663", + "$id": "1673", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "348" + "$ref": "352" }, "isApiVersion": false, "optional": false, @@ -26922,12 +27118,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedBase.accept", "methodParameterSegments": [ { - "$id": "1664", + "$id": "1674", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "348" + "$ref": "352" }, "location": "Header", "isApiVersion": false, @@ -26943,30 +27139,30 @@ "isExactName": false }, { - "$id": "1665", + "$id": "1675", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1666", + "$id": "1676", "kind": "union", "name": "ExternalBasePets", "variantTypes": [ { - "$ref": "871" + "$ref": "877" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "872" + "$ref": "878" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "871" + "$ref": "877" } } }, @@ -26982,12 +27178,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedBase.pet", "methodParameterSegments": [ { - "$id": "1667", + "$id": "1677", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1666" + "$ref": "1676" }, "location": "Body", "isApiVersion": false, @@ -27014,7 +27210,7 @@ 200 ], "bodyType": { - "$ref": "1666" + "$ref": "1676" }, "headers": [], "isErrorResponse": false, @@ -27043,18 +27239,18 @@ }, "parameters": [ { - "$ref": "1667" + "$ref": "1677" }, { - "$ref": "1662" + "$ref": "1672" }, { - "$ref": "1664" + "$ref": "1674" } ], "response": { "type": { - "$ref": "1666" + "$ref": "1676" } }, "isOverride": false, @@ -27063,7 +27259,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedBase" }, { - "$id": "1668", + "$id": "1678", "kind": "basic", "name": "echoMappedVariant", "isExactName": false, @@ -27073,19 +27269,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1669", + "$id": "1679", "name": "echoMappedVariant", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1670", + "$id": "1680", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "350" + "$ref": "354" }, "isApiVersion": false, "optional": false, @@ -27096,13 +27292,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedVariant.contentType", "methodParameterSegments": [ { - "$id": "1671", + "$id": "1681", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "350" + "$ref": "354" }, "location": "Header", "isApiVersion": false, @@ -27118,12 +27314,12 @@ "isExactName": false }, { - "$id": "1672", + "$id": "1682", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "352" + "$ref": "356" }, "isApiVersion": false, "optional": false, @@ -27134,12 +27330,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedVariant.accept", "methodParameterSegments": [ { - "$id": "1673", + "$id": "1683", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "352" + "$ref": "356" }, "location": "Header", "isApiVersion": false, @@ -27155,30 +27351,30 @@ "isExactName": false }, { - "$id": "1674", + "$id": "1684", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1675", + "$id": "1685", "kind": "union", "name": "ExternalVariantPets", "variantTypes": [ { - "$ref": "875" + "$ref": "881" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "876" + "$ref": "882" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "875" + "$ref": "881" } } }, @@ -27194,12 +27390,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedVariant.pet", "methodParameterSegments": [ { - "$id": "1676", + "$id": "1686", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1675" + "$ref": "1685" }, "location": "Body", "isApiVersion": false, @@ -27226,7 +27422,7 @@ 200 ], "bodyType": { - "$ref": "1675" + "$ref": "1685" }, "headers": [], "isErrorResponse": false, @@ -27255,18 +27451,18 @@ }, "parameters": [ { - "$ref": "1676" + "$ref": "1686" }, { - "$ref": "1671" + "$ref": "1681" }, { - "$ref": "1673" + "$ref": "1683" } ], "response": { "type": { - "$ref": "1675" + "$ref": "1685" } }, "isOverride": false, @@ -27275,7 +27471,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedVariant" }, { - "$id": "1677", + "$id": "1687", "kind": "basic", "name": "echoDirectBase", "isExactName": false, @@ -27285,19 +27481,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1678", + "$id": "1688", "name": "echoDirectBase", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1679", + "$id": "1689", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "354" + "$ref": "358" }, "isApiVersion": false, "optional": false, @@ -27308,13 +27504,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectBase.contentType", "methodParameterSegments": [ { - "$id": "1680", + "$id": "1690", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "354" + "$ref": "358" }, "location": "Header", "isApiVersion": false, @@ -27330,12 +27526,12 @@ "isExactName": false }, { - "$id": "1681", + "$id": "1691", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "356" + "$ref": "360" }, "isApiVersion": false, "optional": false, @@ -27346,12 +27542,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectBase.accept", "methodParameterSegments": [ { - "$id": "1682", + "$id": "1692", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "356" + "$ref": "360" }, "location": "Header", "isApiVersion": false, @@ -27367,12 +27563,12 @@ "isExactName": false }, { - "$id": "1683", + "$id": "1693", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "879" + "$ref": "885" }, "isApiVersion": false, "contentTypes": [ @@ -27386,12 +27582,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectBase.pet", "methodParameterSegments": [ { - "$id": "1684", + "$id": "1694", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "879" + "$ref": "885" }, "location": "Body", "isApiVersion": false, @@ -27418,7 +27614,7 @@ 200 ], "bodyType": { - "$ref": "879" + "$ref": "885" }, "headers": [], "isErrorResponse": false, @@ -27447,18 +27643,18 @@ }, "parameters": [ { - "$ref": "1684" + "$ref": "1694" }, { - "$ref": "1680" + "$ref": "1690" }, { - "$ref": "1682" + "$ref": "1692" } ], "response": { "type": { - "$ref": "879" + "$ref": "885" } }, "isOverride": false, @@ -27467,7 +27663,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectBase" }, { - "$id": "1685", + "$id": "1695", "kind": "basic", "name": "echoDirectUnion", "isExactName": false, @@ -27477,19 +27673,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1686", + "$id": "1696", "name": "echoDirectUnion", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1687", + "$id": "1697", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "358" + "$ref": "362" }, "isApiVersion": false, "optional": false, @@ -27500,13 +27696,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectUnion.contentType", "methodParameterSegments": [ { - "$id": "1688", + "$id": "1698", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "358" + "$ref": "362" }, "location": "Header", "isApiVersion": false, @@ -27522,12 +27718,12 @@ "isExactName": false }, { - "$id": "1689", + "$id": "1699", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "360" + "$ref": "364" }, "isApiVersion": false, "optional": false, @@ -27538,12 +27734,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectUnion.accept", "methodParameterSegments": [ { - "$id": "1690", + "$id": "1700", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "360" + "$ref": "364" }, "location": "Header", "isApiVersion": false, @@ -27559,30 +27755,30 @@ "isExactName": false }, { - "$id": "1691", + "$id": "1701", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1692", + "$id": "1702", "kind": "union", "name": "DirectPets", "variantTypes": [ { - "$ref": "886" + "$ref": "892" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "879" + "$ref": "885" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "886" + "$ref": "892" } } }, @@ -27598,12 +27794,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectUnion.pet", "methodParameterSegments": [ { - "$id": "1693", + "$id": "1703", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1692" + "$ref": "1702" }, "location": "Body", "isApiVersion": false, @@ -27630,7 +27826,7 @@ 200 ], "bodyType": { - "$ref": "1692" + "$ref": "1702" }, "headers": [], "isErrorResponse": false, @@ -27659,18 +27855,18 @@ }, "parameters": [ { - "$ref": "1693" + "$ref": "1703" }, { - "$ref": "1688" + "$ref": "1698" }, { - "$ref": "1690" + "$ref": "1700" } ], "response": { "type": { - "$ref": "1692" + "$ref": "1702" } }, "isOverride": false, @@ -27679,7 +27875,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectUnion" }, { - "$id": "1694", + "$id": "1704", "kind": "basic", "name": "echoDirectContainer", "isExactName": false, @@ -27689,19 +27885,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1695", + "$id": "1705", "name": "echoDirectContainer", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1696", + "$id": "1706", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "362" + "$ref": "366" }, "isApiVersion": false, "optional": false, @@ -27712,13 +27908,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectContainer.contentType", "methodParameterSegments": [ { - "$id": "1697", + "$id": "1707", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "362" + "$ref": "366" }, "location": "Header", "isApiVersion": false, @@ -27734,12 +27930,12 @@ "isExactName": false }, { - "$id": "1698", + "$id": "1708", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "364" + "$ref": "368" }, "isApiVersion": false, "optional": false, @@ -27750,12 +27946,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectContainer.accept", "methodParameterSegments": [ { - "$id": "1699", + "$id": "1709", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "364" + "$ref": "368" }, "location": "Header", "isApiVersion": false, @@ -27771,12 +27967,12 @@ "isExactName": false }, { - "$id": "1700", + "$id": "1710", "kind": "body", "name": "container", "serializedName": "container", "type": { - "$ref": "889" + "$ref": "895" }, "isApiVersion": false, "contentTypes": [ @@ -27790,12 +27986,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectContainer.container", "methodParameterSegments": [ { - "$id": "1701", + "$id": "1711", "kind": "method", "name": "container", "serializedName": "container", "type": { - "$ref": "889" + "$ref": "895" }, "location": "Body", "isApiVersion": false, @@ -27822,7 +28018,7 @@ 200 ], "bodyType": { - "$ref": "889" + "$ref": "895" }, "headers": [], "isErrorResponse": false, @@ -27851,18 +28047,18 @@ }, "parameters": [ { - "$ref": "1701" + "$ref": "1711" }, { - "$ref": "1697" + "$ref": "1707" }, { - "$ref": "1699" + "$ref": "1709" } ], "response": { "type": { - "$ref": "889" + "$ref": "895" } }, "isOverride": false, @@ -27871,7 +28067,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectContainer" }, { - "$id": "1702", + "$id": "1712", "kind": "basic", "name": "echoDynamicContainer", "isExactName": false, @@ -27881,19 +28077,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1703", + "$id": "1713", "name": "echoDynamicContainer", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1704", + "$id": "1714", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "366" + "$ref": "370" }, "isApiVersion": false, "optional": false, @@ -27904,13 +28100,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDynamicContainer.contentType", "methodParameterSegments": [ { - "$id": "1705", + "$id": "1715", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "366" + "$ref": "370" }, "location": "Header", "isApiVersion": false, @@ -27926,12 +28122,12 @@ "isExactName": false }, { - "$id": "1706", + "$id": "1716", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "368" + "$ref": "372" }, "isApiVersion": false, "optional": false, @@ -27942,12 +28138,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDynamicContainer.accept", "methodParameterSegments": [ { - "$id": "1707", + "$id": "1717", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "368" + "$ref": "372" }, "location": "Header", "isApiVersion": false, @@ -27963,12 +28159,12 @@ "isExactName": false }, { - "$id": "1708", + "$id": "1718", "kind": "body", "name": "container", "serializedName": "container", "type": { - "$ref": "891" + "$ref": "897" }, "isApiVersion": false, "contentTypes": [ @@ -27982,12 +28178,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDynamicContainer.container", "methodParameterSegments": [ { - "$id": "1709", + "$id": "1719", "kind": "method", "name": "container", "serializedName": "container", "type": { - "$ref": "891" + "$ref": "897" }, "location": "Body", "isApiVersion": false, @@ -28014,7 +28210,7 @@ 200 ], "bodyType": { - "$ref": "891" + "$ref": "897" }, "headers": [], "isErrorResponse": false, @@ -28043,18 +28239,18 @@ }, "parameters": [ { - "$ref": "1709" + "$ref": "1719" }, { - "$ref": "1705" + "$ref": "1715" }, { - "$ref": "1707" + "$ref": "1717" } ], "response": { "type": { - "$ref": "891" + "$ref": "897" } }, "isOverride": false, @@ -28063,7 +28259,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDynamicContainer" }, { - "$id": "1710", + "$id": "1720", "kind": "basic", "name": "echoDescendantMembers", "isExactName": false, @@ -28073,19 +28269,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1711", + "$id": "1721", "name": "echoDescendantMembers", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1712", + "$id": "1722", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "370" + "$ref": "374" }, "isApiVersion": false, "optional": false, @@ -28096,13 +28292,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantMembers.contentType", "methodParameterSegments": [ { - "$id": "1713", + "$id": "1723", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "370" + "$ref": "374" }, "location": "Header", "isApiVersion": false, @@ -28118,12 +28314,12 @@ "isExactName": false }, { - "$id": "1714", + "$id": "1724", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "372" + "$ref": "376" }, "isApiVersion": false, "optional": false, @@ -28134,12 +28330,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantMembers.accept", "methodParameterSegments": [ { - "$id": "1715", + "$id": "1725", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "372" + "$ref": "376" }, "location": "Header", "isApiVersion": false, @@ -28155,30 +28351,30 @@ "isExactName": false }, { - "$id": "1716", + "$id": "1726", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1717", + "$id": "1727", "kind": "union", "name": "DescendantPets", "variantTypes": [ { - "$ref": "908" + "$ref": "914" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "909" + "$ref": "915" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "908" + "$ref": "914" } } }, @@ -28194,12 +28390,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantMembers.pet", "methodParameterSegments": [ { - "$id": "1718", + "$id": "1728", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1717" + "$ref": "1727" }, "location": "Body", "isApiVersion": false, @@ -28226,7 +28422,7 @@ 200 ], "bodyType": { - "$ref": "1717" + "$ref": "1727" }, "headers": [], "isErrorResponse": false, @@ -28255,18 +28451,18 @@ }, "parameters": [ { - "$ref": "1718" + "$ref": "1728" }, { - "$ref": "1713" + "$ref": "1723" }, { - "$ref": "1715" + "$ref": "1725" } ], "response": { "type": { - "$ref": "1717" + "$ref": "1727" } }, "isOverride": false, @@ -28275,7 +28471,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantMembers" }, { - "$id": "1719", + "$id": "1729", "kind": "basic", "name": "echoMappedIntermediate", "isExactName": false, @@ -28285,19 +28481,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1720", + "$id": "1730", "name": "echoMappedIntermediate", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1721", + "$id": "1731", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "374" + "$ref": "378" }, "isApiVersion": false, "optional": false, @@ -28308,13 +28504,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedIntermediate.contentType", "methodParameterSegments": [ { - "$id": "1722", + "$id": "1732", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "374" + "$ref": "378" }, "location": "Header", "isApiVersion": false, @@ -28330,12 +28526,12 @@ "isExactName": false }, { - "$id": "1723", + "$id": "1733", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "376" + "$ref": "380" }, "isApiVersion": false, "optional": false, @@ -28346,12 +28542,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedIntermediate.accept", "methodParameterSegments": [ { - "$id": "1724", + "$id": "1734", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "376" + "$ref": "380" }, "location": "Header", "isApiVersion": false, @@ -28367,30 +28563,30 @@ "isExactName": false }, { - "$id": "1725", + "$id": "1735", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1726", + "$id": "1736", "kind": "union", "name": "IntermediatePets", "variantTypes": [ { - "$ref": "916" + "$ref": "922" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "918" + "$ref": "924" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "916" + "$ref": "922" } } }, @@ -28406,12 +28602,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedIntermediate.pet", "methodParameterSegments": [ { - "$id": "1727", + "$id": "1737", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1726" + "$ref": "1736" }, "location": "Body", "isApiVersion": false, @@ -28438,7 +28634,7 @@ 200 ], "bodyType": { - "$ref": "1726" + "$ref": "1736" }, "headers": [], "isErrorResponse": false, @@ -28467,18 +28663,18 @@ }, "parameters": [ { - "$ref": "1727" + "$ref": "1737" }, { - "$ref": "1722" + "$ref": "1732" }, { - "$ref": "1724" + "$ref": "1734" } ], "response": { "type": { - "$ref": "1726" + "$ref": "1736" } }, "isOverride": false, @@ -28487,7 +28683,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedIntermediate" }, { - "$id": "1728", + "$id": "1738", "kind": "basic", "name": "echoSerializeClassName", "isExactName": false, @@ -28497,19 +28693,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1729", + "$id": "1739", "name": "echoSerializeClassName", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1730", + "$id": "1740", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "378" + "$ref": "382" }, "isApiVersion": false, "optional": false, @@ -28520,13 +28716,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoSerializeClassName.contentType", "methodParameterSegments": [ { - "$id": "1731", + "$id": "1741", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "378" + "$ref": "382" }, "location": "Header", "isApiVersion": false, @@ -28542,12 +28738,12 @@ "isExactName": false }, { - "$id": "1732", + "$id": "1742", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "380" + "$ref": "384" }, "isApiVersion": false, "optional": false, @@ -28558,12 +28754,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoSerializeClassName.accept", "methodParameterSegments": [ { - "$id": "1733", + "$id": "1743", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "380" + "$ref": "384" }, "location": "Header", "isApiVersion": false, @@ -28579,30 +28775,30 @@ "isExactName": false }, { - "$id": "1734", + "$id": "1744", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1735", + "$id": "1745", "kind": "union", "name": "Pets", "variantTypes": [ { - "$ref": "921" + "$ref": "927" } ], "namespace": "SampleTypeSpec.SerializeClassNames", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "922" + "$ref": "928" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "921" + "$ref": "927" } } }, @@ -28618,12 +28814,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoSerializeClassName.pet", "methodParameterSegments": [ { - "$id": "1736", + "$id": "1746", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1735" + "$ref": "1745" }, "location": "Body", "isApiVersion": false, @@ -28650,7 +28846,7 @@ 200 ], "bodyType": { - "$ref": "1735" + "$ref": "1745" }, "headers": [], "isErrorResponse": false, @@ -28679,18 +28875,18 @@ }, "parameters": [ { - "$ref": "1736" + "$ref": "1746" }, { - "$ref": "1731" + "$ref": "1741" }, { - "$ref": "1733" + "$ref": "1743" } ], "response": { "type": { - "$ref": "1735" + "$ref": "1745" } }, "isOverride": false, @@ -28699,7 +28895,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoSerializeClassName" }, { - "$id": "1737", + "$id": "1747", "kind": "basic", "name": "echoDeserializeClassName", "isExactName": false, @@ -28709,19 +28905,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1738", + "$id": "1748", "name": "echoDeserializeClassName", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1739", + "$id": "1749", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "382" + "$ref": "386" }, "isApiVersion": false, "optional": false, @@ -28732,13 +28928,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDeserializeClassName.contentType", "methodParameterSegments": [ { - "$id": "1740", + "$id": "1750", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "382" + "$ref": "386" }, "location": "Header", "isApiVersion": false, @@ -28754,12 +28950,12 @@ "isExactName": false }, { - "$id": "1741", + "$id": "1751", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "384" + "$ref": "388" }, "isApiVersion": false, "optional": false, @@ -28770,12 +28966,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDeserializeClassName.accept", "methodParameterSegments": [ { - "$id": "1742", + "$id": "1752", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "384" + "$ref": "388" }, "location": "Header", "isApiVersion": false, @@ -28791,30 +28987,30 @@ "isExactName": false }, { - "$id": "1743", + "$id": "1753", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1744", + "$id": "1754", "kind": "union", "name": "Pets", "variantTypes": [ { - "$ref": "925" + "$ref": "931" } ], "namespace": "SampleTypeSpec.DeserializeClassNames", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "926" + "$ref": "932" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "925" + "$ref": "931" } } }, @@ -28830,12 +29026,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDeserializeClassName.pet", "methodParameterSegments": [ { - "$id": "1745", + "$id": "1755", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1744" + "$ref": "1754" }, "location": "Body", "isApiVersion": false, @@ -28862,7 +29058,7 @@ 200 ], "bodyType": { - "$ref": "1744" + "$ref": "1754" }, "headers": [], "isErrorResponse": false, @@ -28891,18 +29087,18 @@ }, "parameters": [ { - "$ref": "1745" + "$ref": "1755" }, { - "$ref": "1740" + "$ref": "1750" }, { - "$ref": "1742" + "$ref": "1752" } ], "response": { "type": { - "$ref": "1744" + "$ref": "1754" } }, "isOverride": false, @@ -28911,7 +29107,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDeserializeClassName" }, { - "$id": "1746", + "$id": "1756", "kind": "basic", "name": "echoCustomBase", "isExactName": false, @@ -28921,19 +29117,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1747", + "$id": "1757", "name": "echoCustomBase", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1748", + "$id": "1758", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "386" + "$ref": "390" }, "isApiVersion": false, "optional": false, @@ -28944,13 +29140,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomBase.contentType", "methodParameterSegments": [ { - "$id": "1749", + "$id": "1759", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "386" + "$ref": "390" }, "location": "Header", "isApiVersion": false, @@ -28966,12 +29162,12 @@ "isExactName": false }, { - "$id": "1750", + "$id": "1760", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "388" + "$ref": "392" }, "isApiVersion": false, "optional": false, @@ -28982,12 +29178,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomBase.accept", "methodParameterSegments": [ { - "$id": "1751", + "$id": "1761", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "388" + "$ref": "392" }, "location": "Header", "isApiVersion": false, @@ -29003,12 +29199,12 @@ "isExactName": false }, { - "$id": "1752", + "$id": "1762", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "935" + "$ref": "941" }, "isApiVersion": false, "contentTypes": [ @@ -29022,12 +29218,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomBase.pet", "methodParameterSegments": [ { - "$id": "1753", + "$id": "1763", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "935" + "$ref": "941" }, "location": "Body", "isApiVersion": false, @@ -29054,7 +29250,7 @@ 200 ], "bodyType": { - "$ref": "935" + "$ref": "941" }, "headers": [], "isErrorResponse": false, @@ -29083,18 +29279,18 @@ }, "parameters": [ { - "$ref": "1753" + "$ref": "1763" }, { - "$ref": "1749" + "$ref": "1759" }, { - "$ref": "1751" + "$ref": "1761" } ], "response": { "type": { - "$ref": "935" + "$ref": "941" } }, "isOverride": false, @@ -29103,7 +29299,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomBase" }, { - "$id": "1754", + "$id": "1764", "kind": "basic", "name": "echoCustomContainer", "isExactName": false, @@ -29113,19 +29309,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1755", + "$id": "1765", "name": "echoCustomContainer", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1756", + "$id": "1766", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "390" + "$ref": "394" }, "isApiVersion": false, "optional": false, @@ -29136,13 +29332,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomContainer.contentType", "methodParameterSegments": [ { - "$id": "1757", + "$id": "1767", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "390" + "$ref": "394" }, "location": "Header", "isApiVersion": false, @@ -29158,12 +29354,12 @@ "isExactName": false }, { - "$id": "1758", + "$id": "1768", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "392" + "$ref": "396" }, "isApiVersion": false, "optional": false, @@ -29174,12 +29370,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomContainer.accept", "methodParameterSegments": [ { - "$id": "1759", + "$id": "1769", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "392" + "$ref": "396" }, "location": "Header", "isApiVersion": false, @@ -29195,12 +29391,12 @@ "isExactName": false }, { - "$id": "1760", + "$id": "1770", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "930" + "$ref": "936" }, "isApiVersion": false, "contentTypes": [ @@ -29214,12 +29410,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomContainer.pet", "methodParameterSegments": [ { - "$id": "1761", + "$id": "1771", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "930" + "$ref": "936" }, "location": "Body", "isApiVersion": false, @@ -29246,7 +29442,7 @@ 200 ], "bodyType": { - "$ref": "930" + "$ref": "936" }, "headers": [], "isErrorResponse": false, @@ -29275,18 +29471,18 @@ }, "parameters": [ { - "$ref": "1761" + "$ref": "1771" }, { - "$ref": "1757" + "$ref": "1767" }, { - "$ref": "1759" + "$ref": "1769" } ], "response": { "type": { - "$ref": "930" + "$ref": "936" } }, "isOverride": false, @@ -29295,7 +29491,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomContainer" }, { - "$id": "1762", + "$id": "1772", "kind": "basic", "name": "echoCustomIntermediate", "isExactName": false, @@ -29305,19 +29501,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1763", + "$id": "1773", "name": "echoCustomIntermediate", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1764", + "$id": "1774", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "394" + "$ref": "398" }, "isApiVersion": false, "optional": false, @@ -29328,13 +29524,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomIntermediate.contentType", "methodParameterSegments": [ { - "$id": "1765", + "$id": "1775", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "394" + "$ref": "398" }, "location": "Header", "isApiVersion": false, @@ -29350,12 +29546,12 @@ "isExactName": false }, { - "$id": "1766", + "$id": "1776", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "396" + "$ref": "400" }, "isApiVersion": false, "optional": false, @@ -29366,12 +29562,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomIntermediate.accept", "methodParameterSegments": [ { - "$id": "1767", + "$id": "1777", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "396" + "$ref": "400" }, "location": "Header", "isApiVersion": false, @@ -29387,30 +29583,30 @@ "isExactName": false }, { - "$id": "1768", + "$id": "1778", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1769", + "$id": "1779", "kind": "union", "name": "CustomIntermediatePets", "variantTypes": [ { - "$ref": "938" + "$ref": "944" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "940" + "$ref": "946" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "938" + "$ref": "944" } } }, @@ -29426,12 +29622,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomIntermediate.pet", "methodParameterSegments": [ { - "$id": "1770", + "$id": "1780", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1769" + "$ref": "1779" }, "location": "Body", "isApiVersion": false, @@ -29458,7 +29654,7 @@ 200 ], "bodyType": { - "$ref": "1769" + "$ref": "1779" }, "headers": [], "isErrorResponse": false, @@ -29487,18 +29683,18 @@ }, "parameters": [ { - "$ref": "1770" + "$ref": "1780" }, { - "$ref": "1765" + "$ref": "1775" }, { - "$ref": "1767" + "$ref": "1777" } ], "response": { "type": { - "$ref": "1769" + "$ref": "1779" } }, "isOverride": false, @@ -29507,7 +29703,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomIntermediate" }, { - "$id": "1771", + "$id": "1781", "kind": "basic", "name": "echoRebasedVariants", "isExactName": false, @@ -29517,19 +29713,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1772", + "$id": "1782", "name": "echoRebasedVariants", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1773", + "$id": "1783", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "398" + "$ref": "402" }, "isApiVersion": false, "optional": false, @@ -29540,13 +29736,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedVariants.contentType", "methodParameterSegments": [ { - "$id": "1774", + "$id": "1784", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "398" + "$ref": "402" }, "location": "Header", "isApiVersion": false, @@ -29562,12 +29758,12 @@ "isExactName": false }, { - "$id": "1775", + "$id": "1785", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "400" + "$ref": "404" }, "isApiVersion": false, "optional": false, @@ -29578,12 +29774,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedVariants.accept", "methodParameterSegments": [ { - "$id": "1776", + "$id": "1786", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "400" + "$ref": "404" }, "location": "Header", "isApiVersion": false, @@ -29599,36 +29795,36 @@ "isExactName": false }, { - "$id": "1777", + "$id": "1787", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1778", + "$id": "1788", "kind": "union", "name": "RebasedPets", "variantTypes": [ { - "$ref": "943" + "$ref": "949" }, { - "$ref": "947" + "$ref": "953" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "944" + "$ref": "950" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "a": { - "$ref": "943" + "$ref": "949" }, "b": { - "$ref": "947" + "$ref": "953" } } }, @@ -29644,12 +29840,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedVariants.pet", "methodParameterSegments": [ { - "$id": "1779", + "$id": "1789", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1778" + "$ref": "1788" }, "location": "Body", "isApiVersion": false, @@ -29676,7 +29872,7 @@ 200 ], "bodyType": { - "$ref": "1778" + "$ref": "1788" }, "headers": [], "isErrorResponse": false, @@ -29705,18 +29901,18 @@ }, "parameters": [ { - "$ref": "1779" + "$ref": "1789" }, { - "$ref": "1774" + "$ref": "1784" }, { - "$ref": "1776" + "$ref": "1786" } ], "response": { "type": { - "$ref": "1778" + "$ref": "1788" } }, "isOverride": false, @@ -29725,7 +29921,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedVariants" }, { - "$id": "1780", + "$id": "1790", "kind": "basic", "name": "echoRebasedBase", "isExactName": false, @@ -29735,19 +29931,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1781", + "$id": "1791", "name": "echoRebasedBase", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1782", + "$id": "1792", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "402" + "$ref": "406" }, "isApiVersion": false, "optional": false, @@ -29758,13 +29954,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedBase.contentType", "methodParameterSegments": [ { - "$id": "1783", + "$id": "1793", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "402" + "$ref": "406" }, "location": "Header", "isApiVersion": false, @@ -29780,12 +29976,12 @@ "isExactName": false }, { - "$id": "1784", + "$id": "1794", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "404" + "$ref": "408" }, "isApiVersion": false, "optional": false, @@ -29796,12 +29992,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedBase.accept", "methodParameterSegments": [ { - "$id": "1785", + "$id": "1795", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "404" + "$ref": "408" }, "location": "Header", "isApiVersion": false, @@ -29817,30 +30013,30 @@ "isExactName": false }, { - "$id": "1786", + "$id": "1796", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1787", + "$id": "1797", "kind": "union", "name": "Pets", "variantTypes": [ { - "$ref": "948" + "$ref": "954" } ], "namespace": "SampleTypeSpec.RebasedBase", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "943" + "$ref": "949" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "a": { - "$ref": "948" + "$ref": "954" } } }, @@ -29856,12 +30052,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedBase.pet", "methodParameterSegments": [ { - "$id": "1788", + "$id": "1798", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1787" + "$ref": "1797" }, "location": "Body", "isApiVersion": false, @@ -29888,7 +30084,7 @@ 200 ], "bodyType": { - "$ref": "1787" + "$ref": "1797" }, "headers": [], "isErrorResponse": false, @@ -29917,18 +30113,18 @@ }, "parameters": [ { - "$ref": "1788" + "$ref": "1798" }, { - "$ref": "1783" + "$ref": "1793" }, { - "$ref": "1785" + "$ref": "1795" } ], "response": { "type": { - "$ref": "1787" + "$ref": "1797" } }, "isOverride": false, @@ -29937,7 +30133,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedBase" }, { - "$id": "1789", + "$id": "1799", "kind": "basic", "name": "echoRebasedDerived", "isExactName": false, @@ -29947,19 +30143,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1790", + "$id": "1800", "name": "echoRebasedDerived", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1791", + "$id": "1801", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "406" + "$ref": "410" }, "isApiVersion": false, "optional": false, @@ -29970,13 +30166,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedDerived.contentType", "methodParameterSegments": [ { - "$id": "1792", + "$id": "1802", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "406" + "$ref": "410" }, "location": "Header", "isApiVersion": false, @@ -29992,12 +30188,12 @@ "isExactName": false }, { - "$id": "1793", + "$id": "1803", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "408" + "$ref": "412" }, "isApiVersion": false, "optional": false, @@ -30008,12 +30204,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedDerived.accept", "methodParameterSegments": [ { - "$id": "1794", + "$id": "1804", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "408" + "$ref": "412" }, "location": "Header", "isApiVersion": false, @@ -30029,30 +30225,30 @@ "isExactName": false }, { - "$id": "1795", + "$id": "1805", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1796", + "$id": "1806", "kind": "union", "name": "Pets", "variantTypes": [ { - "$ref": "949" + "$ref": "955" } ], "namespace": "SampleTypeSpec.RebasedDerived", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "947" + "$ref": "953" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "b": { - "$ref": "949" + "$ref": "955" } } }, @@ -30068,12 +30264,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedDerived.pet", "methodParameterSegments": [ { - "$id": "1797", + "$id": "1807", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1796" + "$ref": "1806" }, "location": "Body", "isApiVersion": false, @@ -30100,7 +30296,7 @@ 200 ], "bodyType": { - "$ref": "1796" + "$ref": "1806" }, "headers": [], "isErrorResponse": false, @@ -30129,18 +30325,18 @@ }, "parameters": [ { - "$ref": "1797" + "$ref": "1807" }, { - "$ref": "1792" + "$ref": "1802" }, { - "$ref": "1794" + "$ref": "1804" } ], "response": { "type": { - "$ref": "1796" + "$ref": "1806" } }, "isOverride": false, @@ -30149,7 +30345,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedDerived" }, { - "$id": "1798", + "$id": "1808", "kind": "basic", "name": "echoDescendantDeserializer", "isExactName": false, @@ -30159,19 +30355,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1799", + "$id": "1809", "name": "echoDescendantDeserializer", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1800", + "$id": "1810", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "410" + "$ref": "414" }, "isApiVersion": false, "optional": false, @@ -30182,13 +30378,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantDeserializer.contentType", "methodParameterSegments": [ { - "$id": "1801", + "$id": "1811", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "410" + "$ref": "414" }, "location": "Header", "isApiVersion": false, @@ -30204,12 +30400,12 @@ "isExactName": false }, { - "$id": "1802", + "$id": "1812", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "412" + "$ref": "416" }, "isApiVersion": false, "optional": false, @@ -30220,12 +30416,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantDeserializer.accept", "methodParameterSegments": [ { - "$id": "1803", + "$id": "1813", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "412" + "$ref": "416" }, "location": "Header", "isApiVersion": false, @@ -30241,30 +30437,30 @@ "isExactName": false }, { - "$id": "1804", + "$id": "1814", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1805", + "$id": "1815", "kind": "union", "name": "Pets", "variantTypes": [ { - "$ref": "950" + "$ref": "956" } ], "namespace": "SampleTypeSpec.DescendantDeserializer", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "951" + "$ref": "957" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "pet": { - "$ref": "950" + "$ref": "956" } } }, @@ -30280,12 +30476,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantDeserializer.pet", "methodParameterSegments": [ { - "$id": "1806", + "$id": "1816", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1805" + "$ref": "1815" }, "location": "Body", "isApiVersion": false, @@ -30312,7 +30508,7 @@ 200 ], "bodyType": { - "$ref": "1805" + "$ref": "1815" }, "headers": [], "isErrorResponse": false, @@ -30341,18 +30537,18 @@ }, "parameters": [ { - "$ref": "1806" + "$ref": "1816" }, { - "$ref": "1801" + "$ref": "1811" }, { - "$ref": "1803" + "$ref": "1813" } ], "response": { "type": { - "$ref": "1805" + "$ref": "1815" } }, "isOverride": false, @@ -30361,7 +30557,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantDeserializer" }, { - "$id": "1807", + "$id": "1817", "kind": "basic", "name": "sendPets", "isExactName": false, @@ -30371,18 +30567,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1808", + "$id": "1818", "name": "sendPets", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1809", + "$id": "1819", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "414" + "$ref": "418" }, "isApiVersion": false, "optional": false, @@ -30393,16 +30589,16 @@ "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.contentType", "methodParameterSegments": [ { - "$id": "1810", + "$id": "1820", "kind": "method", "name": "stream", "serializedName": "stream", "type": { - "$id": "1811", + "$id": "1821", "kind": "streaming", "name": "JsonlStreamUnionPets", "valueType": { - "$ref": "842" + "$ref": "848" }, "streamKind": "jsonl", "contentTypes": [ @@ -30421,12 +30617,12 @@ "isExactName": false }, { - "$id": "1812", + "$id": "1822", "kind": "method", "name": "contentType", "serializedName": "contentType", "type": { - "$ref": "416" + "$ref": "420" }, "location": "", "isApiVersion": false, @@ -30442,16 +30638,16 @@ "isExactName": false }, { - "$id": "1813", + "$id": "1823", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$id": "1814", + "$id": "1824", "kind": "streaming", "name": "JsonlStreamUnionPets", "valueType": { - "$ref": "842" + "$ref": "848" }, "streamKind": "jsonl", "contentTypes": [ @@ -30471,15 +30667,15 @@ "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.body", "methodParameterSegments": [ { - "$ref": "1810" + "$ref": "1820" }, { - "$id": "1815", + "$id": "1825", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$id": "1816", + "$id": "1826", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "", @@ -30529,7 +30725,7 @@ }, "parameters": [ { - "$ref": "1810" + "$ref": "1820" } ], "response": {}, @@ -30539,7 +30735,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.sendPets" }, { - "$id": "1817", + "$id": "1827", "kind": "basic", "name": "sendBytes", "isExactName": false, @@ -30549,18 +30745,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1818", + "$id": "1828", "name": "sendBytes", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1819", + "$id": "1829", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "418" + "$ref": "422" }, "isApiVersion": false, "optional": false, @@ -30571,16 +30767,16 @@ "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.contentType", "methodParameterSegments": [ { - "$id": "1820", + "$id": "1830", "kind": "method", "name": "stream", "serializedName": "stream", "type": { - "$id": "1821", + "$id": "1831", "kind": "streaming", "name": "JsonlStream", "valueType": { - "$id": "1822", + "$id": "1832", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -30604,12 +30800,12 @@ "isExactName": false }, { - "$id": "1823", + "$id": "1833", "kind": "method", "name": "contentType", "serializedName": "contentType", "type": { - "$ref": "420" + "$ref": "424" }, "location": "", "isApiVersion": false, @@ -30625,16 +30821,16 @@ "isExactName": false }, { - "$id": "1824", + "$id": "1834", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$id": "1825", + "$id": "1835", "kind": "streaming", "name": "JsonlStream", "valueType": { - "$ref": "1822" + "$ref": "1832" }, "streamKind": "jsonl", "contentTypes": [ @@ -30654,15 +30850,15 @@ "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.body", "methodParameterSegments": [ { - "$ref": "1820" + "$ref": "1830" }, { - "$id": "1826", + "$id": "1836", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$id": "1827", + "$id": "1837", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "", @@ -30712,7 +30908,7 @@ }, "parameters": [ { - "$ref": "1820" + "$ref": "1830" } ], "response": {}, @@ -30722,7 +30918,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.sendBytes" }, { - "$id": "1828", + "$id": "1838", "kind": "basic", "name": "receivePets", "isExactName": false, @@ -30732,18 +30928,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1829", + "$id": "1839", "name": "receivePets", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1830", + "$id": "1840", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "422" + "$ref": "426" }, "isApiVersion": false, "optional": false, @@ -30754,12 +30950,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.receivePets.accept", "methodParameterSegments": [ { - "$id": "1831", + "$id": "1841", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "422" + "$ref": "426" }, "location": "Header", "isApiVersion": false, @@ -30781,11 +30977,11 @@ 200 ], "bodyType": { - "$id": "1832", + "$id": "1842", "kind": "streaming", "name": "JsonlStreamUnionPets", "valueType": { - "$ref": "842" + "$ref": "848" }, "streamKind": "jsonl", "contentTypes": [ @@ -30798,7 +30994,7 @@ "name": "contentType", "nameInResponse": "content-type", "type": { - "$ref": "424" + "$ref": "428" } } ], @@ -30825,16 +31021,16 @@ }, "parameters": [ { - "$ref": "1831" + "$ref": "1841" } ], "response": { "type": { - "$id": "1833", + "$id": "1843", "kind": "streaming", "name": "JsonlStreamUnionPets", "valueType": { - "$ref": "842" + "$ref": "848" }, "streamKind": "jsonl", "contentTypes": [ @@ -30849,7 +31045,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.receivePets" }, { - "$id": "1834", + "$id": "1844", "kind": "basic", "name": "echoPets", "isExactName": false, @@ -30859,19 +31055,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1835", + "$id": "1845", "name": "echoPets", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1836", + "$id": "1846", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "426" + "$ref": "430" }, "isApiVersion": false, "optional": false, @@ -30882,13 +31078,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoPets.contentType", "methodParameterSegments": [ { - "$id": "1837", + "$id": "1847", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "426" + "$ref": "430" }, "location": "Header", "isApiVersion": false, @@ -30904,12 +31100,12 @@ "isExactName": false }, { - "$id": "1838", + "$id": "1848", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "428" + "$ref": "432" }, "isApiVersion": false, "optional": false, @@ -30920,12 +31116,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoPets.accept", "methodParameterSegments": [ { - "$id": "1839", + "$id": "1849", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "428" + "$ref": "432" }, "location": "Header", "isApiVersion": false, @@ -30941,12 +31137,12 @@ "isExactName": false }, { - "$id": "1840", + "$id": "1850", "kind": "body", "name": "pets", "serializedName": "pets", "type": { - "$ref": "846" + "$ref": "852" }, "isApiVersion": false, "contentTypes": [ @@ -30960,12 +31156,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoPets.pets", "methodParameterSegments": [ { - "$id": "1841", + "$id": "1851", "kind": "method", "name": "pets", "serializedName": "pets", "type": { - "$ref": "846" + "$ref": "852" }, "location": "Body", "isApiVersion": false, @@ -30992,7 +31188,7 @@ 200 ], "bodyType": { - "$ref": "846" + "$ref": "852" }, "headers": [], "isErrorResponse": false, @@ -31021,18 +31217,18 @@ }, "parameters": [ { - "$ref": "1841" + "$ref": "1851" }, { - "$ref": "1837" + "$ref": "1847" }, { - "$ref": "1839" + "$ref": "1849" } ], "response": { "type": { - "$ref": "846" + "$ref": "852" } }, "isOverride": false, @@ -31041,7 +31237,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoPets" }, { - "$id": "1842", + "$id": "1852", "kind": "basic", "name": "echoLookup", "isExactName": false, @@ -31051,19 +31247,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1843", + "$id": "1853", "name": "echoLookup", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1844", + "$id": "1854", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "430" + "$ref": "434" }, "isApiVersion": false, "optional": false, @@ -31074,13 +31270,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoLookup.contentType", "methodParameterSegments": [ { - "$id": "1845", + "$id": "1855", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "430" + "$ref": "434" }, "location": "Header", "isApiVersion": false, @@ -31096,12 +31292,12 @@ "isExactName": false }, { - "$id": "1846", + "$id": "1856", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "432" + "$ref": "436" }, "isApiVersion": false, "optional": false, @@ -31112,12 +31308,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoLookup.accept", "methodParameterSegments": [ { - "$id": "1847", + "$id": "1857", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "432" + "$ref": "436" }, "location": "Header", "isApiVersion": false, @@ -31133,12 +31329,12 @@ "isExactName": false }, { - "$id": "1848", + "$id": "1858", "kind": "body", "name": "pets", "serializedName": "pets", "type": { - "$ref": "848" + "$ref": "854" }, "isApiVersion": false, "contentTypes": [ @@ -31152,12 +31348,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoLookup.pets", "methodParameterSegments": [ { - "$id": "1849", + "$id": "1859", "kind": "method", "name": "pets", "serializedName": "pets", "type": { - "$ref": "848" + "$ref": "854" }, "location": "Body", "isApiVersion": false, @@ -31184,7 +31380,7 @@ 200 ], "bodyType": { - "$ref": "848" + "$ref": "854" }, "headers": [], "isErrorResponse": false, @@ -31213,18 +31409,18 @@ }, "parameters": [ { - "$ref": "1849" + "$ref": "1859" }, { - "$ref": "1845" + "$ref": "1855" }, { - "$ref": "1847" + "$ref": "1857" } ], "response": { "type": { - "$ref": "848" + "$ref": "854" } }, "isOverride": false, @@ -31233,7 +31429,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoLookup" }, { - "$id": "1850", + "$id": "1860", "kind": "basic", "name": "getCat", "isExactName": false, @@ -31243,18 +31439,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1851", + "$id": "1861", "name": "getCat", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1852", + "$id": "1862", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "434" + "$ref": "438" }, "isApiVersion": false, "optional": false, @@ -31265,12 +31461,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.getCat.accept", "methodParameterSegments": [ { - "$id": "1853", + "$id": "1863", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "434" + "$ref": "438" }, "location": "Header", "isApiVersion": false, @@ -31292,7 +31488,7 @@ 200 ], "bodyType": { - "$ref": "825" + "$ref": "831" }, "headers": [], "isErrorResponse": false, @@ -31318,12 +31514,12 @@ }, "parameters": [ { - "$ref": "1853" + "$ref": "1863" } ], "response": { "type": { - "$ref": "825" + "$ref": "831" } }, "isOverride": false, @@ -31334,12 +31530,12 @@ ], "parameters": [ { - "$id": "1854", + "$id": "1864", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1855", + "$id": "1865", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -31363,19 +31559,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1139" + "$ref": "1145" }, "isMultiServiceClient": false }, { - "$id": "1856", + "$id": "1866", "kind": "client", "name": "ConstructorRequirements", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1857", + "$id": "1867", "kind": "basic", "name": "send", "isExactName": false, @@ -31385,19 +31581,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1858", + "$id": "1868", "name": "send", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1859", + "$id": "1869", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "436" + "$ref": "440" }, "isApiVersion": false, "optional": false, @@ -31408,13 +31604,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.send.contentType", "methodParameterSegments": [ { - "$id": "1860", + "$id": "1870", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "436" + "$ref": "440" }, "location": "Header", "isApiVersion": false, @@ -31430,12 +31626,12 @@ "isExactName": false }, { - "$id": "1861", + "$id": "1871", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "954" + "$ref": "960" }, "isApiVersion": false, "contentTypes": [ @@ -31449,12 +31645,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.send.body", "methodParameterSegments": [ { - "$id": "1862", + "$id": "1872", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "954" + "$ref": "960" }, "location": "Body", "isApiVersion": false, @@ -31500,10 +31696,10 @@ }, "parameters": [ { - "$ref": "1862" + "$ref": "1872" }, { - "$ref": "1860" + "$ref": "1870" } ], "response": {}, @@ -31513,7 +31709,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.send" }, { - "$id": "1863", + "$id": "1873", "kind": "basic", "name": "sendReadOnly", "isExactName": false, @@ -31523,19 +31719,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1864", + "$id": "1874", "name": "sendReadOnly", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1865", + "$id": "1875", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "438" + "$ref": "442" }, "isApiVersion": false, "optional": false, @@ -31546,13 +31742,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnly.contentType", "methodParameterSegments": [ { - "$id": "1866", + "$id": "1876", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "438" + "$ref": "442" }, "location": "Header", "isApiVersion": false, @@ -31568,12 +31764,12 @@ "isExactName": false }, { - "$id": "1867", + "$id": "1877", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "962" + "$ref": "968" }, "isApiVersion": false, "contentTypes": [ @@ -31587,12 +31783,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnly.body", "methodParameterSegments": [ { - "$id": "1868", + "$id": "1878", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "962" + "$ref": "968" }, "location": "Body", "isApiVersion": false, @@ -31638,10 +31834,10 @@ }, "parameters": [ { - "$ref": "1868" + "$ref": "1878" }, { - "$ref": "1866" + "$ref": "1876" } ], "response": {}, @@ -31651,7 +31847,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnly" }, { - "$id": "1869", + "$id": "1879", "kind": "basic", "name": "sendReadOnlyLeaf", "isExactName": false, @@ -31661,19 +31857,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1870", + "$id": "1880", "name": "sendReadOnlyLeaf", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1871", + "$id": "1881", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "440" + "$ref": "444" }, "isApiVersion": false, "optional": false, @@ -31684,13 +31880,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnlyLeaf.contentType", "methodParameterSegments": [ { - "$id": "1872", + "$id": "1882", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "440" + "$ref": "444" }, "location": "Header", "isApiVersion": false, @@ -31706,12 +31902,12 @@ "isExactName": false }, { - "$id": "1873", + "$id": "1883", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "968" + "$ref": "974" }, "isApiVersion": false, "contentTypes": [ @@ -31725,12 +31921,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnlyLeaf.body", "methodParameterSegments": [ { - "$id": "1874", + "$id": "1884", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "968" + "$ref": "974" }, "location": "Body", "isApiVersion": false, @@ -31776,10 +31972,10 @@ }, "parameters": [ { - "$ref": "1874" + "$ref": "1884" }, { - "$ref": "1872" + "$ref": "1882" } ], "response": {}, @@ -31789,7 +31985,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnlyLeaf" }, { - "$id": "1875", + "$id": "1885", "kind": "basic", "name": "sendXml", "isExactName": false, @@ -31799,18 +31995,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1876", + "$id": "1886", "name": "sendXml", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1877", + "$id": "1887", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "442" + "$ref": "446" }, "isApiVersion": false, "optional": false, @@ -31821,12 +32017,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendXml.contentType", "methodParameterSegments": [ { - "$id": "1878", + "$id": "1888", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "442" + "$ref": "446" }, "location": "Header", "isApiVersion": false, @@ -31842,12 +32038,12 @@ "isExactName": false }, { - "$id": "1879", + "$id": "1889", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "971" + "$ref": "977" }, "isApiVersion": false, "contentTypes": [ @@ -31861,12 +32057,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendXml.body", "methodParameterSegments": [ { - "$id": "1880", + "$id": "1890", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "971" + "$ref": "977" }, "location": "Body", "isApiVersion": false, @@ -31912,10 +32108,10 @@ }, "parameters": [ { - "$ref": "1880" + "$ref": "1890" }, { - "$ref": "1878" + "$ref": "1888" } ], "response": {}, @@ -31925,7 +32121,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendXml" }, { - "$id": "1881", + "$id": "1891", "kind": "basic", "name": "sendInheritedLeaf", "isExactName": false, @@ -31935,19 +32131,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1882", + "$id": "1892", "name": "sendInheritedLeaf", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1883", + "$id": "1893", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "446" + "$ref": "450" }, "isApiVersion": false, "optional": false, @@ -31958,13 +32154,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendInheritedLeaf.contentType", "methodParameterSegments": [ { - "$id": "1884", + "$id": "1894", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "446" + "$ref": "450" }, "location": "Header", "isApiVersion": false, @@ -31980,12 +32176,12 @@ "isExactName": false }, { - "$id": "1885", + "$id": "1895", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "982" + "$ref": "988" }, "isApiVersion": false, "contentTypes": [ @@ -31999,12 +32195,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendInheritedLeaf.body", "methodParameterSegments": [ { - "$id": "1886", + "$id": "1896", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "982" + "$ref": "988" }, "location": "Body", "isApiVersion": false, @@ -32050,10 +32246,10 @@ }, "parameters": [ { - "$ref": "1886" + "$ref": "1896" }, { - "$ref": "1884" + "$ref": "1894" } ], "response": {}, @@ -32063,7 +32259,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendInheritedLeaf" }, { - "$id": "1887", + "$id": "1897", "kind": "basic", "name": "sendRenamed", "isExactName": false, @@ -32073,19 +32269,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1888", + "$id": "1898", "name": "sendRenamed", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1889", + "$id": "1899", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "448" + "$ref": "452" }, "isApiVersion": false, "optional": false, @@ -32096,13 +32292,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamed.contentType", "methodParameterSegments": [ { - "$id": "1890", + "$id": "1900", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "448" + "$ref": "452" }, "location": "Header", "isApiVersion": false, @@ -32118,12 +32314,12 @@ "isExactName": false }, { - "$id": "1891", + "$id": "1901", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "983" + "$ref": "989" }, "isApiVersion": false, "contentTypes": [ @@ -32137,12 +32333,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamed.body", "methodParameterSegments": [ { - "$id": "1892", + "$id": "1902", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "983" + "$ref": "989" }, "location": "Body", "isApiVersion": false, @@ -32188,10 +32384,10 @@ }, "parameters": [ { - "$ref": "1892" + "$ref": "1902" }, { - "$ref": "1890" + "$ref": "1900" } ], "response": {}, @@ -32201,7 +32397,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamed" }, { - "$id": "1893", + "$id": "1903", "kind": "basic", "name": "sendRenamedLeaf", "isExactName": false, @@ -32211,19 +32407,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1894", + "$id": "1904", "name": "sendRenamedLeaf", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1895", + "$id": "1905", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "450" + "$ref": "454" }, "isApiVersion": false, "optional": false, @@ -32234,13 +32430,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLeaf.contentType", "methodParameterSegments": [ { - "$id": "1896", + "$id": "1906", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "450" + "$ref": "454" }, "location": "Header", "isApiVersion": false, @@ -32256,12 +32452,12 @@ "isExactName": false }, { - "$id": "1897", + "$id": "1907", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "991" + "$ref": "997" }, "isApiVersion": false, "contentTypes": [ @@ -32275,12 +32471,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLeaf.body", "methodParameterSegments": [ { - "$id": "1898", + "$id": "1908", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "991" + "$ref": "997" }, "location": "Body", "isApiVersion": false, @@ -32326,10 +32522,10 @@ }, "parameters": [ { - "$ref": "1898" + "$ref": "1908" }, { - "$ref": "1896" + "$ref": "1906" } ], "response": {}, @@ -32339,7 +32535,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLeaf" }, { - "$id": "1899", + "$id": "1909", "kind": "basic", "name": "sendWritableLeaf", "isExactName": false, @@ -32349,19 +32545,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1900", + "$id": "1910", "name": "sendWritableLeaf", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1901", + "$id": "1911", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "452" + "$ref": "456" }, "isApiVersion": false, "optional": false, @@ -32372,13 +32568,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendWritableLeaf.contentType", "methodParameterSegments": [ { - "$id": "1902", + "$id": "1912", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "452" + "$ref": "456" }, "location": "Header", "isApiVersion": false, @@ -32394,12 +32590,12 @@ "isExactName": false }, { - "$id": "1903", + "$id": "1913", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "992" + "$ref": "998" }, "isApiVersion": false, "contentTypes": [ @@ -32413,12 +32609,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendWritableLeaf.body", "methodParameterSegments": [ { - "$id": "1904", + "$id": "1914", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "992" + "$ref": "998" }, "location": "Body", "isApiVersion": false, @@ -32464,10 +32660,10 @@ }, "parameters": [ { - "$ref": "1904" + "$ref": "1914" }, { - "$ref": "1902" + "$ref": "1912" } ], "response": {}, @@ -32477,7 +32673,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendWritableLeaf" }, { - "$id": "1905", + "$id": "1915", "kind": "basic", "name": "sendReturnedName", "isExactName": false, @@ -32487,19 +32683,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1906", + "$id": "1916", "name": "sendReturnedName", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1907", + "$id": "1917", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "454" + "$ref": "458" }, "isApiVersion": false, "optional": false, @@ -32510,13 +32706,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReturnedName.contentType", "methodParameterSegments": [ { - "$id": "1908", + "$id": "1918", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "454" + "$ref": "458" }, "location": "Header", "isApiVersion": false, @@ -32532,12 +32728,12 @@ "isExactName": false }, { - "$id": "1909", + "$id": "1919", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1001" + "$ref": "1007" }, "isApiVersion": false, "contentTypes": [ @@ -32551,12 +32747,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReturnedName.body", "methodParameterSegments": [ { - "$id": "1910", + "$id": "1920", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1001" + "$ref": "1007" }, "location": "Body", "isApiVersion": false, @@ -32602,10 +32798,10 @@ }, "parameters": [ { - "$ref": "1910" + "$ref": "1920" }, { - "$ref": "1908" + "$ref": "1918" } ], "response": {}, @@ -32615,7 +32811,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReturnedName" }, { - "$id": "1911", + "$id": "1921", "kind": "basic", "name": "sendRequiredRenamed", "isExactName": false, @@ -32625,19 +32821,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1912", + "$id": "1922", "name": "sendRequiredRenamed", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1913", + "$id": "1923", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "456" + "$ref": "460" }, "isApiVersion": false, "optional": false, @@ -32648,13 +32844,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRequiredRenamed.contentType", "methodParameterSegments": [ { - "$id": "1914", + "$id": "1924", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "456" + "$ref": "460" }, "location": "Header", "isApiVersion": false, @@ -32670,12 +32866,12 @@ "isExactName": false }, { - "$id": "1915", + "$id": "1925", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1004" + "$ref": "1010" }, "isApiVersion": false, "contentTypes": [ @@ -32689,12 +32885,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRequiredRenamed.body", "methodParameterSegments": [ { - "$id": "1916", + "$id": "1926", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1004" + "$ref": "1010" }, "location": "Body", "isApiVersion": false, @@ -32740,10 +32936,10 @@ }, "parameters": [ { - "$ref": "1916" + "$ref": "1926" }, { - "$ref": "1914" + "$ref": "1924" } ], "response": {}, @@ -32753,7 +32949,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRequiredRenamed" }, { - "$id": "1917", + "$id": "1927", "kind": "basic", "name": "sendReadOnlyCollections", "isExactName": false, @@ -32763,19 +32959,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1918", + "$id": "1928", "name": "sendReadOnlyCollections", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1919", + "$id": "1929", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "458" + "$ref": "462" }, "isApiVersion": false, "optional": false, @@ -32786,13 +32982,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnlyCollections.contentType", "methodParameterSegments": [ { - "$id": "1920", + "$id": "1930", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "458" + "$ref": "462" }, "location": "Header", "isApiVersion": false, @@ -32808,12 +33004,12 @@ "isExactName": false }, { - "$id": "1921", + "$id": "1931", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1007" + "$ref": "1013" }, "isApiVersion": false, "contentTypes": [ @@ -32827,12 +33023,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnlyCollections.body", "methodParameterSegments": [ { - "$id": "1922", + "$id": "1932", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1007" + "$ref": "1013" }, "location": "Body", "isApiVersion": false, @@ -32878,10 +33074,10 @@ }, "parameters": [ { - "$ref": "1922" + "$ref": "1932" }, { - "$ref": "1920" + "$ref": "1930" } ], "response": {}, @@ -32891,7 +33087,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnlyCollections" }, { - "$id": "1923", + "$id": "1933", "kind": "basic", "name": "sendRequiredCollections", "isExactName": false, @@ -32901,19 +33097,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1924", + "$id": "1934", "name": "sendRequiredCollections", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1925", + "$id": "1935", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "460" + "$ref": "464" }, "isApiVersion": false, "optional": false, @@ -32924,13 +33120,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRequiredCollections.contentType", "methodParameterSegments": [ { - "$id": "1926", + "$id": "1936", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "460" + "$ref": "464" }, "location": "Header", "isApiVersion": false, @@ -32946,12 +33142,12 @@ "isExactName": false }, { - "$id": "1927", + "$id": "1937", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1013" + "$ref": "1019" }, "isApiVersion": false, "contentTypes": [ @@ -32965,12 +33161,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRequiredCollections.body", "methodParameterSegments": [ { - "$id": "1928", + "$id": "1938", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1013" + "$ref": "1019" }, "location": "Body", "isApiVersion": false, @@ -33016,10 +33212,10 @@ }, "parameters": [ { - "$ref": "1928" + "$ref": "1938" }, { - "$ref": "1926" + "$ref": "1936" } ], "response": {}, @@ -33029,7 +33225,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRequiredCollections" }, { - "$id": "1929", + "$id": "1939", "kind": "basic", "name": "sendRenamedLiteral", "isExactName": false, @@ -33039,19 +33235,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1930", + "$id": "1940", "name": "sendRenamedLiteral", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1931", + "$id": "1941", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "462" + "$ref": "466" }, "isApiVersion": false, "optional": false, @@ -33062,13 +33258,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLiteral.contentType", "methodParameterSegments": [ { - "$id": "1932", + "$id": "1942", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "462" + "$ref": "466" }, "location": "Header", "isApiVersion": false, @@ -33084,12 +33280,12 @@ "isExactName": false }, { - "$id": "1933", + "$id": "1943", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "464" + "$ref": "468" }, "isApiVersion": false, "optional": false, @@ -33100,12 +33296,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLiteral.accept", "methodParameterSegments": [ { - "$id": "1934", + "$id": "1944", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "464" + "$ref": "468" }, "location": "Header", "isApiVersion": false, @@ -33121,12 +33317,12 @@ "isExactName": false }, { - "$id": "1935", + "$id": "1945", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1016" + "$ref": "1022" }, "isApiVersion": false, "contentTypes": [ @@ -33140,12 +33336,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLiteral.body", "methodParameterSegments": [ { - "$id": "1936", + "$id": "1946", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1016" + "$ref": "1022" }, "location": "Body", "isApiVersion": false, @@ -33172,7 +33368,7 @@ 200 ], "bodyType": { - "$ref": "1016" + "$ref": "1022" }, "headers": [], "isErrorResponse": false, @@ -33201,18 +33397,18 @@ }, "parameters": [ { - "$ref": "1936" + "$ref": "1946" }, { - "$ref": "1932" + "$ref": "1942" }, { - "$ref": "1934" + "$ref": "1944" } ], "response": { "type": { - "$ref": "1016" + "$ref": "1022" } }, "isOverride": false, @@ -33221,7 +33417,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLiteral" }, { - "$id": "1937", + "$id": "1947", "kind": "basic", "name": "sendClientNameCollision", "isExactName": false, @@ -33231,19 +33427,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1938", + "$id": "1948", "name": "sendClientNameCollision", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1939", + "$id": "1949", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "466" + "$ref": "470" }, "isApiVersion": false, "optional": false, @@ -33254,13 +33450,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendClientNameCollision.contentType", "methodParameterSegments": [ { - "$id": "1940", + "$id": "1950", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "466" + "$ref": "470" }, "location": "Header", "isApiVersion": false, @@ -33276,12 +33472,12 @@ "isExactName": false }, { - "$id": "1941", + "$id": "1951", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "468" + "$ref": "472" }, "isApiVersion": false, "optional": false, @@ -33292,12 +33488,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendClientNameCollision.accept", "methodParameterSegments": [ { - "$id": "1942", + "$id": "1952", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "468" + "$ref": "472" }, "location": "Header", "isApiVersion": false, @@ -33313,12 +33509,12 @@ "isExactName": false }, { - "$id": "1943", + "$id": "1953", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1021" + "$ref": "1027" }, "isApiVersion": false, "contentTypes": [ @@ -33332,12 +33528,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendClientNameCollision.body", "methodParameterSegments": [ { - "$id": "1944", + "$id": "1954", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1021" + "$ref": "1027" }, "location": "Body", "isApiVersion": false, @@ -33364,7 +33560,7 @@ 200 ], "bodyType": { - "$ref": "1021" + "$ref": "1027" }, "headers": [], "isErrorResponse": false, @@ -33393,18 +33589,18 @@ }, "parameters": [ { - "$ref": "1944" + "$ref": "1954" }, { - "$ref": "1940" + "$ref": "1950" }, { - "$ref": "1942" + "$ref": "1952" } ], "response": { "type": { - "$ref": "1021" + "$ref": "1027" } }, "isOverride": false, @@ -33415,12 +33611,12 @@ ], "parameters": [ { - "$id": "1945", + "$id": "1955", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1946", + "$id": "1956", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -33444,7 +33640,7 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1139" + "$ref": "1145" }, "isMultiServiceClient": false } @@ -33471,64 +33667,64 @@ }, "unions": [ { - "$ref": "842" + "$ref": "848" }, { - "$ref": "851" + "$ref": "857" }, { - "$ref": "935" + "$ref": "941" }, { - "$ref": "1589" + "$ref": "1599" }, { - "$ref": "1614" + "$ref": "1624" }, { - "$ref": "1623" + "$ref": "1633" }, { - "$ref": "1632" + "$ref": "1642" }, { - "$ref": "1657" + "$ref": "1667" }, { - "$ref": "1666" + "$ref": "1676" }, { - "$ref": "1675" + "$ref": "1685" }, { - "$ref": "1692" + "$ref": "1702" }, { - "$ref": "1717" + "$ref": "1727" }, { - "$ref": "1726" + "$ref": "1736" }, { - "$ref": "1735" + "$ref": "1745" }, { - "$ref": "1744" + "$ref": "1754" }, { - "$ref": "1769" + "$ref": "1779" }, { - "$ref": "1778" + "$ref": "1788" }, { - "$ref": "1787" + "$ref": "1797" }, { - "$ref": "1796" + "$ref": "1806" }, { - "$ref": "1805" + "$ref": "1815" } ] } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/response-as-bool/src/Generated/HeadAsBoolean.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/response-as-bool/src/Generated/HeadAsBoolean.cs index 3ca237dbe29..ba0f4b23cf8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/response-as-bool/src/Generated/HeadAsBoolean.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/response-as-bool/src/Generated/HeadAsBoolean.cs @@ -14,7 +14,7 @@ public partial class HeadAsBoolean { protected HeadAsBoolean() => throw null; - internal HeadAsBoolean(ClientPipeline pipeline, Uri endpoint) => throw null; + internal HeadAsBoolean(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Generated/Group3.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Generated/Group3.cs index 424b1f729bd..5e6e3761f47 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Generated/Group3.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Generated/Group3.cs @@ -15,7 +15,7 @@ public partial class Group3 { protected Group3() => throw null; - internal Group3(ClientPipeline pipeline, Uri endpoint, ClientType client) => throw null; + internal Group3(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, ClientType client) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Generated/Group4.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Generated/Group4.cs index 6f372e14c53..d1579247787 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Generated/Group4.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Generated/Group4.cs @@ -15,7 +15,7 @@ public partial class Group4 { protected Group4() => throw null; - internal Group4(ClientPipeline pipeline, Uri endpoint, ClientType client) => throw null; + internal Group4(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, ClientType client) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Generated/Group5.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Generated/Group5.cs index 16a035048f3..97e661da026 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Generated/Group5.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Generated/Group5.cs @@ -15,7 +15,7 @@ public partial class Group5 { protected Group5() => throw null; - internal Group5(ClientPipeline pipeline, Uri endpoint, ClientType client) => throw null; + internal Group5(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, ClientType client) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Bar.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Bar.cs index ecb520de880..b286b0c8a54 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Bar.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Bar.cs @@ -14,7 +14,7 @@ public partial class Bar { protected Bar() => throw null; - internal Bar(ClientPipeline pipeline, Uri endpoint, ClientType client) => throw null; + internal Bar(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, ClientType client) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Baz.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Baz.cs index 9846828d6a2..f437ba4160a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Baz.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Baz.cs @@ -12,7 +12,7 @@ public partial class Baz { protected Baz() => throw null; - internal Baz(ClientPipeline pipeline, Uri endpoint, ClientType client) => throw null; + internal Baz(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, ClientType client) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/BazFoo.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/BazFoo.cs index 4b8d81d5939..26fab414a86 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/BazFoo.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/BazFoo.cs @@ -15,7 +15,7 @@ public partial class BazFoo { protected BazFoo() => throw null; - internal BazFoo(ClientPipeline pipeline, Uri endpoint, ClientType client) => throw null; + internal BazFoo(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, ClientType client) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Foo.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Foo.cs index 40c3caa537f..e3c6b900912 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Foo.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Foo.cs @@ -14,7 +14,7 @@ public partial class Foo { protected Foo() => throw null; - internal Foo(ClientPipeline pipeline, Uri endpoint, ClientType client) => throw null; + internal Foo(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, ClientType client) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Qux.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Qux.cs index 886bf284df7..c61c9881395 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Qux.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/Qux.cs @@ -15,7 +15,7 @@ public partial class Qux { protected Qux() => throw null; - internal Qux(ClientPipeline pipeline, Uri endpoint, ClientType client) => throw null; + internal Qux(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, ClientType client) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/QuxBar.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/QuxBar.cs index 5b7bc794ae7..07ce200cc10 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/QuxBar.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Generated/QuxBar.cs @@ -15,7 +15,7 @@ public partial class QuxBar { protected QuxBar() => throw null; - internal QuxBar(ClientPipeline pipeline, Uri endpoint, ClientType client) => throw null; + internal QuxBar(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, ClientType client) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/src/Generated/Group.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/src/Generated/Group.cs index f9ce619bfe6..f81bcf57a71 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/src/Generated/Group.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/src/Generated/Group.cs @@ -15,7 +15,7 @@ public partial class Group { protected Group() => throw null; - internal Group(ClientPipeline pipeline, Uri endpoint, ClientType client) => throw null; + internal Group(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, ClientType client) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Generated/Group1.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Generated/Group1.cs index 292fd14c3c6..5173bcffc76 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Generated/Group1.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Generated/Group1.cs @@ -15,7 +15,7 @@ public partial class Group1 { protected Group1() => throw null; - internal Group1(ClientPipeline pipeline, Uri endpoint, ClientType client) => throw null; + internal Group1(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, ClientType client) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Generated/Group2.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Generated/Group2.cs index 9b04ac2eba9..04b489f302b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Generated/Group2.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Generated/Group2.cs @@ -15,7 +15,7 @@ public partial class Group2 { protected Group2() => throw null; - internal Group2(ClientPipeline pipeline, Uri endpoint, ClientType client) => throw null; + internal Group2(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, ClientType client) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Generated/Lists.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Generated/Lists.cs index 448bdd8c7c6..a245efb2984 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Generated/Lists.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Generated/Lists.cs @@ -14,7 +14,7 @@ public partial class Lists { protected Lists() => throw null; - internal Lists(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Lists(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Generated/TextFormatting.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Generated/TextFormatting.cs index d2190f98461..54b8edda959 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Generated/TextFormatting.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Generated/TextFormatting.cs @@ -14,7 +14,7 @@ public partial class TextFormatting { protected TextFormatting() => throw null; - internal TextFormatting(ClientPipeline pipeline, Uri endpoint) => throw null; + internal TextFormatting(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Generated/Property.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Generated/Property.cs index cca72b3496d..9c6fc5fd2ca 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Generated/Property.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Generated/Property.cs @@ -15,7 +15,7 @@ public partial class Property { protected Property() => throw null; - internal Property(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Property(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/boolean/src/Generated/Property.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/boolean/src/Generated/Property.cs index 6c997cd998b..0adc8af41ff 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/boolean/src/Generated/Property.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/boolean/src/Generated/Property.cs @@ -14,7 +14,7 @@ public partial class Property { protected Property() => throw null; - internal Property(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Property(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/Header.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/Header.cs index fd23134b48c..afdb92088b7 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/Header.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/Header.cs @@ -15,7 +15,7 @@ public partial class Header { protected Header() => throw null; - internal Header(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Header(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/Property.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/Property.cs index 98856cd5b6c..3fbfab661fb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/Property.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/Property.cs @@ -15,7 +15,7 @@ public partial class Property { protected Property() => throw null; - internal Property(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Property(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/Query.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/Query.cs index a4bdf915ccf..e9252c03b2e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/Query.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/Query.cs @@ -15,7 +15,7 @@ public partial class Query { protected Query() => throw null; - internal Query(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Query(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/RequestBody.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/RequestBody.cs index 11350490a12..c0f610e8552 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/RequestBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/RequestBody.cs @@ -14,7 +14,7 @@ public partial class RequestBody { protected RequestBody() => throw null; - internal RequestBody(ClientPipeline pipeline, Uri endpoint) => throw null; + internal RequestBody(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/ResponseBody.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/ResponseBody.cs index 2ccbb28aadf..0e4e4dca995 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/ResponseBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Generated/ResponseBody.cs @@ -14,7 +14,7 @@ public partial class ResponseBody { protected ResponseBody() => throw null; - internal ResponseBody(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ResponseBody(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/Header.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/Header.cs index 73e83a93a8d..ca0d6b60f32 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/Header.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/Header.cs @@ -15,7 +15,7 @@ public partial class Header { protected Header() => throw null; - internal Header(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Header(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/Property.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/Property.cs index 178a86cf0b2..94910d48bde 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/Property.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/Property.cs @@ -15,7 +15,7 @@ public partial class Property { protected Property() => throw null; - internal Property(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Property(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/Query.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/Query.cs index 2e39c63316f..25bb8b4c94e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/Query.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/Query.cs @@ -15,7 +15,7 @@ public partial class Query { protected Query() => throw null; - internal Query(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Query(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/ResponseHeader.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/ResponseHeader.cs index 0f6c15d6f9e..7b31a5c8410 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/ResponseHeader.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Generated/ResponseHeader.cs @@ -14,7 +14,7 @@ public partial class ResponseHeader { protected ResponseHeader() => throw null; - internal ResponseHeader(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ResponseHeader(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Header.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Header.cs index 60aaa9d639d..2c6c0ae747e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Header.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Header.cs @@ -15,7 +15,7 @@ public partial class Header { protected Header() => throw null; - internal Header(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Header(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Lossy.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Lossy.cs index 0fb59d8a519..75d4022f980 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Lossy.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Lossy.cs @@ -14,7 +14,7 @@ public partial class Lossy { protected Lossy() => throw null; - internal Lossy(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Lossy(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Property.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Property.cs index 5932c8916b1..c7003d0657d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Property.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Property.cs @@ -14,7 +14,7 @@ public partial class Property { protected Property() => throw null; - internal Property(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Property(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Query.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Query.cs index 3389d4bc03c..847d39a5d2d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Query.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Generated/Query.cs @@ -15,7 +15,7 @@ public partial class Query { protected Query() => throw null; - internal Query(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Query(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Generated/Property.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Generated/Property.cs index a24512ae6df..217bc4cb759 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Generated/Property.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Generated/Property.cs @@ -14,7 +14,7 @@ public partial class Property { protected Property() => throw null; - internal Property(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Property(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Generated/ExplicitBody.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Generated/ExplicitBody.cs index d9157b03926..0496fec4c96 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Generated/ExplicitBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Generated/ExplicitBody.cs @@ -14,7 +14,7 @@ public partial class ExplicitBody { protected ExplicitBody() => throw null; - internal ExplicitBody(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExplicitBody(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Generated/ImplicitBody.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Generated/ImplicitBody.cs index 8d46cf80d63..b1cd28e53aa 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Generated/ImplicitBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Generated/ImplicitBody.cs @@ -14,7 +14,7 @@ public partial class ImplicitBody { protected ImplicitBody() => throw null; - internal ImplicitBody(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ImplicitBody(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Generated/OptionalExplicit.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Generated/OptionalExplicit.cs index 5d4de240634..f43dd1129ee 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Generated/OptionalExplicit.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Generated/OptionalExplicit.cs @@ -15,7 +15,7 @@ public partial class OptionalExplicit { protected OptionalExplicit() => throw null; - internal OptionalExplicit(ClientPipeline pipeline, Uri endpoint) => throw null; + internal OptionalExplicit(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Generated/Header.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Generated/Header.cs index e29a1876bcd..026eeae2300 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Generated/Header.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Generated/Header.cs @@ -15,7 +15,7 @@ public partial class Header { protected Header() => throw null; - internal Header(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Header(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Generated/Query.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Generated/Query.cs index f0d37525882..59941467fce 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Generated/Query.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Generated/Query.cs @@ -15,7 +15,7 @@ public partial class Query { protected Query() => throw null; - internal Query(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Query(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Generated/Constant.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Generated/Constant.cs index 3545cccf023..a6821ab5ca1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Generated/Constant.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Generated/Constant.cs @@ -14,7 +14,7 @@ public partial class Constant { protected Constant() => throw null; - internal Constant(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Constant(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Generated/SpecialChar.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Generated/SpecialChar.cs index 02f488d8034..11425b9673f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Generated/SpecialChar.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Generated/SpecialChar.cs @@ -14,7 +14,7 @@ public partial class SpecialChar { protected SpecialChar() => throw null; - internal SpecialChar(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpecialChar(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Generated/Alias.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Generated/Alias.cs index 201900b0bc1..732ccdde5db 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Generated/Alias.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Generated/Alias.cs @@ -15,7 +15,7 @@ public partial class Alias { protected Alias() => throw null; - internal Alias(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Alias(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Generated/Model.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Generated/Model.cs index 792e9511624..7b505ace84b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Generated/Model.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Generated/Model.cs @@ -14,7 +14,7 @@ public partial class Model { protected Model() => throw null; - internal Model(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Model(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/DifferentBody.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/DifferentBody.cs index 765ef0cc721..312c67bae84 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/DifferentBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/DifferentBody.cs @@ -14,7 +14,7 @@ public partial class DifferentBody { protected DifferentBody() => throw null; - internal DifferentBody(ClientPipeline pipeline, Uri endpoint) => throw null; + internal DifferentBody(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/SameBody.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/SameBody.cs index 57af2a77ab4..5e4ea4bdfcf 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/SameBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/SameBody.cs @@ -14,7 +14,7 @@ public partial class SameBody { protected SameBody() => throw null; - internal SameBody(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SameBody(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Generated/StringBody.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Generated/StringBody.cs index 3efbadabb94..2e6eb91efba 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Generated/StringBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Generated/StringBody.cs @@ -14,7 +14,7 @@ public partial class StringBody { protected StringBody() => throw null; - internal StringBody(ClientPipeline pipeline, Uri endpoint) => throw null; + internal StringBody(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormData.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormData.cs index b71a7dc4bac..9d5dcc862de 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormData.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormData.cs @@ -18,7 +18,7 @@ public partial class FormData { protected FormData() => throw null; - internal FormData(ClientPipeline pipeline, Uri endpoint) => throw null; + internal FormData(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataFile.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataFile.cs index f84fa20fb66..4dd88ee4df1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataFile.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataFile.cs @@ -15,7 +15,7 @@ public partial class FormDataFile { protected FormDataFile() => throw null; - internal FormDataFile(ClientPipeline pipeline, Uri endpoint) => throw null; + internal FormDataFile(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataHttpParts.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataHttpParts.cs index d6c43ec3d03..790f1fab911 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataHttpParts.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataHttpParts.cs @@ -18,7 +18,7 @@ public partial class FormDataHttpParts { protected FormDataHttpParts() => throw null; - internal FormDataHttpParts(ClientPipeline pipeline, Uri endpoint) => throw null; + internal FormDataHttpParts(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataHttpPartsContentType.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataHttpPartsContentType.cs index 90e57522b9e..0d4426bba44 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataHttpPartsContentType.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataHttpPartsContentType.cs @@ -16,7 +16,7 @@ public partial class FormDataHttpPartsContentType { protected FormDataHttpPartsContentType() => throw null; - internal FormDataHttpPartsContentType(ClientPipeline pipeline, Uri endpoint) => throw null; + internal FormDataHttpPartsContentType(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataHttpPartsNonString.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataHttpPartsNonString.cs index 6bc48d779eb..40d5b0516c3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataHttpPartsNonString.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormDataHttpPartsNonString.cs @@ -15,7 +15,7 @@ public partial class FormDataHttpPartsNonString { protected FormDataHttpPartsNonString() => throw null; - internal FormDataHttpPartsNonString(ClientPipeline pipeline, Uri endpoint) => throw null; + internal FormDataHttpPartsNonString(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/PageSize.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/PageSize.cs index 1ba387d0819..7da523220e8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/PageSize.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/PageSize.cs @@ -14,7 +14,7 @@ public partial class PageSize { protected PageSize() => throw null; - internal PageSize(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PageSize(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPagination.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPagination.cs index 3d0c9d66977..1b9ecdcf9df 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPagination.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPagination.cs @@ -16,7 +16,7 @@ public partial class ServerDrivenPagination { protected ServerDrivenPagination() => throw null; - internal ServerDrivenPagination(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ServerDrivenPagination(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPaginationAlternateInitialVerb.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPaginationAlternateInitialVerb.cs index 29706308ee7..3255758088a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPaginationAlternateInitialVerb.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPaginationAlternateInitialVerb.cs @@ -14,7 +14,7 @@ public partial class ServerDrivenPaginationAlternateInitialVerb { protected ServerDrivenPaginationAlternateInitialVerb() => throw null; - internal ServerDrivenPaginationAlternateInitialVerb(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ServerDrivenPaginationAlternateInitialVerb(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPaginationContinuationToken.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPaginationContinuationToken.cs index 928eaab911f..4177548e5ca 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPaginationContinuationToken.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPaginationContinuationToken.cs @@ -14,7 +14,7 @@ public partial class ServerDrivenPaginationContinuationToken { protected ServerDrivenPaginationContinuationToken() => throw null; - internal ServerDrivenPaginationContinuationToken(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ServerDrivenPaginationContinuationToken(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/XmlPagination.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/XmlPagination.cs index edbc61168f7..746d364ca15 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/XmlPagination.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/XmlPagination.cs @@ -14,7 +14,7 @@ public partial class XmlPagination { protected XmlPagination() => throw null; - internal XmlPagination(ClientPipeline pipeline, Uri endpoint) => throw null; + internal XmlPagination(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithArrayOfModelValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithArrayOfModelValue.cs index f1cfe2710d1..daa1c5d6b4b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithArrayOfModelValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithArrayOfModelValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithArrayOfModelValue { protected ModelWithArrayOfModelValue() => throw null; - internal ModelWithArrayOfModelValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithArrayOfModelValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithAttributesValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithAttributesValue.cs index 283cfb4c443..963eaaa120f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithAttributesValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithAttributesValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithAttributesValue { protected ModelWithAttributesValue() => throw null; - internal ModelWithAttributesValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithAttributesValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithDatetimeValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithDatetimeValue.cs index f986467c432..804d7f349a2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithDatetimeValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithDatetimeValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithDatetimeValue { protected ModelWithDatetimeValue() => throw null; - internal ModelWithDatetimeValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithDatetimeValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithDictionaryValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithDictionaryValue.cs index 0c0df435c8a..7d3b9486fbd 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithDictionaryValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithDictionaryValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithDictionaryValue { protected ModelWithDictionaryValue() => throw null; - internal ModelWithDictionaryValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithDictionaryValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEmptyArrayValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEmptyArrayValue.cs index bad31fbc8cc..aab2f7f32f1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEmptyArrayValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEmptyArrayValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithEmptyArrayValue { protected ModelWithEmptyArrayValue() => throw null; - internal ModelWithEmptyArrayValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithEmptyArrayValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEncodedNamesValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEncodedNamesValue.cs index 6b6a02b751f..26938fb4215 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEncodedNamesValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEncodedNamesValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithEncodedNamesValue { protected ModelWithEncodedNamesValue() => throw null; - internal ModelWithEncodedNamesValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithEncodedNamesValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEnumValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEnumValue.cs index 92f3738b2ec..9005fca6a22 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEnumValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEnumValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithEnumValue { protected ModelWithEnumValue() => throw null; - internal ModelWithEnumValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithEnumValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithNamespaceOnPropertiesValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithNamespaceOnPropertiesValue.cs index 879ead4fe76..5700df3b5d6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithNamespaceOnPropertiesValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithNamespaceOnPropertiesValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithNamespaceOnPropertiesValue { protected ModelWithNamespaceOnPropertiesValue() => throw null; - internal ModelWithNamespaceOnPropertiesValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithNamespaceOnPropertiesValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithNamespaceValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithNamespaceValue.cs index d643648ed49..3afdec71e37 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithNamespaceValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithNamespaceValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithNamespaceValue { protected ModelWithNamespaceValue() => throw null; - internal ModelWithNamespaceValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithNamespaceValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithNestedModelValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithNestedModelValue.cs index d41a92de547..d9fdf8f524a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithNestedModelValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithNestedModelValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithNestedModelValue { protected ModelWithNestedModelValue() => throw null; - internal ModelWithNestedModelValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithNestedModelValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithOptionalFieldValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithOptionalFieldValue.cs index e2bbd2a0fe9..e14af0465f9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithOptionalFieldValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithOptionalFieldValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithOptionalFieldValue { protected ModelWithOptionalFieldValue() => throw null; - internal ModelWithOptionalFieldValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithOptionalFieldValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedArraysValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedArraysValue.cs index f387ba00d47..7b436d2852b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedArraysValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedArraysValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithRenamedArraysValue { protected ModelWithRenamedArraysValue() => throw null; - internal ModelWithRenamedArraysValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithRenamedArraysValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedAttributeValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedAttributeValue.cs index 3b8eb46d813..d0b28aeda46 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedAttributeValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedAttributeValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithRenamedAttributeValue { protected ModelWithRenamedAttributeValue() => throw null; - internal ModelWithRenamedAttributeValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithRenamedAttributeValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedFieldsValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedFieldsValue.cs index 291ca0113d2..9b33b95df26 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedFieldsValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedFieldsValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithRenamedFieldsValue { protected ModelWithRenamedFieldsValue() => throw null; - internal ModelWithRenamedFieldsValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithRenamedFieldsValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedNestedModelValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedNestedModelValue.cs index 664f8f440cf..34e1be434d5 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedNestedModelValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedNestedModelValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithRenamedNestedModelValue { protected ModelWithRenamedNestedModelValue() => throw null; - internal ModelWithRenamedNestedModelValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithRenamedNestedModelValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedPropertyValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedPropertyValue.cs index 365d16e26d8..45bebd45d9e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedPropertyValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedPropertyValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithRenamedPropertyValue { protected ModelWithRenamedPropertyValue() => throw null; - internal ModelWithRenamedPropertyValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithRenamedPropertyValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedUnwrappedModelArrayValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedUnwrappedModelArrayValue.cs index 28d556f7ca6..017c4d8807b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedUnwrappedModelArrayValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedUnwrappedModelArrayValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithRenamedUnwrappedModelArrayValue { protected ModelWithRenamedUnwrappedModelArrayValue() => throw null; - internal ModelWithRenamedUnwrappedModelArrayValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithRenamedUnwrappedModelArrayValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedWrappedAndItemModelArrayValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedWrappedAndItemModelArrayValue.cs index 5115f8cdb99..fd23984df14 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedWrappedAndItemModelArrayValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedWrappedAndItemModelArrayValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithRenamedWrappedAndItemModelArrayValue { protected ModelWithRenamedWrappedAndItemModelArrayValue() => throw null; - internal ModelWithRenamedWrappedAndItemModelArrayValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithRenamedWrappedAndItemModelArrayValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedWrappedModelArrayValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedWrappedModelArrayValue.cs index 63eeecf6fc5..dfd5f637e53 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedWrappedModelArrayValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedWrappedModelArrayValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithRenamedWrappedModelArrayValue { protected ModelWithRenamedWrappedModelArrayValue() => throw null; - internal ModelWithRenamedWrappedModelArrayValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithRenamedWrappedModelArrayValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithSimpleArraysValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithSimpleArraysValue.cs index ef168252ce1..7c5e72da7b9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithSimpleArraysValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithSimpleArraysValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithSimpleArraysValue { protected ModelWithSimpleArraysValue() => throw null; - internal ModelWithSimpleArraysValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithSimpleArraysValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithTextValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithTextValue.cs index 273515d228e..7b593a43601 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithTextValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithTextValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithTextValue { protected ModelWithTextValue() => throw null; - internal ModelWithTextValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithTextValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithUnwrappedArrayValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithUnwrappedArrayValue.cs index 319bba5194c..65ff3928291 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithUnwrappedArrayValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithUnwrappedArrayValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithUnwrappedArrayValue { protected ModelWithUnwrappedArrayValue() => throw null; - internal ModelWithUnwrappedArrayValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithUnwrappedArrayValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithUnwrappedModelArrayValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithUnwrappedModelArrayValue.cs index 6de34a4cfd2..9b048f4f48f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithUnwrappedModelArrayValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithUnwrappedModelArrayValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithUnwrappedModelArrayValue { protected ModelWithUnwrappedModelArrayValue() => throw null; - internal ModelWithUnwrappedModelArrayValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithUnwrappedModelArrayValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithWrappedPrimitiveCustomItemNamesValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithWrappedPrimitiveCustomItemNamesValue.cs index 324e75cf8ef..e52f8e4a2a1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithWrappedPrimitiveCustomItemNamesValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithWrappedPrimitiveCustomItemNamesValue.cs @@ -14,7 +14,7 @@ public partial class ModelWithWrappedPrimitiveCustomItemNamesValue { protected ModelWithWrappedPrimitiveCustomItemNamesValue() => throw null; - internal ModelWithWrappedPrimitiveCustomItemNamesValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelWithWrappedPrimitiveCustomItemNamesValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/SimpleModelValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/SimpleModelValue.cs index 0ca41673678..6d9c48463b0 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/SimpleModelValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/SimpleModelValue.cs @@ -14,7 +14,7 @@ public partial class SimpleModelValue { protected SimpleModelValue() => throw null; - internal SimpleModelValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SimpleModelValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/XmlErrorValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/XmlErrorValue.cs index cf37b300967..3cdd912dd03 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/XmlErrorValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/XmlErrorValue.cs @@ -14,7 +14,7 @@ public partial class XmlErrorValue { protected XmlErrorValue() => throw null; - internal XmlErrorValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal XmlErrorValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/InInterface.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/InInterface.cs index 934018fdcc3..3bfa4313659 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/InInterface.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/InInterface.cs @@ -14,7 +14,7 @@ public partial class InInterface { protected InInterface() => throw null; - internal InInterface(ClientPipeline pipeline, Uri endpoint) => throw null; + internal InInterface(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParameters.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParameters.cs index 305a607546a..c846d04cc7c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParameters.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParameters.cs @@ -19,7 +19,7 @@ public partial class PathParameters { protected PathParameters() => throw null; - internal PathParameters(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParameters(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersLabelExpansion.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersLabelExpansion.cs index a3daa8878cb..158ce22f11d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersLabelExpansion.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersLabelExpansion.cs @@ -13,7 +13,7 @@ public partial class PathParametersLabelExpansion { protected PathParametersLabelExpansion() => throw null; - internal PathParametersLabelExpansion(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersLabelExpansion(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersLabelExpansionExplode.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersLabelExpansionExplode.cs index d032c33fc38..4f3b48916e0 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersLabelExpansionExplode.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersLabelExpansionExplode.cs @@ -15,7 +15,7 @@ public partial class PathParametersLabelExpansionExplode { protected PathParametersLabelExpansionExplode() => throw null; - internal PathParametersLabelExpansionExplode(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersLabelExpansionExplode(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersLabelExpansionStandard.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersLabelExpansionStandard.cs index f18f1e516cc..4a4d8e064e8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersLabelExpansionStandard.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersLabelExpansionStandard.cs @@ -15,7 +15,7 @@ public partial class PathParametersLabelExpansionStandard { protected PathParametersLabelExpansionStandard() => throw null; - internal PathParametersLabelExpansionStandard(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersLabelExpansionStandard(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersMatrixExpansion.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersMatrixExpansion.cs index 5c60d18f7bb..9c8cdf3072b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersMatrixExpansion.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersMatrixExpansion.cs @@ -13,7 +13,7 @@ public partial class PathParametersMatrixExpansion { protected PathParametersMatrixExpansion() => throw null; - internal PathParametersMatrixExpansion(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersMatrixExpansion(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersMatrixExpansionExplode.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersMatrixExpansionExplode.cs index bf3f3e88d58..c041d51ea0d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersMatrixExpansionExplode.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersMatrixExpansionExplode.cs @@ -15,7 +15,7 @@ public partial class PathParametersMatrixExpansionExplode { protected PathParametersMatrixExpansionExplode() => throw null; - internal PathParametersMatrixExpansionExplode(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersMatrixExpansionExplode(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersMatrixExpansionStandard.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersMatrixExpansionStandard.cs index 165a76d190f..4ed1f7686b0 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersMatrixExpansionStandard.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersMatrixExpansionStandard.cs @@ -15,7 +15,7 @@ public partial class PathParametersMatrixExpansionStandard { protected PathParametersMatrixExpansionStandard() => throw null; - internal PathParametersMatrixExpansionStandard(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersMatrixExpansionStandard(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersPathExpansion.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersPathExpansion.cs index 11bd31de479..b4d769cde22 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersPathExpansion.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersPathExpansion.cs @@ -13,7 +13,7 @@ public partial class PathParametersPathExpansion { protected PathParametersPathExpansion() => throw null; - internal PathParametersPathExpansion(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersPathExpansion(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersPathExpansionExplode.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersPathExpansionExplode.cs index e2368337641..69a6759af41 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersPathExpansionExplode.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersPathExpansionExplode.cs @@ -15,7 +15,7 @@ public partial class PathParametersPathExpansionExplode { protected PathParametersPathExpansionExplode() => throw null; - internal PathParametersPathExpansionExplode(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersPathExpansionExplode(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersPathExpansionStandard.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersPathExpansionStandard.cs index 8c63b0829fb..1f1e57faffb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersPathExpansionStandard.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersPathExpansionStandard.cs @@ -15,7 +15,7 @@ public partial class PathParametersPathExpansionStandard { protected PathParametersPathExpansionStandard() => throw null; - internal PathParametersPathExpansionStandard(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersPathExpansionStandard(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersReservedExpansion.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersReservedExpansion.cs index 60f78bfde07..d4d3d225187 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersReservedExpansion.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersReservedExpansion.cs @@ -14,7 +14,7 @@ public partial class PathParametersReservedExpansion { protected PathParametersReservedExpansion() => throw null; - internal PathParametersReservedExpansion(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersReservedExpansion(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersSimpleExpansion.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersSimpleExpansion.cs index 87724df6d6d..c16e799468e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersSimpleExpansion.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersSimpleExpansion.cs @@ -13,7 +13,7 @@ public partial class PathParametersSimpleExpansion { protected PathParametersSimpleExpansion() => throw null; - internal PathParametersSimpleExpansion(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersSimpleExpansion(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersSimpleExpansionExplode.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersSimpleExpansionExplode.cs index 2abcc233d4b..c6d9303b066 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersSimpleExpansionExplode.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersSimpleExpansionExplode.cs @@ -15,7 +15,7 @@ public partial class PathParametersSimpleExpansionExplode { protected PathParametersSimpleExpansionExplode() => throw null; - internal PathParametersSimpleExpansionExplode(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersSimpleExpansionExplode(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersSimpleExpansionStandard.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersSimpleExpansionStandard.cs index 21f896bcdb3..411f942f5be 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersSimpleExpansionStandard.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/PathParametersSimpleExpansionStandard.cs @@ -15,7 +15,7 @@ public partial class PathParametersSimpleExpansionStandard { protected PathParametersSimpleExpansionStandard() => throw null; - internal PathParametersSimpleExpansionStandard(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PathParametersSimpleExpansionStandard(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParameters.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParameters.cs index 50f707d2cf0..c83b68001ba 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParameters.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParameters.cs @@ -16,7 +16,7 @@ public partial class QueryParameters { protected QueryParameters() => throw null; - internal QueryParameters(ClientPipeline pipeline, Uri endpoint) => throw null; + internal QueryParameters(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryContinuation.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryContinuation.cs index 3aa640a00e5..93eddaee2e8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryContinuation.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryContinuation.cs @@ -13,7 +13,7 @@ public partial class QueryParametersQueryContinuation { protected QueryParametersQueryContinuation() => throw null; - internal QueryParametersQueryContinuation(ClientPipeline pipeline, Uri endpoint) => throw null; + internal QueryParametersQueryContinuation(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryContinuationExplode.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryContinuationExplode.cs index ec4ef6df4dd..9b0c8ad0730 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryContinuationExplode.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryContinuationExplode.cs @@ -16,7 +16,7 @@ public partial class QueryParametersQueryContinuationExplode { protected QueryParametersQueryContinuationExplode() => throw null; - internal QueryParametersQueryContinuationExplode(ClientPipeline pipeline, Uri endpoint) => throw null; + internal QueryParametersQueryContinuationExplode(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryContinuationStandard.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryContinuationStandard.cs index 5d7db689b50..6270b51b515 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryContinuationStandard.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryContinuationStandard.cs @@ -16,7 +16,7 @@ public partial class QueryParametersQueryContinuationStandard { protected QueryParametersQueryContinuationStandard() => throw null; - internal QueryParametersQueryContinuationStandard(ClientPipeline pipeline, Uri endpoint) => throw null; + internal QueryParametersQueryContinuationStandard(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryExpansion.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryExpansion.cs index 4d2b16565c0..646d56c8ab8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryExpansion.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryExpansion.cs @@ -13,7 +13,7 @@ public partial class QueryParametersQueryExpansion { protected QueryParametersQueryExpansion() => throw null; - internal QueryParametersQueryExpansion(ClientPipeline pipeline, Uri endpoint) => throw null; + internal QueryParametersQueryExpansion(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryExpansionExplode.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryExpansionExplode.cs index 4fcbfdf9f58..9a8d4fe97ec 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryExpansionExplode.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryExpansionExplode.cs @@ -16,7 +16,7 @@ public partial class QueryParametersQueryExpansionExplode { protected QueryParametersQueryExpansionExplode() => throw null; - internal QueryParametersQueryExpansionExplode(ClientPipeline pipeline, Uri endpoint) => throw null; + internal QueryParametersQueryExpansionExplode(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryExpansionStandard.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryExpansionStandard.cs index 94a758a0020..a7317662c1d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryExpansionStandard.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Generated/QueryParametersQueryExpansionStandard.cs @@ -16,7 +16,7 @@ public partial class QueryParametersQueryExpansionStandard { protected QueryParametersQueryExpansionStandard() => throw null; - internal QueryParametersQueryExpansionStandard(ClientPipeline pipeline, Uri endpoint) => throw null; + internal QueryParametersQueryExpansionStandard(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Generated/Property.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Generated/Property.cs index 67558d68030..7759084149e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Generated/Property.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Generated/Property.cs @@ -14,7 +14,7 @@ public partial class Property { protected Property() => throw null; - internal Property(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Property(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/AOperations.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/AOperations.cs index 360678a1915..cfbb026d6d2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/AOperations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/AOperations.cs @@ -14,7 +14,7 @@ public partial class AOperations { protected AOperations() => throw null; - internal AOperations(ClientPipeline pipeline, Uri endpoint, string apiVersion) => throw null; + internal AOperations(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, string apiVersion) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/ASubNamespace.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/ASubNamespace.cs index bca19b71505..99d0702448d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/ASubNamespace.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/ASubNamespace.cs @@ -14,7 +14,7 @@ public partial class ASubNamespace { protected ASubNamespace() => throw null; - internal ASubNamespace(ClientPipeline pipeline, Uri endpoint, string apiVersion) => throw null; + internal ASubNamespace(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, string apiVersion) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/BOperations.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/BOperations.cs index e087db0efda..c65ceb8d775 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/BOperations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/BOperations.cs @@ -14,7 +14,7 @@ public partial class BOperations { protected BOperations() => throw null; - internal BOperations(ClientPipeline pipeline, Uri endpoint, string apiVersion) => throw null; + internal BOperations(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, string apiVersion) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/BSubNamespace.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/BSubNamespace.cs index 24d968a4f48..6fceb6d0343 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/BSubNamespace.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/service/multiple-services/src/Generated/BSubNamespace.cs @@ -14,7 +14,7 @@ public partial class BSubNamespace { protected BSubNamespace() => throw null; - internal BSubNamespace(ClientPipeline pipeline, Uri endpoint, string apiVersion) => throw null; + internal BSubNamespace(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, string apiVersion) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/ExtensibleStrings.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/ExtensibleStrings.cs index e3eccdf112f..f0db940ded2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/ExtensibleStrings.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/ExtensibleStrings.cs @@ -14,7 +14,7 @@ public partial class ExtensibleStrings { protected ExtensibleStrings() => throw null; - internal ExtensibleStrings(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtensibleStrings(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/ModelProperties.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/ModelProperties.cs index 145be0ededd..15550618361 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/ModelProperties.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/ModelProperties.cs @@ -14,7 +14,7 @@ public partial class ModelProperties { protected ModelProperties() => throw null; - internal ModelProperties(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelProperties(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Models.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Models.cs index ec89fe4d3f7..eca4be2c027 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Models.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Models.cs @@ -14,7 +14,7 @@ public partial class Models { protected Models() => throw null; - internal Models(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Models(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Operations.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Operations.cs index 1dfa7cdcfbe..98457a73a18 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Operations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Operations.cs @@ -14,7 +14,7 @@ public partial class Operations { protected Operations() => throw null; - internal Operations(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Operations(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Parameters.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Parameters.cs index fb1b60d7ad1..95cc38f20f8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Parameters.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Parameters.cs @@ -14,7 +14,7 @@ public partial class Parameters { protected Parameters() => throw null; - internal Parameters(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Parameters(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/ReservedOperationBodyParams.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/ReservedOperationBodyParams.cs index fe2765a0f7e..75bc8b41404 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/ReservedOperationBodyParams.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/ReservedOperationBodyParams.cs @@ -15,7 +15,7 @@ public partial class ReservedOperationBodyParams { protected ReservedOperationBodyParams() => throw null; - internal ReservedOperationBodyParams(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ReservedOperationBodyParams(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Basic.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Basic.cs index 6864baba20c..f02009929d9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Basic.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Basic.cs @@ -15,7 +15,7 @@ public partial class Basic { protected Basic() => throw null; - internal Basic(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Basic(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Named.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Named.cs index dcd42a02d7d..a87b40ef06b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Named.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Named.cs @@ -15,7 +15,7 @@ public partial class Named { protected Named() => throw null; - internal Named(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Named(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs index 6e6993579c0..f91a6639ef5 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs @@ -16,7 +16,7 @@ public partial class Protocol { protected Protocol() => throw null; - internal Protocol(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Protocol(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs index d69c2a81e78..a194480ccde 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs @@ -15,7 +15,7 @@ public partial class ProtocolData { protected ProtocolData() => throw null; - internal ProtocolData(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ProtocolData(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Retrieve.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Retrieve.cs index c3a3454024b..20849b9c15e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Retrieve.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Retrieve.cs @@ -15,7 +15,7 @@ public partial class Retrieve { protected Retrieve() => throw null; - internal Retrieve(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Retrieve(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Unnamed.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Unnamed.cs index 78819a96162..1d92a2c4b49 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Unnamed.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Unnamed.cs @@ -15,7 +15,7 @@ public partial class Unnamed { protected Unnamed() => throw null; - internal Unnamed(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Unnamed(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/BooleanValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/BooleanValue.cs index d290fed4d03..4b879ce7784 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/BooleanValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/BooleanValue.cs @@ -15,7 +15,7 @@ public partial class BooleanValue { protected BooleanValue() => throw null; - internal BooleanValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal BooleanValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/DatetimeValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/DatetimeValue.cs index c7cd4718045..49d8a8e2585 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/DatetimeValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/DatetimeValue.cs @@ -15,7 +15,7 @@ public partial class DatetimeValue { protected DatetimeValue() => throw null; - internal DatetimeValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal DatetimeValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/DurationValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/DurationValue.cs index d41e7956ded..ea8b39fa587 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/DurationValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/DurationValue.cs @@ -15,7 +15,7 @@ public partial class DurationValue { protected DurationValue() => throw null; - internal DurationValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal DurationValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Float32Value.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Float32Value.cs index 139091b980e..92ffd9dce81 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Float32Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Float32Value.cs @@ -15,7 +15,7 @@ public partial class Float32Value { protected Float32Value() => throw null; - internal Float32Value(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Float32Value(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Int32Value.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Int32Value.cs index b38525f6496..220afb32817 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Int32Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Int32Value.cs @@ -15,7 +15,7 @@ public partial class Int32Value { protected Int32Value() => throw null; - internal Int32Value(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Int32Value(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Int64Value.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Int64Value.cs index 952fb96e4cc..239fcdbfb9e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Int64Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Int64Value.cs @@ -15,7 +15,7 @@ public partial class Int64Value { protected Int64Value() => throw null; - internal Int64Value(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Int64Value(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/ModelValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/ModelValue.cs index 333dfabdcff..6c4d17c6afa 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/ModelValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/ModelValue.cs @@ -15,7 +15,7 @@ public partial class ModelValue { protected ModelValue() => throw null; - internal ModelValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableBooleanValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableBooleanValue.cs index eb0177c832a..0acef378880 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableBooleanValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableBooleanValue.cs @@ -15,7 +15,7 @@ public partial class NullableBooleanValue { protected NullableBooleanValue() => throw null; - internal NullableBooleanValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal NullableBooleanValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableFloatValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableFloatValue.cs index ab401bf7739..fc2a2325977 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableFloatValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableFloatValue.cs @@ -15,7 +15,7 @@ public partial class NullableFloatValue { protected NullableFloatValue() => throw null; - internal NullableFloatValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal NullableFloatValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableInt32Value.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableInt32Value.cs index df168f64ea3..3f395c81287 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableInt32Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableInt32Value.cs @@ -15,7 +15,7 @@ public partial class NullableInt32Value { protected NullableInt32Value() => throw null; - internal NullableInt32Value(ClientPipeline pipeline, Uri endpoint) => throw null; + internal NullableInt32Value(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableModelValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableModelValue.cs index 336d4186bd1..4110323f5ed 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableModelValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableModelValue.cs @@ -15,7 +15,7 @@ public partial class NullableModelValue { protected NullableModelValue() => throw null; - internal NullableModelValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal NullableModelValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableStringValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableStringValue.cs index f22d0fb8493..36e7904c2f6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableStringValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/NullableStringValue.cs @@ -15,7 +15,7 @@ public partial class NullableStringValue { protected NullableStringValue() => throw null; - internal NullableStringValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal NullableStringValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/StringValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/StringValue.cs index e330fa6ffa4..3970942a7f1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/StringValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/StringValue.cs @@ -15,7 +15,7 @@ public partial class StringValue { protected StringValue() => throw null; - internal StringValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal StringValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/UnknownValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/UnknownValue.cs index a049ca8e8b3..6f74d2e21b6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/UnknownValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/UnknownValue.cs @@ -15,7 +15,7 @@ public partial class UnknownValue { protected UnknownValue() => throw null; - internal UnknownValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnknownValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/BooleanValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/BooleanValue.cs index f4727e78b82..fd78c5d53f9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/BooleanValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/BooleanValue.cs @@ -15,7 +15,7 @@ public partial class BooleanValue { protected BooleanValue() => throw null; - internal BooleanValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal BooleanValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/DatetimeValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/DatetimeValue.cs index 03241999bc4..8376ca226c9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/DatetimeValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/DatetimeValue.cs @@ -15,7 +15,7 @@ public partial class DatetimeValue { protected DatetimeValue() => throw null; - internal DatetimeValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal DatetimeValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/DurationValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/DurationValue.cs index 025fb9260d0..8f1adadd9e8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/DurationValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/DurationValue.cs @@ -15,7 +15,7 @@ public partial class DurationValue { protected DurationValue() => throw null; - internal DurationValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal DurationValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Float32Value.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Float32Value.cs index bb5152ac021..ba0923dbab2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Float32Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Float32Value.cs @@ -15,7 +15,7 @@ public partial class Float32Value { protected Float32Value() => throw null; - internal Float32Value(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Float32Value(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Int32Value.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Int32Value.cs index 943b687f046..53961df6489 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Int32Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Int32Value.cs @@ -15,7 +15,7 @@ public partial class Int32Value { protected Int32Value() => throw null; - internal Int32Value(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Int32Value(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Int64Value.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Int64Value.cs index 7963141ea14..c583dbeb3b6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Int64Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Int64Value.cs @@ -15,7 +15,7 @@ public partial class Int64Value { protected Int64Value() => throw null; - internal Int64Value(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Int64Value(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/ModelValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/ModelValue.cs index 58bd7395fb9..de16cb62848 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/ModelValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/ModelValue.cs @@ -15,7 +15,7 @@ public partial class ModelValue { protected ModelValue() => throw null; - internal ModelValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/NullableFloatValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/NullableFloatValue.cs index b1b16591b20..95295ad0e64 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/NullableFloatValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/NullableFloatValue.cs @@ -15,7 +15,7 @@ public partial class NullableFloatValue { protected NullableFloatValue() => throw null; - internal NullableFloatValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal NullableFloatValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/RecursiveModelValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/RecursiveModelValue.cs index eb4eac17013..b9fe05868aa 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/RecursiveModelValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/RecursiveModelValue.cs @@ -15,7 +15,7 @@ public partial class RecursiveModelValue { protected RecursiveModelValue() => throw null; - internal RecursiveModelValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal RecursiveModelValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/StringValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/StringValue.cs index 7fe039c683c..465c7d3880f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/StringValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/StringValue.cs @@ -15,7 +15,7 @@ public partial class StringValue { protected StringValue() => throw null; - internal StringValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal StringValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/UnknownValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/UnknownValue.cs index f91e8911853..135dba3a995 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/UnknownValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/UnknownValue.cs @@ -15,7 +15,7 @@ public partial class UnknownValue { protected UnknownValue() => throw null; - internal UnknownValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnknownValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Generated/String.cs index 30632b37530..bf3d4c52b95 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Generated/String.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Generated/String.cs @@ -14,7 +14,7 @@ public partial class String { protected String() => throw null; - internal String(ClientPipeline pipeline, Uri endpoint) => throw null; + internal String(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Generated/String.cs index 056c892aa72..da4f03c69f4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Generated/String.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Generated/String.cs @@ -14,7 +14,7 @@ public partial class String { protected String() => throw null; - internal String(ClientPipeline pipeline, Uri endpoint) => throw null; + internal String(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadFloat.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadFloat.cs index aa298158cb9..cb4cb946b70 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadFloat.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadFloat.cs @@ -14,7 +14,7 @@ public partial class ExtendsDifferentSpreadFloat { protected ExtendsDifferentSpreadFloat() => throw null; - internal ExtendsDifferentSpreadFloat(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtendsDifferentSpreadFloat(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModel.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModel.cs index eaf913f4276..647c6a83c12 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModel.cs @@ -14,7 +14,7 @@ public partial class ExtendsDifferentSpreadModel { protected ExtendsDifferentSpreadModel() => throw null; - internal ExtendsDifferentSpreadModel(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtendsDifferentSpreadModel(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModelArray.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModelArray.cs index 2aacfeb2d02..7fb21353d7b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModelArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModelArray.cs @@ -14,7 +14,7 @@ public partial class ExtendsDifferentSpreadModelArray { protected ExtendsDifferentSpreadModelArray() => throw null; - internal ExtendsDifferentSpreadModelArray(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtendsDifferentSpreadModelArray(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadString.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadString.cs index 3ee0ddc45c5..1c0dfe8c3ef 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadString.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadString.cs @@ -14,7 +14,7 @@ public partial class ExtendsDifferentSpreadString { protected ExtendsDifferentSpreadString() => throw null; - internal ExtendsDifferentSpreadString(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtendsDifferentSpreadString(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsFloat.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsFloat.cs index 6f55bee1976..5ff6ed0c167 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsFloat.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsFloat.cs @@ -14,7 +14,7 @@ public partial class ExtendsFloat { protected ExtendsFloat() => throw null; - internal ExtendsFloat(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtendsFloat(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsModel.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsModel.cs index a3e6a49c40f..8711249dcd3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsModel.cs @@ -14,7 +14,7 @@ public partial class ExtendsModel { protected ExtendsModel() => throw null; - internal ExtendsModel(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtendsModel(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsModelArray.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsModelArray.cs index 1da8aae31d1..b5a49c4c4bc 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsModelArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsModelArray.cs @@ -14,7 +14,7 @@ public partial class ExtendsModelArray { protected ExtendsModelArray() => throw null; - internal ExtendsModelArray(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtendsModelArray(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsString.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsString.cs index 13a5fbf8c13..84ea33e9c76 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsString.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsString.cs @@ -14,7 +14,7 @@ public partial class ExtendsString { protected ExtendsString() => throw null; - internal ExtendsString(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtendsString(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsUnknown.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsUnknown.cs index 6e539221d9b..96c3d1cb956 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsUnknown.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsUnknown.cs @@ -14,7 +14,7 @@ public partial class ExtendsUnknown { protected ExtendsUnknown() => throw null; - internal ExtendsUnknown(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtendsUnknown(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsUnknownDerived.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsUnknownDerived.cs index f1636a68905..b344aab38de 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsUnknownDerived.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsUnknownDerived.cs @@ -14,7 +14,7 @@ public partial class ExtendsUnknownDerived { protected ExtendsUnknownDerived() => throw null; - internal ExtendsUnknownDerived(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtendsUnknownDerived(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsUnknownDiscriminated.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsUnknownDiscriminated.cs index 261d9de0a04..ddd339f988b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsUnknownDiscriminated.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/ExtendsUnknownDiscriminated.cs @@ -14,7 +14,7 @@ public partial class ExtendsUnknownDiscriminated { protected ExtendsUnknownDiscriminated() => throw null; - internal ExtendsUnknownDiscriminated(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtendsUnknownDiscriminated(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsFloat.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsFloat.cs index 8be79e2ef26..56c61de0ba9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsFloat.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsFloat.cs @@ -14,7 +14,7 @@ public partial class IsFloat { protected IsFloat() => throw null; - internal IsFloat(ClientPipeline pipeline, Uri endpoint) => throw null; + internal IsFloat(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsModel.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsModel.cs index 65a3fa72022..e372b0ca9c6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsModel.cs @@ -14,7 +14,7 @@ public partial class IsModel { protected IsModel() => throw null; - internal IsModel(ClientPipeline pipeline, Uri endpoint) => throw null; + internal IsModel(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsModelArray.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsModelArray.cs index a4a639ee799..8894af17c45 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsModelArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsModelArray.cs @@ -14,7 +14,7 @@ public partial class IsModelArray { protected IsModelArray() => throw null; - internal IsModelArray(ClientPipeline pipeline, Uri endpoint) => throw null; + internal IsModelArray(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsString.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsString.cs index 10718fca333..678d3b82506 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsString.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsString.cs @@ -14,7 +14,7 @@ public partial class IsString { protected IsString() => throw null; - internal IsString(ClientPipeline pipeline, Uri endpoint) => throw null; + internal IsString(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsUnknown.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsUnknown.cs index 19c46424094..602a5a50607 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsUnknown.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsUnknown.cs @@ -14,7 +14,7 @@ public partial class IsUnknown { protected IsUnknown() => throw null; - internal IsUnknown(ClientPipeline pipeline, Uri endpoint) => throw null; + internal IsUnknown(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsUnknownDerived.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsUnknownDerived.cs index 50e217613ef..6de4a91f0c0 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsUnknownDerived.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsUnknownDerived.cs @@ -14,7 +14,7 @@ public partial class IsUnknownDerived { protected IsUnknownDerived() => throw null; - internal IsUnknownDerived(ClientPipeline pipeline, Uri endpoint) => throw null; + internal IsUnknownDerived(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsUnknownDiscriminated.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsUnknownDiscriminated.cs index f6470550016..0fca23355e8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsUnknownDiscriminated.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/IsUnknownDiscriminated.cs @@ -14,7 +14,7 @@ public partial class IsUnknownDiscriminated { protected IsUnknownDiscriminated() => throw null; - internal IsUnknownDiscriminated(ClientPipeline pipeline, Uri endpoint) => throw null; + internal IsUnknownDiscriminated(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/MultipleSpread.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/MultipleSpread.cs index 47355266fd2..39a48e4093c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/MultipleSpread.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/MultipleSpread.cs @@ -14,7 +14,7 @@ public partial class MultipleSpread { protected MultipleSpread() => throw null; - internal MultipleSpread(ClientPipeline pipeline, Uri endpoint) => throw null; + internal MultipleSpread(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentFloat.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentFloat.cs index 33d2e052e33..717f9978cfd 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentFloat.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentFloat.cs @@ -14,7 +14,7 @@ public partial class SpreadDifferentFloat { protected SpreadDifferentFloat() => throw null; - internal SpreadDifferentFloat(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpreadDifferentFloat(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentModel.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentModel.cs index a69132c7526..9afca0a2af3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentModel.cs @@ -14,7 +14,7 @@ public partial class SpreadDifferentModel { protected SpreadDifferentModel() => throw null; - internal SpreadDifferentModel(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpreadDifferentModel(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentModelArray.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentModelArray.cs index 5c6d809aa7c..654387b4070 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentModelArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentModelArray.cs @@ -14,7 +14,7 @@ public partial class SpreadDifferentModelArray { protected SpreadDifferentModelArray() => throw null; - internal SpreadDifferentModelArray(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpreadDifferentModelArray(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentString.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentString.cs index 4123898a1ec..0009372244a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentString.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadDifferentString.cs @@ -14,7 +14,7 @@ public partial class SpreadDifferentString { protected SpreadDifferentString() => throw null; - internal SpreadDifferentString(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpreadDifferentString(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadFloat.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadFloat.cs index a529e2b406f..77be01a9b6b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadFloat.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadFloat.cs @@ -14,7 +14,7 @@ public partial class SpreadFloat { protected SpreadFloat() => throw null; - internal SpreadFloat(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpreadFloat(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadModel.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadModel.cs index 002a15917bc..aa1f3ee55cc 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadModel.cs @@ -14,7 +14,7 @@ public partial class SpreadModel { protected SpreadModel() => throw null; - internal SpreadModel(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpreadModel(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadModelArray.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadModelArray.cs index bdc347b9941..f9321506f9d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadModelArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadModelArray.cs @@ -14,7 +14,7 @@ public partial class SpreadModelArray { protected SpreadModelArray() => throw null; - internal SpreadModelArray(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpreadModelArray(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion.cs index dfd6786a0ab..10484d7e035 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion.cs @@ -14,7 +14,7 @@ public partial class SpreadRecordNonDiscriminatedUnion { protected SpreadRecordNonDiscriminatedUnion() => throw null; - internal SpreadRecordNonDiscriminatedUnion(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpreadRecordNonDiscriminatedUnion(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion2.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion2.cs index d33e1a547dc..7eb3905ae59 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion2.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion2.cs @@ -14,7 +14,7 @@ public partial class SpreadRecordNonDiscriminatedUnion2 { protected SpreadRecordNonDiscriminatedUnion2() => throw null; - internal SpreadRecordNonDiscriminatedUnion2(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpreadRecordNonDiscriminatedUnion2(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion3.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion3.cs index 76b3cf8b1fe..7608aa8135c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion3.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion3.cs @@ -14,7 +14,7 @@ public partial class SpreadRecordNonDiscriminatedUnion3 { protected SpreadRecordNonDiscriminatedUnion3() => throw null; - internal SpreadRecordNonDiscriminatedUnion3(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpreadRecordNonDiscriminatedUnion3(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordUnion.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordUnion.cs index 97de92c85f4..d541ada17c4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordUnion.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadRecordUnion.cs @@ -14,7 +14,7 @@ public partial class SpreadRecordUnion { protected SpreadRecordUnion() => throw null; - internal SpreadRecordUnion(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpreadRecordUnion(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadString.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadString.cs index 4864d532e5a..a10227fc00f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadString.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/SpreadString.cs @@ -14,7 +14,7 @@ public partial class SpreadString { protected SpreadString() => throw null; - internal SpreadString(ClientPipeline pipeline, Uri endpoint) => throw null; + internal SpreadString(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Bytes.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Bytes.cs index 4e6ff0b6f10..bbfc937a4f3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Bytes.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Bytes.cs @@ -14,7 +14,7 @@ public partial class Bytes { protected Bytes() => throw null; - internal Bytes(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Bytes(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/CollectionsByte.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/CollectionsByte.cs index 147ed22adef..708d4d0363a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/CollectionsByte.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/CollectionsByte.cs @@ -14,7 +14,7 @@ public partial class CollectionsByte { protected CollectionsByte() => throw null; - internal CollectionsByte(ClientPipeline pipeline, Uri endpoint) => throw null; + internal CollectionsByte(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/CollectionsModel.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/CollectionsModel.cs index a2cb3752dd3..e0bf037204f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/CollectionsModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/CollectionsModel.cs @@ -14,7 +14,7 @@ public partial class CollectionsModel { protected CollectionsModel() => throw null; - internal CollectionsModel(ClientPipeline pipeline, Uri endpoint) => throw null; + internal CollectionsModel(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/CollectionsString.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/CollectionsString.cs index 9ebdb4ed447..b8e3edc5686 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/CollectionsString.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/CollectionsString.cs @@ -14,7 +14,7 @@ public partial class CollectionsString { protected CollectionsString() => throw null; - internal CollectionsString(ClientPipeline pipeline, Uri endpoint) => throw null; + internal CollectionsString(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Datetime.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Datetime.cs index 65fd66ab449..f621e6d79ea 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Datetime.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Datetime.cs @@ -14,7 +14,7 @@ public partial class Datetime { protected Datetime() => throw null; - internal Datetime(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Datetime(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Duration.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Duration.cs index d1091acfe3d..2f51e177918 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Duration.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Duration.cs @@ -14,7 +14,7 @@ public partial class Duration { protected Duration() => throw null; - internal Duration(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Duration(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/String.cs index 786c381fb0b..90c6b280ad2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/String.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/String.cs @@ -14,7 +14,7 @@ public partial class String { protected String() => throw null; - internal String(ClientPipeline pipeline, Uri endpoint) => throw null; + internal String(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/BooleanLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/BooleanLiteral.cs index 6dca0711f46..7d177aa2ae7 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/BooleanLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/BooleanLiteral.cs @@ -14,7 +14,7 @@ public partial class BooleanLiteral { protected BooleanLiteral() => throw null; - internal BooleanLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal BooleanLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Bytes.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Bytes.cs index 44c535cc253..15055740fe3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Bytes.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Bytes.cs @@ -14,7 +14,7 @@ public partial class Bytes { protected Bytes() => throw null; - internal Bytes(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Bytes(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/CollectionsByte.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/CollectionsByte.cs index 808a6ca8b49..f5d10fbdd0a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/CollectionsByte.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/CollectionsByte.cs @@ -14,7 +14,7 @@ public partial class CollectionsByte { protected CollectionsByte() => throw null; - internal CollectionsByte(ClientPipeline pipeline, Uri endpoint) => throw null; + internal CollectionsByte(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/CollectionsModel.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/CollectionsModel.cs index 00be1dcec43..f37987f500e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/CollectionsModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/CollectionsModel.cs @@ -14,7 +14,7 @@ public partial class CollectionsModel { protected CollectionsModel() => throw null; - internal CollectionsModel(ClientPipeline pipeline, Uri endpoint) => throw null; + internal CollectionsModel(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Datetime.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Datetime.cs index 3b2e4f0017b..2a7a3c232c3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Datetime.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Datetime.cs @@ -14,7 +14,7 @@ public partial class Datetime { protected Datetime() => throw null; - internal Datetime(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Datetime(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Duration.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Duration.cs index 9a9c63ae762..24d60ca25f1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Duration.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Duration.cs @@ -14,7 +14,7 @@ public partial class Duration { protected Duration() => throw null; - internal Duration(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Duration(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/FloatLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/FloatLiteral.cs index f7504a61cf2..1602cbb113a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/FloatLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/FloatLiteral.cs @@ -14,7 +14,7 @@ public partial class FloatLiteral { protected FloatLiteral() => throw null; - internal FloatLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal FloatLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/IntLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/IntLiteral.cs index 3309e35bfe2..5776473d281 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/IntLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/IntLiteral.cs @@ -14,7 +14,7 @@ public partial class IntLiteral { protected IntLiteral() => throw null; - internal IntLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal IntLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/PlainDate.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/PlainDate.cs index f95ec369404..4707037d2dc 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/PlainDate.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/PlainDate.cs @@ -14,7 +14,7 @@ public partial class PlainDate { protected PlainDate() => throw null; - internal PlainDate(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PlainDate(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/PlainTime.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/PlainTime.cs index 91c30419caf..eb2419c7c13 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/PlainTime.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/PlainTime.cs @@ -14,7 +14,7 @@ public partial class PlainTime { protected PlainTime() => throw null; - internal PlainTime(ClientPipeline pipeline, Uri endpoint) => throw null; + internal PlainTime(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/RequiredAndOptional.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/RequiredAndOptional.cs index 3253e5b109d..53ecc14244d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/RequiredAndOptional.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/RequiredAndOptional.cs @@ -14,7 +14,7 @@ public partial class RequiredAndOptional { protected RequiredAndOptional() => throw null; - internal RequiredAndOptional(ClientPipeline pipeline, Uri endpoint) => throw null; + internal RequiredAndOptional(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/String.cs index def30985883..f15a3d484b6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/String.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/String.cs @@ -14,7 +14,7 @@ public partial class String { protected String() => throw null; - internal String(ClientPipeline pipeline, Uri endpoint) => throw null; + internal String(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/StringLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/StringLiteral.cs index a60ba46a07e..71719bcb379 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/StringLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/StringLiteral.cs @@ -14,7 +14,7 @@ public partial class StringLiteral { protected StringLiteral() => throw null; - internal StringLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal StringLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/UnionFloatLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/UnionFloatLiteral.cs index 9471446beff..abc3cacd508 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/UnionFloatLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/UnionFloatLiteral.cs @@ -14,7 +14,7 @@ public partial class UnionFloatLiteral { protected UnionFloatLiteral() => throw null; - internal UnionFloatLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnionFloatLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/UnionIntLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/UnionIntLiteral.cs index 45324fc4c4d..a96d1c2b442 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/UnionIntLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/UnionIntLiteral.cs @@ -14,7 +14,7 @@ public partial class UnionIntLiteral { protected UnionIntLiteral() => throw null; - internal UnionIntLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnionIntLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/UnionStringLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/UnionStringLiteral.cs index 4a44db8c460..aac451971f2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/UnionStringLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/UnionStringLiteral.cs @@ -14,7 +14,7 @@ public partial class UnionStringLiteral { protected UnionStringLiteral() => throw null; - internal UnionStringLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnionStringLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Boolean.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Boolean.cs index f4e93d97aa5..5d427642dcd 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Boolean.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Boolean.cs @@ -14,7 +14,7 @@ public partial class Boolean { protected Boolean() => throw null; - internal Boolean(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Boolean(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/BooleanLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/BooleanLiteral.cs index e2bdc72c983..16f7ce99fb1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/BooleanLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/BooleanLiteral.cs @@ -14,7 +14,7 @@ public partial class BooleanLiteral { protected BooleanLiteral() => throw null; - internal BooleanLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal BooleanLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Bytes.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Bytes.cs index 428e3397974..c625dfd9990 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Bytes.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Bytes.cs @@ -14,7 +14,7 @@ public partial class Bytes { protected Bytes() => throw null; - internal Bytes(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Bytes(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/CollectionsInt.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/CollectionsInt.cs index f49bb79df44..cc3066f3c6a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/CollectionsInt.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/CollectionsInt.cs @@ -14,7 +14,7 @@ public partial class CollectionsInt { protected CollectionsInt() => throw null; - internal CollectionsInt(ClientPipeline pipeline, Uri endpoint) => throw null; + internal CollectionsInt(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/CollectionsModel.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/CollectionsModel.cs index e40359c230c..c72880a1bed 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/CollectionsModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/CollectionsModel.cs @@ -14,7 +14,7 @@ public partial class CollectionsModel { protected CollectionsModel() => throw null; - internal CollectionsModel(ClientPipeline pipeline, Uri endpoint) => throw null; + internal CollectionsModel(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/CollectionsString.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/CollectionsString.cs index 18a7083e450..9c03164e798 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/CollectionsString.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/CollectionsString.cs @@ -14,7 +14,7 @@ public partial class CollectionsString { protected CollectionsString() => throw null; - internal CollectionsString(ClientPipeline pipeline, Uri endpoint) => throw null; + internal CollectionsString(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Datetime.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Datetime.cs index 9b6385a11da..07ddfb05c8e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Datetime.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Datetime.cs @@ -14,7 +14,7 @@ public partial class Datetime { protected Datetime() => throw null; - internal Datetime(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Datetime(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Decimal.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Decimal.cs index 90ac68ab77b..02a6192473d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Decimal.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Decimal.cs @@ -14,7 +14,7 @@ public partial class Decimal { protected Decimal() => throw null; - internal Decimal(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Decimal(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Decimal128.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Decimal128.cs index 06b87e33722..bee286f499f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Decimal128.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Decimal128.cs @@ -14,7 +14,7 @@ public partial class Decimal128 { protected Decimal128() => throw null; - internal Decimal128(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Decimal128(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/DictionaryString.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/DictionaryString.cs index d1d5dc8e06e..967227b0f7b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/DictionaryString.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/DictionaryString.cs @@ -14,7 +14,7 @@ public partial class DictionaryString { protected DictionaryString() => throw null; - internal DictionaryString(ClientPipeline pipeline, Uri endpoint) => throw null; + internal DictionaryString(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Duration.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Duration.cs index 304ea7ce05e..a8785ce1d92 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Duration.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Duration.cs @@ -14,7 +14,7 @@ public partial class Duration { protected Duration() => throw null; - internal Duration(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Duration(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Enum.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Enum.cs index 6ee002b6a38..10ece0439c9 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Enum.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Enum.cs @@ -14,7 +14,7 @@ public partial class Enum { protected Enum() => throw null; - internal Enum(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Enum(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/ExtensibleEnum.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/ExtensibleEnum.cs index 05e0b19b4c5..65f621b6f41 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/ExtensibleEnum.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/ExtensibleEnum.cs @@ -14,7 +14,7 @@ public partial class ExtensibleEnum { protected ExtensibleEnum() => throw null; - internal ExtensibleEnum(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExtensibleEnum(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Float.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Float.cs index 31ca39d2378..df386654b0d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Float.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Float.cs @@ -14,7 +14,7 @@ public partial class Float { protected Float() => throw null; - internal Float(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Float(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/FloatLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/FloatLiteral.cs index 272147c3f79..7c0153c456e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/FloatLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/FloatLiteral.cs @@ -14,7 +14,7 @@ public partial class FloatLiteral { protected FloatLiteral() => throw null; - internal FloatLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal FloatLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Int.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Int.cs index 42d5cab9109..1615f19c127 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Int.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Int.cs @@ -14,7 +14,7 @@ public partial class Int { protected Int() => throw null; - internal Int(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Int(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/IntLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/IntLiteral.cs index 1504957189f..ac34278c5f1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/IntLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/IntLiteral.cs @@ -14,7 +14,7 @@ public partial class IntLiteral { protected IntLiteral() => throw null; - internal IntLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal IntLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Model.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Model.cs index 1c306e46d07..410a6c472b1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Model.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Model.cs @@ -14,7 +14,7 @@ public partial class Model { protected Model() => throw null; - internal Model(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Model(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Never.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Never.cs index 8e08e0fa31e..6e6cb8c4534 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Never.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Never.cs @@ -14,7 +14,7 @@ public partial class Never { protected Never() => throw null; - internal Never(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Never(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/String.cs index c49f8856b95..7da9bcfb9d4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/String.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/String.cs @@ -14,7 +14,7 @@ public partial class String { protected String() => throw null; - internal String(ClientPipeline pipeline, Uri endpoint) => throw null; + internal String(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/StringLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/StringLiteral.cs index 4e4108e032f..37d416927c4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/StringLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/StringLiteral.cs @@ -14,7 +14,7 @@ public partial class StringLiteral { protected StringLiteral() => throw null; - internal StringLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal StringLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionEnumValue.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionEnumValue.cs index bc5592782ce..3501ac27a4d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionEnumValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionEnumValue.cs @@ -14,7 +14,7 @@ public partial class UnionEnumValue { protected UnionEnumValue() => throw null; - internal UnionEnumValue(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnionEnumValue(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionFloatLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionFloatLiteral.cs index b722ec14e86..ad193b09543 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionFloatLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionFloatLiteral.cs @@ -14,7 +14,7 @@ public partial class UnionFloatLiteral { protected UnionFloatLiteral() => throw null; - internal UnionFloatLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnionFloatLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionIntLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionIntLiteral.cs index 32e42a85f40..720f1d73903 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionIntLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionIntLiteral.cs @@ -14,7 +14,7 @@ public partial class UnionIntLiteral { protected UnionIntLiteral() => throw null; - internal UnionIntLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnionIntLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionStringLiteral.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionStringLiteral.cs index fde1c748c4d..b7b3dd95115 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionStringLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnionStringLiteral.cs @@ -14,7 +14,7 @@ public partial class UnionStringLiteral { protected UnionStringLiteral() => throw null; - internal UnionStringLiteral(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnionStringLiteral(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownArray.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownArray.cs index f40c76b820a..4026f1e9d1a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownArray.cs @@ -14,7 +14,7 @@ public partial class UnknownArray { protected UnknownArray() => throw null; - internal UnknownArray(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnknownArray(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownDict.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownDict.cs index 81fdff22645..b07506da1be 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownDict.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownDict.cs @@ -14,7 +14,7 @@ public partial class UnknownDict { protected UnknownDict() => throw null; - internal UnknownDict(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnknownDict(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownInt.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownInt.cs index fb2f59c1cc5..539342425de 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownInt.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownInt.cs @@ -14,7 +14,7 @@ public partial class UnknownInt { protected UnknownInt() => throw null; - internal UnknownInt(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnknownInt(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownString.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownString.cs index bb587ae7036..7fc80da863b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownString.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/UnknownString.cs @@ -14,7 +14,7 @@ public partial class UnknownString { protected UnknownString() => throw null; - internal UnknownString(ClientPipeline pipeline, Uri endpoint) => throw null; + internal UnknownString(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Boolean.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Boolean.cs index f3a074a4c57..96d77c0c440 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Boolean.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Boolean.cs @@ -14,7 +14,7 @@ public partial class Boolean { protected Boolean() => throw null; - internal Boolean(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Boolean(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Decimal128Type.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Decimal128Type.cs index 6e3566ea66a..7988e1d9ab6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Decimal128Type.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Decimal128Type.cs @@ -14,7 +14,7 @@ public partial class Decimal128Type { protected Decimal128Type() => throw null; - internal Decimal128Type(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Decimal128Type(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Decimal128Verify.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Decimal128Verify.cs index 11e138c5ac3..70882364cc3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Decimal128Verify.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Decimal128Verify.cs @@ -15,7 +15,7 @@ public partial class Decimal128Verify { protected Decimal128Verify() => throw null; - internal Decimal128Verify(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Decimal128Verify(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/DecimalType.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/DecimalType.cs index c225451e654..5608dcbbf9f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/DecimalType.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/DecimalType.cs @@ -14,7 +14,7 @@ public partial class DecimalType { protected DecimalType() => throw null; - internal DecimalType(ClientPipeline pipeline, Uri endpoint) => throw null; + internal DecimalType(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/DecimalVerify.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/DecimalVerify.cs index 6b00b6964ac..105cb30ac2e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/DecimalVerify.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/DecimalVerify.cs @@ -15,7 +15,7 @@ public partial class DecimalVerify { protected DecimalVerify() => throw null; - internal DecimalVerify(ClientPipeline pipeline, Uri endpoint) => throw null; + internal DecimalVerify(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/String.cs index e58e6a99949..2bd7941052f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/String.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/String.cs @@ -14,7 +14,7 @@ public partial class String { protected String() => throw null; - internal String(ClientPipeline pipeline, Uri endpoint) => throw null; + internal String(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Unknown.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Unknown.cs index ad255b77e27..b5523784a9c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Unknown.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Unknown.cs @@ -14,7 +14,7 @@ public partial class Unknown { protected Unknown() => throw null; - internal Unknown(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Unknown(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/CustomDiscriminator.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/CustomDiscriminator.cs index 04834a9f6e2..85cd22751cb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/CustomDiscriminator.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/CustomDiscriminator.cs @@ -11,7 +11,7 @@ public partial class CustomDiscriminator { protected CustomDiscriminator() => throw null; - internal CustomDiscriminator(ClientPipeline pipeline, Uri endpoint) => throw null; + internal CustomDiscriminator(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/CustomDiscriminatorOperations.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/CustomDiscriminatorOperations.cs index 886f9a0b28f..b662d0e1a9f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/CustomDiscriminatorOperations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/CustomDiscriminatorOperations.cs @@ -14,7 +14,7 @@ public partial class CustomDiscriminatorOperations { protected CustomDiscriminatorOperations() => throw null; - internal CustomDiscriminatorOperations(ClientPipeline pipeline, Uri endpoint) => throw null; + internal CustomDiscriminatorOperations(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/EnumDiscriminator.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/EnumDiscriminator.cs index aa0efc63a4a..7da2f6fce19 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/EnumDiscriminator.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/EnumDiscriminator.cs @@ -11,7 +11,7 @@ public partial class EnumDiscriminator { protected EnumDiscriminator() => throw null; - internal EnumDiscriminator(ClientPipeline pipeline, Uri endpoint) => throw null; + internal EnumDiscriminator(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/EnumDiscriminatorOperations.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/EnumDiscriminatorOperations.cs index 7d1691a0a57..bca8ae31f84 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/EnumDiscriminatorOperations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/EnumDiscriminatorOperations.cs @@ -14,7 +14,7 @@ public partial class EnumDiscriminatorOperations { protected EnumDiscriminatorOperations() => throw null; - internal EnumDiscriminatorOperations(ClientPipeline pipeline, Uri endpoint) => throw null; + internal EnumDiscriminatorOperations(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/ExplicitDiscriminator.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/ExplicitDiscriminator.cs index 1360bf4bfd5..031d7523f02 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/ExplicitDiscriminator.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/ExplicitDiscriminator.cs @@ -11,7 +11,7 @@ public partial class ExplicitDiscriminator { protected ExplicitDiscriminator() => throw null; - internal ExplicitDiscriminator(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExplicitDiscriminator(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/ExplicitDiscriminatorOperations.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/ExplicitDiscriminatorOperations.cs index b3d5ea205d3..0d46c0ee767 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/ExplicitDiscriminatorOperations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/ExplicitDiscriminatorOperations.cs @@ -14,7 +14,7 @@ public partial class ExplicitDiscriminatorOperations { protected ExplicitDiscriminatorOperations() => throw null; - internal ExplicitDiscriminatorOperations(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ExplicitDiscriminatorOperations(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/InjectedDiscriminator.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/InjectedDiscriminator.cs index 163e7ef0fbe..2358b7130ef 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/InjectedDiscriminator.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/InjectedDiscriminator.cs @@ -11,7 +11,7 @@ public partial class InjectedDiscriminator { protected InjectedDiscriminator() => throw null; - internal InjectedDiscriminator(ClientPipeline pipeline, Uri endpoint) => throw null; + internal InjectedDiscriminator(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/InjectedDiscriminatorOperations.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/InjectedDiscriminatorOperations.cs index 58e306c9167..cbfdf2b85ba 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/InjectedDiscriminatorOperations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/InjectedDiscriminatorOperations.cs @@ -14,7 +14,7 @@ public partial class InjectedDiscriminatorOperations { protected InjectedDiscriminatorOperations() => throw null; - internal InjectedDiscriminatorOperations(ClientPipeline pipeline, Uri endpoint) => throw null; + internal InjectedDiscriminatorOperations(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/Recursive.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/Recursive.cs index c0a1c77ff64..0df62ba2f7f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/Recursive.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/extends/src/Generated/Recursive.cs @@ -14,7 +14,7 @@ public partial class Recursive { protected Recursive() => throw null; - internal Recursive(ClientPipeline pipeline, Uri endpoint) => throw null; + internal Recursive(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/EnumsOnly.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/EnumsOnly.cs index 326e87184ee..742a27f1434 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/EnumsOnly.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/EnumsOnly.cs @@ -14,7 +14,7 @@ public partial class EnumsOnly { protected EnumsOnly() => throw null; - internal EnumsOnly(ClientPipeline pipeline, Uri endpoint) => throw null; + internal EnumsOnly(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/FloatsOnly.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/FloatsOnly.cs index 687ca26b9d4..0807d1e03e4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/FloatsOnly.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/FloatsOnly.cs @@ -14,7 +14,7 @@ public partial class FloatsOnly { protected FloatsOnly() => throw null; - internal FloatsOnly(ClientPipeline pipeline, Uri endpoint) => throw null; + internal FloatsOnly(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/IntsOnly.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/IntsOnly.cs index d9e64843d11..ec5ff761c92 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/IntsOnly.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/IntsOnly.cs @@ -14,7 +14,7 @@ public partial class IntsOnly { protected IntsOnly() => throw null; - internal IntsOnly(ClientPipeline pipeline, Uri endpoint) => throw null; + internal IntsOnly(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/MixedLiterals.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/MixedLiterals.cs index 7ee7a6ee49c..3133b298f36 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/MixedLiterals.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/MixedLiterals.cs @@ -14,7 +14,7 @@ public partial class MixedLiterals { protected MixedLiterals() => throw null; - internal MixedLiterals(ClientPipeline pipeline, Uri endpoint) => throw null; + internal MixedLiterals(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/MixedTypes.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/MixedTypes.cs index b7ae1cff2e4..d56283b1f65 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/MixedTypes.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/MixedTypes.cs @@ -14,7 +14,7 @@ public partial class MixedTypes { protected MixedTypes() => throw null; - internal MixedTypes(ClientPipeline pipeline, Uri endpoint) => throw null; + internal MixedTypes(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/ModelsOnly.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/ModelsOnly.cs index ebb37812dc0..6f440496575 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/ModelsOnly.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/ModelsOnly.cs @@ -14,7 +14,7 @@ public partial class ModelsOnly { protected ModelsOnly() => throw null; - internal ModelsOnly(ClientPipeline pipeline, Uri endpoint) => throw null; + internal ModelsOnly(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringAndArray.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringAndArray.cs index 0a470dd358d..9a513978f95 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringAndArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringAndArray.cs @@ -14,7 +14,7 @@ public partial class StringAndArray { protected StringAndArray() => throw null; - internal StringAndArray(ClientPipeline pipeline, Uri endpoint) => throw null; + internal StringAndArray(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringExtensible.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringExtensible.cs index c6d886ad068..cbd5b04b002 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringExtensible.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringExtensible.cs @@ -14,7 +14,7 @@ public partial class StringExtensible { protected StringExtensible() => throw null; - internal StringExtensible(ClientPipeline pipeline, Uri endpoint) => throw null; + internal StringExtensible(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringExtensibleNamed.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringExtensibleNamed.cs index 85a4d399263..a7b44f55a63 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringExtensibleNamed.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringExtensibleNamed.cs @@ -14,7 +14,7 @@ public partial class StringExtensibleNamed { protected StringExtensibleNamed() => throw null; - internal StringExtensibleNamed(ClientPipeline pipeline, Uri endpoint) => throw null; + internal StringExtensibleNamed(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringsOnly.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringsOnly.cs index 317c4c7ca07..f402864ff30 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringsOnly.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/StringsOnly.cs @@ -14,7 +14,7 @@ public partial class StringsOnly { protected StringsOnly() => throw null; - internal StringsOnly(ClientPipeline pipeline, Uri endpoint) => throw null; + internal StringsOnly(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/src/Generated/InterfaceV2.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/src/Generated/InterfaceV2.cs index 09e38898e24..34deea4e020 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/src/Generated/InterfaceV2.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/src/Generated/InterfaceV2.cs @@ -14,7 +14,7 @@ public partial class InterfaceV2 { protected InterfaceV2() => throw null; - internal InterfaceV2(ClientPipeline pipeline, Uri endpoint, string version) => throw null; + internal InterfaceV2(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, string version) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/src/Generated/InterfaceV1.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/src/Generated/InterfaceV1.cs index 65f7690e6d9..805d99d720e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/src/Generated/InterfaceV1.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/src/Generated/InterfaceV1.cs @@ -14,7 +14,7 @@ public partial class InterfaceV1 { protected InterfaceV1() => throw null; - internal InterfaceV1(ClientPipeline pipeline, Uri endpoint, string version) => throw null; + internal InterfaceV1(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, string version) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/src/Generated/InterfaceV1.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/src/Generated/InterfaceV1.cs index 65f7690e6d9..805d99d720e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/src/Generated/InterfaceV1.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/src/Generated/InterfaceV1.cs @@ -14,7 +14,7 @@ public partial class InterfaceV1 { protected InterfaceV1() => throw null; - internal InterfaceV1(ClientPipeline pipeline, Uri endpoint, string version) => throw null; + internal InterfaceV1(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, string version) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/src/Generated/OldInterface.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/src/Generated/OldInterface.cs index 165af44a376..24ec92848a0 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/src/Generated/OldInterface.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/src/Generated/OldInterface.cs @@ -14,7 +14,7 @@ public partial class OldInterface { protected OldInterface() => throw null; - internal OldInterface(ClientPipeline pipeline, Uri endpoint, string version) => throw null; + internal OldInterface(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, string version) => throw null; public ClientPipeline Pipeline => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/src/Generated/NewInterface.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/src/Generated/NewInterface.cs index 5a2e1c3333e..c1a43454a4d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/src/Generated/NewInterface.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/src/Generated/NewInterface.cs @@ -14,7 +14,7 @@ public partial class NewInterface { protected NewInterface() => throw null; - internal NewInterface(ClientPipeline pipeline, Uri endpoint, string version) => throw null; + internal NewInterface(ClientPipeline pipeline, ModelReaderWriterOptions modelReaderWriterOptions, Uri endpoint, string version) => throw null; public ClientPipeline Pipeline => throw null; From ea8dfabcbfc97c838282c3b54c7507f762fb880b Mon Sep 17 00:00:00 2001 From: Jorge Rangel Date: Fri, 20 Nov 2026 17:16:28 -0600 Subject: [PATCH 3/3] fix(http-client-csharp): address model proxy review feedback - Replace the ClientPipelineApi.GetModelProxies probe with virtual SupportsModelProxies and GetModelReaderWriterOptions(clientOptions) hooks so downstream pipelines, such as Azure.Core's, can build the client's options from their own client options. - Pass the client's options to the BinaryContentHelper overloads that write models (as an optional parameter) and to ToMultipartFormContent. - Remove the XmlTreeContainer Sample-TypeSpec fixture; the scenario stays covered by generator TestData tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../Abstractions/ClientPipelineApi.cs | 17 +- .../BinaryContentHelperDefinition.cs | 45 +- .../src/Providers/ClientPipelineProvider.cs | 8 +- .../src/Providers/ClientProvider.cs | 10 +- ...zationExtensionsDefinition.ModelProxies.cs | 2 +- ...erializationTypeDefinition.ModelProxies.cs | 2 +- .../MrwSerializationTypeDefinition.cs | 2 +- ...ultipartFormDataSerializationDefinition.cs | 29 +- .../Providers/ScmMethodProviderCollection.cs | 17 +- .../Snippets/BinaryContentHelperSnippets.cs | 12 +- .../Snippets/MultiPartFormContentSnippets.cs | 4 +- .../Abstractions/ClientPipelineApiTests.cs | 45 +- ...tClient_UploadMethods_MultiFileOnlyBody.cs | 4 +- ...tipartClient_UploadMethods_OptionalBody.cs | 4 +- ...rtClient_UploadMethods_OptionalFileBody.cs | 4 +- ...rtClient_UploadMethods_RequiredFileBody.cs | 4 +- .../BinaryContentHelperDefinitionTests.cs | 31 +- ...omEnumerableXmlMethodIsCorrectlyDefined.cs | 3 +- .../ModelWritingMethodsTakeOptionalOptions.cs | 117 + ...artFormDataSerializationDefinitionTests.cs | 19 + .../TestSerialization_AllPrimitiveParts.cs | 3 +- .../TestSerialization_AllShapesCombined.cs | 5 +- ..._BinaryDataPart(WithDefaultContentType).cs | 3 +- ...naryDataPart(WithoutDefaultContentType).cs | 3 +- ...leToBinaryData_WrapsInFileBinaryContent.cs | 3 +- ...edFileToStream_WrapsInFileBinaryContent.cs | 3 +- ...omizedNonFileToStream_WrapsInBinaryData.cs | 3 +- ...ion_CustomizedOptionalListUsesNullCheck.cs | 3 +- ...tExtensibleEnumPart_UsesUnderlyingValue.cs | 3 +- ...on_IntFixedEnumPart_UsesUnderlyingValue.cs | 3 +- ...erialization_MixedJsonAndMultipartUsage.cs | 3 +- ...ization_ModelArrayPart_AsSingleJsonPart.cs | 4 +- ...tion_ModelArrayPart_EmitsPartPerElement.cs | 5 +- ...delDictionaryPart_UsesModelReaderWriter.cs | 4 +- .../TestSerialization_MultiFilePart.cs | 3 +- ...iFilePartWithContentType_OmitsMediaType.cs | 3 +- .../TestSerialization_NestedJsonModelPart.cs | 5 +- ...tion_NullableValueTypePart_UnwrapsValue.cs | 3 +- .../TestSerialization_OptionalFile.cs | 3 +- ...ion_PrimitiveArrayPart_AsSingleJsonPart.cs | 3 +- ..._PrimitiveArrayPart_EmitsPartPerElement.cs | 3 +- ...tionaryPart_UsesMultipartFormDataHelper.cs | 3 +- ...eWithExplicitContentType_EmitsMediaType.cs | 3 +- .../TestSerialization_SingleRequiredFile.cs | 3 +- ...gExtensibleEnumPart_UsesUnderlyingValue.cs | 3 +- ...StringFixedEnumPart_UsesUnderlyingValue.cs | 3 +- ...ialization_StringWithDefaultContentType.cs | 3 +- ...ion_WithoutModelProxies_UsesWireOptions.cs | 32 + .../ScmMethodProviderCollectionTests.cs | 45 +- ...nsToBinaryContentHelper(BinaryDataList).cs | 4 + ...sToBinaryContentHelper(ModelDictionary).cs | 4 + ...OptionsToBinaryContentHelper(ModelList).cs | 4 + ...ethod_XmlListBody_UsesXmlFromEnumerable.cs | 2 +- ...nRequestsUseBinaryContentHelpers(Int16).cs | 8 +- ...RequestsUseBinaryContentHelpers(UInt16).cs | 8 +- ...RequestsUseBinaryContentHelpers(UInt32).cs | 8 +- ...RequestsUseBinaryContentHelpers(UInt64).cs | 8 +- .../ClientPipelineWithoutModelProxies.cs | 2 +- .../Local.Tests/ModelProxyTests.cs | 73 +- .../Local/Sample-TypeSpec/Sample-TypeSpec.tsp | 14 - .../Generated/Internal/BinaryContentHelper.cs | 25 +- .../Models/Cat.Serialization.Multipart.cs | 7 +- .../Generated/Models/SampleTypeSpecContext.cs | 1 - .../Models/XmlTreeContainer.Serialization.cs | 166 - .../src/Generated/Models/XmlTreeContainer.cs | 23 - .../Generated/PlantOperations.RestClient.cs | 12 - .../src/Generated/PlantOperations.cs | 52 - .../src/Generated/SampleTypeSpecClient.cs | 4 +- .../Generated/SampleTypeSpecModelFactory.cs | 8 - .../Local/Sample-TypeSpec/tspCodeModel.json | 5198 ++++++++--------- 70 files changed, 3047 insertions(+), 3129 deletions(-) create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/BinaryContentHelperDefinitionTests/ModelWritingMethodsTakeOptionalOptions.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_WithoutModelProxies_UsesWireOptions.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(BinaryDataList).cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(ModelDictionary).cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(ModelList).cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.Serialization.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.cs diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/Abstractions/ClientPipelineApi.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/Abstractions/ClientPipelineApi.cs index 2d307e860d9..65b5c1795de 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/Abstractions/ClientPipelineApi.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/Abstractions/ClientPipelineApi.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using Microsoft.TypeSpec.Generator.ClientModel.Snippets; using Microsoft.TypeSpec.Generator.Expressions; using Microsoft.TypeSpec.Generator.Primitives; using Microsoft.TypeSpec.Generator.Snippets; @@ -39,17 +40,19 @@ public abstract MethodBodyStatement[] CreateMessage( public virtual ValueExpression? UserAgentPolicy(CSharpType clientType) => null; /// - /// Gets the model proxies configured on the client options, or null when the client options don't carry - /// model proxies. Generated clients add these proxies to the ModelReaderWriterOptions they use to read and - /// write models in their operations. + /// Gets whether the client options of this pipeline carry model proxies. When true, generated clients store + /// the options returned by and pass them to every model + /// they read and write in their operations. Pipelines whose client options don't carry model proxies keep the + /// default (false), and their clients use the shared wire options. /// - /// The client options expression. - public virtual ValueExpression? GetModelProxies(ValueExpression clientOptions) => null; + public virtual bool SupportsModelProxies => false; /// - /// Gets whether generated clients route model reads and writes through the proxies configured on their options. + /// Gets the ModelReaderWriterOptions a generated client uses to read and write models in its operations, + /// built from its client options. Only called when is true. /// - public bool SupportsModelProxies => GetModelProxies(Empty) is not null; + /// The client options expression. + public virtual ValueExpression GetModelReaderWriterOptions(ValueExpression clientOptions) => ModelSerializationExtensionsSnippets.Wire; public abstract ClientPipelineApi FromExpression(ValueExpression expression); public abstract ClientPipelineApi ToExpression(); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/BinaryContentHelperDefinition.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/BinaryContentHelperDefinition.cs index 9118211f1a6..82382572e9f 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/BinaryContentHelperDefinition.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/BinaryContentHelperDefinition.cs @@ -3,6 +3,7 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; using System.Collections.Generic; using System.IO; using System.Xml; @@ -35,6 +36,25 @@ public class BinaryContentHelperDefinition : InternalHelperProvider protected override IReadOnlyList BuildBodyDependencyTypes() => [ScmCodeModelGenerator.Instance.ModelSerializationExtensionsDefinition.Type]; + // Clients whose options carry model proxies pass their options so the proxies apply to the items written here. + // The parameter is optional so existing callers, such as custom code, keep writing with the wire options. + private static ParameterProvider? CreateOptionsParameter() + => ScmCodeModelGenerator.Instance.TypeFactory.ClientPipelineApi.ToExpression().SupportsModelProxies + ? new ParameterProvider("options", FormattableStringHelpers.Empty, typeof(ModelReaderWriterOptions), defaultValue: Null) + : null; + + private static ScopedApi GetOptions(ParameterProvider? optionsParameter) + => optionsParameter?.As() ?? ModelSerializationExtensionsSnippets.Wire; + + // options ??= ModelSerializationExtensions.WireOptions; + private static MethodBodyStatement DefaultOptions(ParameterProvider? optionsParameter) + => optionsParameter is null + ? MethodBodyStatement.Empty + : optionsParameter.Assign(ModelSerializationExtensionsSnippets.Wire, nullCoalesce: true).Terminate(); + + private static ParameterProvider[] WithOptions(ParameterProvider? optionsParameter, params ParameterProvider[] parameters) + => optionsParameter is null ? parameters : [.. parameters, optionsParameter]; + protected override MethodProvider[] BuildMethods() { var methods = new List @@ -61,10 +81,11 @@ private MethodProvider BuildFromEnumerableTMethod() var enumerableTType = typeof(IEnumerable<>); CSharpType tType = enumerableTType.GetGenericArguments()[0]; var enumerableParameter = new ParameterProvider("enumerable", FormattableStringHelpers.Empty, enumerableTType); + var optionsParameter = CreateOptionsParameter(); var signature = new MethodSignature( Name: _fromEnumerableName, Modifiers: _methodModifiers, - Parameters: [enumerableParameter], + Parameters: WithOptions(optionsParameter, enumerableParameter), ReturnType: _requestBodyType, GenericArguments: [tType], GenericParameterConstraints: [Where.NotNull(tType)], @@ -73,6 +94,7 @@ private MethodProvider BuildFromEnumerableTMethod() var body = new List { + DefaultOptions(optionsParameter), Declare("content", New.Instance(), out var content) }; var writer = content.JsonWriter(); @@ -81,7 +103,7 @@ private MethodProvider BuildFromEnumerableTMethod() writer.WriteStartArray(), new ForEachStatement("item", enumerableParameter.As(enumerableParameter.Type), out var item) { - writer.WriteObjectValue(item.As(tType), ModelSerializationExtensionsSnippets.Wire) + writer.WriteObjectValue(item.As(tType), GetOptions(optionsParameter)) }, writer.WriteEndArray(), MethodBodyStatement.EmptyLine, @@ -130,10 +152,11 @@ private MethodProvider BuildFromReadOnlySpanMethod() var spanType = typeof(ReadOnlySpan<>); CSharpType tType = spanType.GetGenericArguments()[0]; var spanParameter = new ParameterProvider("span", FormattableStringHelpers.Empty, spanType); + var optionsParameter = CreateOptionsParameter(); var signature = new MethodSignature( Name: _fromEnumerableName, Modifiers: _methodModifiers, - Parameters: [spanParameter], + Parameters: WithOptions(optionsParameter, spanParameter), ReturnType: _requestBodyType, GenericArguments: [tType], GenericParameterConstraints: [Where.NotNull(tType)], @@ -142,6 +165,7 @@ private MethodProvider BuildFromReadOnlySpanMethod() var body = new List { + DefaultOptions(optionsParameter), Declare("content", New.Instance(), out var content) }; var writer = content.JsonWriter(); @@ -151,7 +175,7 @@ private MethodProvider BuildFromReadOnlySpanMethod() Declare("i", Int(0), out var i), new ForStatement(null, i.LessThan(spanParameter.Property(nameof(ReadOnlySpan.Length))), i.Increment()) { - writer.WriteObjectValue(new IndexerExpression(spanParameter, i).As(tType), ModelSerializationExtensionsSnippets.Wire) + writer.WriteObjectValue(new IndexerExpression(spanParameter, i).As(tType), GetOptions(optionsParameter)) }, writer.WriteEndArray(), MethodBodyStatement.EmptyLine, @@ -166,10 +190,11 @@ private MethodProvider BuildFromDictionaryTMethod() var dictionaryTType = typeof(IDictionary<,>); CSharpType valueType = dictionaryTType.GetGenericArguments()[1]; var dictionaryParameter = new ParameterProvider("dictionary", FormattableStringHelpers.Empty, new CSharpType(dictionaryTType, typeof(string), valueType)); + var optionsParameter = CreateOptionsParameter(); var signature = new MethodSignature( Name: _fromDictionaryName, Modifiers: _methodModifiers, - Parameters: [dictionaryParameter], + Parameters: WithOptions(optionsParameter, dictionaryParameter), ReturnType: _requestBodyType, GenericArguments: [valueType], GenericParameterConstraints: [Where.NotNull(valueType)], @@ -178,6 +203,7 @@ private MethodProvider BuildFromDictionaryTMethod() var body = new List { + DefaultOptions(optionsParameter), Declare("content", New.Instance(), out var content) }; var writer = content.JsonWriter(); @@ -187,7 +213,7 @@ private MethodProvider BuildFromDictionaryTMethod() new ForEachStatement("item", dictionaryParameter.As(dictionaryParameter.Type), out var item) { writer.WritePropertyName(item.Property("Key")), - writer.WriteObjectValue(item.Property("Value").As(valueType), ModelSerializationExtensionsSnippets.Wire) + writer.WriteObjectValue(item.Property("Value").As(valueType), GetOptions(optionsParameter)) }, writer.WriteEndObject(), MethodBodyStatement.EmptyLine, @@ -285,10 +311,11 @@ private MethodProvider BuildFromEnumerableXmlMethod() var enumerableParameter = new ParameterProvider("enumerable", FormattableStringHelpers.Empty, enumerableTType); var rootNameHintParameter = new ParameterProvider("rootNameHint", FormattableStringHelpers.Empty, typeof(string)); var childNameHintParameter = new ParameterProvider("childNameHint", FormattableStringHelpers.Empty, typeof(string)); + var optionsParameter = CreateOptionsParameter(); var signature = new MethodSignature( Name: _fromEnumerableName, Modifiers: _methodModifiers, - Parameters: [enumerableParameter, rootNameHintParameter, childNameHintParameter], + Parameters: WithOptions(optionsParameter, enumerableParameter, rootNameHintParameter, childNameHintParameter), ReturnType: _requestBodyType, GenericArguments: [tType], GenericParameterConstraints: [Where.NotNull(tType)], @@ -304,7 +331,7 @@ private MethodProvider BuildFromEnumerableXmlMethod() xmlWriter.WriteStartElement(rootNameHintParameter), new ForEachStatement("item", enumerableParameter.As(enumerableParameter.Type), out var item) { - xmlWriter.WriteObjectValue(item.As(tType), ModelSerializationExtensionsSnippets.Wire, childNameHintParameter) + xmlWriter.WriteObjectValue(item.As(tType), GetOptions(optionsParameter), childNameHintParameter) }, xmlWriter.WriteEndElement(), ]); @@ -319,7 +346,7 @@ private MethodProvider BuildFromEnumerableXmlMethod() [Int(0), streamVar.Property(nameof(MemoryStream.Position)).CastTo(typeof(int))]))))) ]); - var body = new MethodBodyStatement[] { outerUsing }; + var body = new MethodBodyStatement[] { DefaultOptions(optionsParameter), outerUsing }; return new MethodProvider(signature, body, this); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientPipelineProvider.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientPipelineProvider.cs index c0d41e664bb..2b9abe0b512 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientPipelineProvider.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientPipelineProvider.cs @@ -3,6 +3,7 @@ using System.ClientModel; using System.ClientModel.Primitives; +using Microsoft.TypeSpec.Generator.ClientModel.Snippets; using Microsoft.TypeSpec.Generator.Expressions; using Microsoft.TypeSpec.Generator.Primitives; using Microsoft.TypeSpec.Generator.Snippets; @@ -33,8 +34,11 @@ public ClientPipelineProvider(ValueExpression original) : base(typeof(ClientPipe public override ValueExpression Create(ValueExpression options, ValueExpression perRetryPolicies) => Static().Invoke(nameof(ClientPipeline.Create), [options, New.Array(ScmCodeModelGenerator.Instance.TypeFactory.ClientPipelineApi.PipelinePolicyType), perRetryPolicies, New.Array(ScmCodeModelGenerator.Instance.TypeFactory.ClientPipelineApi.PipelinePolicyType)]).As(); - public override ValueExpression? GetModelProxies(ValueExpression clientOptions) - => clientOptions.Property(nameof(ClientPipelineOptions.ModelProxies)); + public override bool SupportsModelProxies => true; + + // Copies ClientPipelineOptions.ModelProxies into the client's options; creating the pipeline freezes them. + public override ValueExpression GetModelReaderWriterOptions(ValueExpression clientOptions) + => ModelSerializationExtensionsSnippets.ToWireOptions(clientOptions.Property(nameof(ClientPipelineOptions.ModelProxies))); public override MethodBodyStatement[] CreateMessage( HttpRequestOptionsApi requestOptions, diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientProvider.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientProvider.cs index 7e1ab51e9e9..20584b13688 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientProvider.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientProvider.cs @@ -186,7 +186,7 @@ public ClientProvider(InputClient inputClient) this); // Clients created through the mocking constructor skip the constructors that copy the client options' proxies, // so the field starts with the shared wire options to keep their convenience methods working. - ModelReaderWriterOptionsField = ValueExpression.Empty.ToApi().SupportsModelProxies + ModelReaderWriterOptionsField = ScmCodeModelGenerator.Instance.TypeFactory.ClientPipelineApi.ToExpression().SupportsModelProxies ? new FieldProvider( FieldModifiers.Private | FieldModifiers.ReadOnly, typeof(ModelReaderWriterOptions), @@ -1390,11 +1390,11 @@ private MethodBodyStatement[] BuildPrimaryConstructorBody(IReadOnlyList().Create(clientOptionsParameter, perRetryPolicies)).Terminate()); } - // Creating the pipeline freezes the client options, so the proxies copied here can't change afterwards. - if (ModelReaderWriterOptionsField != null && - This.ToApi().GetModelProxies(clientOptionsParameter) is { } modelProxies) + // Creating the pipeline freezes the client options, so the options built here can't change afterwards. + if (ModelReaderWriterOptionsField != null) { - body.Add(ModelReaderWriterOptionsField.Assign(ModelSerializationExtensionsSnippets.ToWireOptions(modelProxies)).Terminate()); + body.Add(ModelReaderWriterOptionsField.Assign( + This.ToApi().GetModelReaderWriterOptions(clientOptionsParameter)).Terminate()); } foreach (var f in Fields) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.ModelProxies.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.ModelProxies.cs index 2a81b083a94..e2fa78b6b58 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.ModelProxies.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelSerializationExtensionsDefinition.ModelProxies.cs @@ -26,7 +26,7 @@ public sealed partial class ModelSerializationExtensionsDefinition private MethodProvider[] BuildModelProxyMethods() { MethodProvider shouldReadThroughProxy = BuildShouldReadThroughProxyMethodProvider(); - return ValueExpression.Empty.ToApi().SupportsModelProxies + return ScmCodeModelGenerator.Instance.TypeFactory.ClientPipelineApi.ToExpression().SupportsModelProxies ? [shouldReadThroughProxy, BuildToWireOptionsMethodProvider()] : [shouldReadThroughProxy]; } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.ModelProxies.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.ModelProxies.cs index 3b138c479dc..dfcc61876d6 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.ModelProxies.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.ModelProxies.cs @@ -38,7 +38,7 @@ internal static bool HasResponseConversion(CSharpType type) private static MrwSerializationTypeDefinition? GetModelSerialization(CSharpType type) { - if (!ValueExpression.Empty.ToApi().SupportsModelProxies + if (!ScmCodeModelGenerator.Instance.TypeFactory.ClientPipelineApi.ToExpression().SupportsModelProxies || !ScmCodeModelGenerator.Instance.TypeFactory.CSharpTypeMap.TryGetValue(type, out var provider) || provider is not ModelProvider || provider is SystemObjectModelProvider) { diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs index 21468928dda..58ffeb2c657 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs @@ -456,7 +456,7 @@ protected override MethodProvider[] BuildMethods() if (!_inputModel.IsUnknownDiscriminatorModel) { - bool supportsModelProxies = ValueExpression.Empty.ToApi().SupportsModelProxies; + bool supportsModelProxies = ScmCodeModelGenerator.Instance.TypeFactory.ClientPipelineApi.ToExpression().SupportsModelProxies; // cast operators if (ScmCodeModelGenerator.Instance.TypeFactory.RootInputModels.Contains(_inputModel)) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MultipartFormDataSerializationDefinition.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MultipartFormDataSerializationDefinition.cs index 5eca868eeb1..dbe1cb6761e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MultipartFormDataSerializationDefinition.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MultipartFormDataSerializationDefinition.cs @@ -78,13 +78,18 @@ protected override ConstructorProvider[] BuildConstructors() protected override MethodProvider[] BuildMethods() { + // Clients whose options carry model proxies pass their options so the proxies apply to the model parts. + var optionsParameter = ScmCodeModelGenerator.Instance.TypeFactory.ClientPipelineApi.ToExpression().SupportsModelProxies + ? new ParameterProvider("options", $"The options used to write the model parts, including the registered model proxies.", typeof(ModelReaderWriterOptions)) + : null; + var options = optionsParameter?.As() ?? ModelSerializationExtensionsSnippets.Wire; var signature = new MethodSignature( ToMultipartFormContentMethodName, FormattableStringHelpers.Empty, MethodSignatureModifiers.Internal, MultiPartFormContentSnippets.Type, null, - []); + optionsParameter is null ? [] : [optionsParameter]); var statements = new List { @@ -108,7 +113,7 @@ protected override MethodProvider[] BuildMethods() continue; } - statements.Add(ExperimentalApiHelpers.Suppress(BuildAddPartStatement(contentVar, prop), + statements.Add(ExperimentalApiHelpers.Suppress(BuildAddPartStatement(contentVar, prop, options), ExperimentalApiHelpers.GetMemberSuppressions(prop))); } @@ -119,7 +124,7 @@ protected override MethodProvider[] BuildMethods() return [new MethodProvider(signature, statements, this)]; } - private static MethodBodyStatement BuildAddPartStatement(ScopedApi contentVar, PropertyProvider prop) + private static MethodBodyStatement BuildAddPartStatement(ScopedApi contentVar, PropertyProvider prop, ScopedApi options) { var wireInfo = prop.WireInfo!; var multipart = (wireInfo.SerializationOptions as ScmSerializationOptions)?.Multipart; @@ -138,12 +143,12 @@ private static MethodBodyStatement BuildAddPartStatement(ScopedApi BuildMultiPartForEach(contentVar, prop, wireInfo.SerializedName, contentType, isFilePart), + => BuildMultiPartForEach(contentVar, prop, wireInfo.SerializedName, contentType, isFilePart, options), // Non-multi lists/arrays, and dictionaries (which have no RFC-defined multipart form), // are emitted as a single part. (true, _) or (false, true) - => BuildSinglePartCollection(contentVar, prop, wireInfo.SerializedName, explicitContentType ?? defaultContentType), - _ => BuildScalarAdd(contentVar, wireInfo.SerializedName, prop, prop.Type, contentType, isFilePart), + => BuildSinglePartCollection(contentVar, prop, wireInfo.SerializedName, explicitContentType ?? defaultContentType, options), + _ => BuildScalarAdd(contentVar, wireInfo.SerializedName, prop, prop.Type, contentType, isFilePart, options), }; if (wireInfo.IsRequired && !wireInfo.IsNullable) @@ -158,16 +163,16 @@ private static MethodBodyStatement BuildAddPartStatement(ScopedApi contentVar, PropertyProvider prop, string serializedName, string? contentType, bool isFilePart) + private static ForEachStatement BuildMultiPartForEach(ScopedApi contentVar, PropertyProvider prop, string serializedName, string? contentType, bool isFilePart, ScopedApi options) { var elementType = prop.Type.ElementType; return new ForEachStatement(elementType, "item", prop, false, out var item) { - BuildScalarAdd(contentVar, serializedName, item, elementType, contentType, isFilePart) + BuildScalarAdd(contentVar, serializedName, item, elementType, contentType, isFilePart, options) }; } - private static MethodBodyStatement BuildScalarAdd(ScopedApi contentVar, string serializedName, ValueExpression value, CSharpType type, string? contentType, bool isFilePart) + private static MethodBodyStatement BuildScalarAdd(ScopedApi contentVar, string serializedName, ValueExpression value, CSharpType type, string? contentType, bool isFilePart, ScopedApi options) { value = value.NullableStructValue(type); @@ -177,7 +182,7 @@ private static MethodBodyStatement BuildScalarAdd(ScopedApi contentVar, PropertyProvider prop, string serializedName, string? contentType) + private static MethodBodyStatement BuildSinglePartCollection(ScopedApi contentVar, PropertyProvider prop, string serializedName, string? contentType, ScopedApi options) { var elementType = prop.Type.ElementType; var dataVarName = $"{serializedName.ToVariableName()}Data".ToVariableName(); @@ -231,7 +236,7 @@ private static MethodBodyStatement BuildSinglePartCollection(ScopedApi() .WithMediaType(Literal(contentType ?? "application/json")); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ScmMethodProviderCollection.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ScmMethodProviderCollection.cs index 88ed188f1a9..e8bdaedf35f 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ScmMethodProviderCollection.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ScmMethodProviderCollection.cs @@ -54,6 +54,13 @@ public class ScmMethodProviderCollection : IReadOnlyList // Paging collections read their pages with the client's options, which follow the client argument. private ValueExpression[] PagingCollectionOptionsArguments => Client.ModelReaderWriterOptionsField is { } optionsField ? [optionsField] : []; + + // The BinaryContentHelper overloads that write models take the client's options when it carries model proxies. + // BinaryData items are written by their own overloads, which don't take options. + private ValueExpression? BinaryContentHelperOptions(CSharpType? elementType) + => SupportsModelProxies && elementType?.Equals(typeof(BinaryData)) != true + ? ClientModelReaderWriterOptions + : null; protected InputServiceMethod ServiceMethod { get; } protected TypeProvider EnclosingType { get; } public IReadOnlyList MethodProviders => _methods ??= BuildMethods(); @@ -700,25 +707,25 @@ void AddUtf8JsonContent(CSharpType serializationType, ValueExpression value, Inp } else if (parameter.Type.IsReadOnlyMemory) { - statements.Add(UsingDeclare("content", requestContentType, BinaryContentHelperSnippets.FromEnumerable(parameter.Property("Span")), out var content)); + statements.Add(UsingDeclare("content", requestContentType, BinaryContentHelperSnippets.FromEnumerable(parameter.Property("Span"), BinaryContentHelperOptions(null)), out var content)); declarations["content"] = content; } else if (parameter.Type.IsList) { if (TryGetXmlCollectionNames(parameter, out var rootName, out var childName)) { - statements.Add(UsingDeclare("content", requestContentType, BinaryContentHelperSnippets.FromEnumerable(parameter, Literal(rootName), Literal(childName)), out var content)); + statements.Add(UsingDeclare("content", requestContentType, BinaryContentHelperSnippets.FromEnumerable(parameter, Literal(rootName), Literal(childName), BinaryContentHelperOptions(null)), out var content)); declarations["content"] = content; } else { - statements.Add(UsingDeclare("content", requestContentType, BinaryContentHelperSnippets.FromEnumerable(parameter), out var content)); + statements.Add(UsingDeclare("content", requestContentType, BinaryContentHelperSnippets.FromEnumerable(parameter, BinaryContentHelperOptions(parameter.Type.ElementType)), out var content)); declarations["content"] = content; } } else if (parameter.Type.IsDictionary) { - statements.Add(UsingDeclare("content", requestContentType, BinaryContentHelperSnippets.FromDictionary(parameter), out var content)); + statements.Add(UsingDeclare("content", requestContentType, BinaryContentHelperSnippets.FromDictionary(parameter, BinaryContentHelperOptions(parameter.Type.ElementType)), out var content)); declarations["content"] = content; } else if (parameter.Type.Equals(typeof(string))) @@ -779,7 +786,7 @@ void AddUtf8JsonContent(CSharpType serializationType, ValueExpression value, Inp var bodyExpression = inputParam is { IsRequired: false } ? parameter.NullConditional() : parameter; - statements.Add(UsingDeclare("content", MultiPartFormContentSnippets.Type, MultiPartFormContentSnippets.ToMultipartFormContent(bodyExpression), out var content)); + statements.Add(UsingDeclare("content", MultiPartFormContentSnippets.Type, MultiPartFormContentSnippets.ToMultipartFormContent(bodyExpression, SupportsModelProxies ? ClientModelReaderWriterOptions : null), out var content)); declarations["content"] = content; } // else rely on implicit operator to convert to BinaryContent diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/BinaryContentHelperSnippets.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/BinaryContentHelperSnippets.cs index 6722c9f4857..98c35ab8242 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/BinaryContentHelperSnippets.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/BinaryContentHelperSnippets.cs @@ -9,14 +9,14 @@ namespace Microsoft.TypeSpec.Generator.ClientModel.Snippets { internal static class BinaryContentHelperSnippets { - public static ValueExpression FromEnumerable(ValueExpression body) - => Static().Invoke("FromEnumerable", body); + public static ValueExpression FromEnumerable(ValueExpression body, ValueExpression? options = null) + => Static().Invoke("FromEnumerable", options is null ? [body] : [body, options]); - public static ValueExpression FromEnumerable(ValueExpression body, ValueExpression rootNameHint, ValueExpression childNameHint) - => Static().Invoke("FromEnumerable", [body, rootNameHint, childNameHint]); + public static ValueExpression FromEnumerable(ValueExpression body, ValueExpression rootNameHint, ValueExpression childNameHint, ValueExpression? options = null) + => Static().Invoke("FromEnumerable", options is null ? [body, rootNameHint, childNameHint] : [body, rootNameHint, childNameHint, options]); - public static ValueExpression FromDictionary(ValueExpression body) - => Static().Invoke("FromDictionary", body); + public static ValueExpression FromDictionary(ValueExpression body, ValueExpression? options = null) + => Static().Invoke("FromDictionary", options is null ? [body] : [body, options]); public static ValueExpression FromObject(ValueExpression body) => Static().Invoke("FromObject", body); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/MultiPartFormContentSnippets.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/MultiPartFormContentSnippets.cs index 5464604d521..7be300ca896 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/MultiPartFormContentSnippets.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Snippets/MultiPartFormContentSnippets.cs @@ -42,8 +42,8 @@ public static MethodBodyStatement Add(this ScopedApi conte public static MethodBodyStatement AddWithMediaType(this ScopedApi content, string name, ValueExpression value, string mediaType) => content.Invoke(AddMethodName, [Literal(name), value.Invoke(WithMediaTypeMethodName, [Literal(mediaType)])]).Terminate(); - public static ValueExpression ToMultipartFormContent(ValueExpression model) - => model.Invoke(ToMultipartFormContentMethodName); + public static ValueExpression ToMultipartFormContent(ValueExpression model, ValueExpression? options = null) + => options is null ? model.Invoke(ToMultipartFormContentMethodName) : model.Invoke(ToMultipartFormContentMethodName, options); } } #pragma warning restore SCME0004 diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Abstractions/ClientPipelineApiTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Abstractions/ClientPipelineApiTests.cs index 72244724626..d88e69da407 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Abstractions/ClientPipelineApiTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Abstractions/ClientPipelineApiTests.cs @@ -56,7 +56,30 @@ public void ProcessMessageIsOverridden() Assert.IsTrue(method.BodyStatements!.ToDisplayString().Contains("GetFakeProcessMessageAsync")); } - private static ClientProvider CreateTestClient() + // Pipelines opt out of model proxies by default, so their clients keep the shared wire options. + [Test] + public void ModelProxiesAreNotSupportedByDefault() + { + var clientProvider = CreateTestClient(); + + Assert.IsNull(clientProvider.ModelReaderWriterOptionsField); + } + + // A pipeline whose client options carry model proxies decides how the client builds its options from them. + [Test] + public void ModelReaderWriterOptionsComeFromPipelineApi() + { + var clientProvider = CreateTestClient(TestClientPipelineApiWithModelProxies.Instance); + + Assert.IsNotNull(clientProvider.ModelReaderWriterOptionsField); + var primaryConstructor = clientProvider.Constructors.Single( + c => c.Signature.Initializer == null && c.Signature.Modifiers == MethodSignatureModifiers.Internal); + StringAssert.Contains( + "_modelReaderWriterOptions = options.GetFakeModelReaderWriterOptions();", + primaryConstructor.BodyStatements!.ToDisplayString()); + } + + private static ClientProvider CreateTestClient(ClientPipelineApi? clientPipelineApi = null) { var inputServiceMethod = InputFactory.BasicServiceMethod( "test", @@ -68,12 +91,30 @@ private static ClientProvider CreateTestClient() InputFactory.QueryParameter("foo-query", InputPrimitiveType.String) ])); var client = InputFactory.Client("TestClient", methods: [inputServiceMethod]); - MockHelpers.LoadMockGenerator(clientPipelineApi: TestClientPipelineApi.Instance); + MockHelpers.LoadMockGenerator(clientPipelineApi: clientPipelineApi ?? TestClientPipelineApi.Instance); var clientProvider = ScmCodeModelGenerator.Instance.TypeFactory.CreateClient(client); Assert.IsNotNull(clientProvider); return clientProvider!; } + private record TestClientPipelineApiWithModelProxies : TestClientPipelineApi + { + private static ClientPipelineApi? _instance; + internal static new ClientPipelineApi Instance => _instance ??= new TestClientPipelineApiWithModelProxies(Empty); + + public TestClientPipelineApiWithModelProxies(ValueExpression original) : base(original) + { + } + + public override bool SupportsModelProxies => true; + + public override ValueExpression GetModelReaderWriterOptions(ValueExpression clientOptions) + => clientOptions.Invoke("GetFakeModelReaderWriterOptions"); + + public override ClientPipelineApi FromExpression(ValueExpression expression) + => new TestClientPipelineApiWithModelProxies(expression); + } + private record TestClientPipelineApi : ClientPipelineApi { private static ClientPipelineApi? _instance; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_MultiFileOnlyBody.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_MultiFileOnlyBody.cs index af991d4332a..ee8b9bbe0c3 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_MultiFileOnlyBody.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_MultiFileOnlyBody.cs @@ -36,7 +36,7 @@ public partial class MultipartClient { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.MultiPartFormContent content = body.ToMultipartFormContent(); + using global::System.ClientModel.MultiPartFormContent content = body.ToMultipartFormContent(_modelReaderWriterOptions); return this.Upload(content, content.MediaType, cancellationToken.ToRequestOptions()); } @@ -45,7 +45,7 @@ public partial class MultipartClient { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.MultiPartFormContent content = body.ToMultipartFormContent(); + using global::System.ClientModel.MultiPartFormContent content = body.ToMultipartFormContent(_modelReaderWriterOptions); return await this.UploadAsync(content, content.MediaType, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_OptionalBody.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_OptionalBody.cs index dd0dd5580b0..811b4e5b4f9 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_OptionalBody.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_OptionalBody.cs @@ -28,14 +28,14 @@ public partial class MultipartClient [global::System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SCME0004")] public virtual global::System.ClientModel.ClientResult Upload(global::Sample.Models.MultiPartContent body = default, global::System.Threading.CancellationToken cancellationToken = default) { - using global::System.ClientModel.MultiPartFormContent content = body?.ToMultipartFormContent(); + using global::System.ClientModel.MultiPartFormContent content = body?.ToMultipartFormContent(_modelReaderWriterOptions); return this.Upload(content, content?.MediaType, cancellationToken.ToRequestOptions()); } [global::System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SCME0004")] public virtual async global::System.Threading.Tasks.Task UploadAsync(global::Sample.Models.MultiPartContent body = default, global::System.Threading.CancellationToken cancellationToken = default) { - using global::System.ClientModel.MultiPartFormContent content = body?.ToMultipartFormContent(); + using global::System.ClientModel.MultiPartFormContent content = body?.ToMultipartFormContent(_modelReaderWriterOptions); return await this.UploadAsync(content?.MediaType, content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_OptionalFileBody.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_OptionalFileBody.cs index 325f0fc7497..0b996f4acc8 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_OptionalFileBody.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_OptionalFileBody.cs @@ -36,7 +36,7 @@ public partial class MultipartClient { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.MultiPartFormContent content = body.ToMultipartFormContent(); + using global::System.ClientModel.MultiPartFormContent content = body.ToMultipartFormContent(_modelReaderWriterOptions); return this.Upload(content, content.MediaType, cancellationToken.ToRequestOptions()); } @@ -45,7 +45,7 @@ public partial class MultipartClient { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.MultiPartFormContent content = body.ToMultipartFormContent(); + using global::System.ClientModel.MultiPartFormContent content = body.ToMultipartFormContent(_modelReaderWriterOptions); return await this.UploadAsync(content, content.MediaType, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_RequiredFileBody.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_RequiredFileBody.cs index f2900d92326..f940efbd6b8 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_RequiredFileBody.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/TestMultipartClient_UploadMethods_RequiredFileBody.cs @@ -36,7 +36,7 @@ public partial class MultipartClient { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.MultiPartFormContent content = body.ToMultipartFormContent(); + using global::System.ClientModel.MultiPartFormContent content = body.ToMultipartFormContent(_modelReaderWriterOptions); return this.Upload(content, content.MediaType, cancellationToken.ToRequestOptions()); } @@ -45,7 +45,7 @@ public partial class MultipartClient { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.MultiPartFormContent content = body.ToMultipartFormContent(); + using global::System.ClientModel.MultiPartFormContent content = body.ToMultipartFormContent(_modelReaderWriterOptions); return await this.UploadAsync(content, content.MediaType, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/BinaryContentHelperDefinitionTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/BinaryContentHelperDefinitionTests.cs index 715bdb21e5b..0cf2be40c45 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/BinaryContentHelperDefinitionTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/BinaryContentHelperDefinitionTests.cs @@ -54,7 +54,7 @@ public void FromEnumerableXmlMethodIsCorrectlyDefined() var binaryContentHelper = new BinaryContentHelperDefinition(); Assert.IsNotNull(binaryContentHelper.Methods); var method = binaryContentHelper.Methods.Single(m => m.Signature.Name == "FromEnumerable" - && m.Signature.Parameters.Count == 3 + && m.Signature.Parameters.Count == 4 && m.Signature.Parameters[1].Name == "rootNameHint"); Assert.IsNotNull(method); @@ -63,10 +63,12 @@ public void FromEnumerableXmlMethodIsCorrectlyDefined() Assert.AreEqual("FromEnumerable", signature.Name); Assert.AreEqual(MethodSignatureModifiers.Public | MethodSignatureModifiers.Static, signature.Modifiers); Assert.IsNotNull(signature.ReturnType); - Assert.AreEqual(3, signature.Parameters.Count); + Assert.AreEqual(4, signature.Parameters.Count); Assert.AreEqual("enumerable", signature.Parameters[0].Name); Assert.AreEqual("rootNameHint", signature.Parameters[1].Name); Assert.AreEqual("childNameHint", signature.Parameters[2].Name); + Assert.AreEqual("options", signature.Parameters[3].Name); + Assert.IsNotNull(signature.Parameters[3].DefaultValue); Assert.IsNotNull(signature.GenericArguments); Assert.AreEqual(1, signature.GenericArguments!.Count); Assert.IsNotNull(signature.GenericParameterConstraints); @@ -76,5 +78,30 @@ public void FromEnumerableXmlMethodIsCorrectlyDefined() Assert.IsNotNull(method.BodyStatements); Assert.AreEqual(Helpers.GetExpectedFromFile(), method.BodyStatements!.ToDisplayString()); } + + // Clients whose options carry model proxies pass them to the helpers that write models. The options are optional + // so existing callers keep writing with the wire options, and the BinaryData overloads don't take them. + [Test] + public void ModelWritingMethodsTakeOptionalOptions() + { + MockHelpers.LoadMockGenerator(); + + var binaryContentHelper = new BinaryContentHelperDefinition(); + var file = new TypeProviderWriter(new FilteredMethodsTypeProvider( + binaryContentHelper, + name => name is "FromEnumerable" or "FromDictionary")).Write(); + + Assert.AreEqual(Helpers.GetExpectedFromFile(), file.Content); + } + + [Test] + public void MethodsDoNotTakeOptionsWithoutModelProxies() + { + MockHelpers.LoadMockGenerator(clientPipelineApi: ClientPipelineWithoutModelProxies.Instance); + + var binaryContentHelper = new BinaryContentHelperDefinition(); + + Assert.IsFalse(binaryContentHelper.Methods.Any(m => m.Signature.Parameters.Any(p => p.Name == "options"))); + } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/BinaryContentHelperDefinitionTests/FromEnumerableXmlMethodIsCorrectlyDefined.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/BinaryContentHelperDefinitionTests/FromEnumerableXmlMethodIsCorrectlyDefined.cs index 263fdcc3fc9..d535bd3bdda 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/BinaryContentHelperDefinitionTests/FromEnumerableXmlMethodIsCorrectlyDefined.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/BinaryContentHelperDefinitionTests/FromEnumerableXmlMethodIsCorrectlyDefined.cs @@ -1,3 +1,4 @@ +options ??= global::Sample.ModelSerializationExtensions.WireOptions; using (global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(256)) { using (global::System.Xml.XmlWriter writer = global::System.Xml.XmlWriter.Create(stream, global::Sample.ModelSerializationExtensions.XmlWriterSettings)) @@ -5,7 +6,7 @@ writer.WriteStartElement(rootNameHint); foreach (var item in enumerable) { - writer.WriteObjectValue(item, global::Sample.ModelSerializationExtensions.WireOptions, childNameHint); + writer.WriteObjectValue(item, options, childNameHint); } writer.WriteEndElement(); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/BinaryContentHelperDefinitionTests/ModelWritingMethodsTakeOptionalOptions.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/BinaryContentHelperDefinitionTests/ModelWritingMethodsTakeOptionalOptions.cs new file mode 100644 index 00000000000..230602012cc --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/Definitions/TestData/BinaryContentHelperDefinitionTests/ModelWritingMethodsTakeOptionalOptions.cs @@ -0,0 +1,117 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Sample +{ + public partial class BinaryContentHelper + { + public static global::System.ClientModel.BinaryContent FromEnumerable(global::System.Collections.Generic.IEnumerable enumerable, global::System.ClientModel.Primitives.ModelReaderWriterOptions options = null) + where T : notnull + { + options ??= global::Sample.ModelSerializationExtensions.WireOptions; + global::Sample.Utf8JsonBinaryContent content = new global::Sample.Utf8JsonBinaryContent(); + content.JsonWriter.WriteStartArray(); + foreach (var item in enumerable) + { + content.JsonWriter.WriteObjectValue(item, options); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + + public static global::System.ClientModel.BinaryContent FromEnumerable(global::System.Collections.Generic.IEnumerable enumerable) + { + global::Sample.Utf8JsonBinaryContent content = new global::Sample.Utf8JsonBinaryContent(); + content.JsonWriter.WriteStartArray(); + foreach (var item in enumerable) + { + if ((item == null)) + { + content.JsonWriter.WriteNullValue(); + } + else + { +#if NET6_0_OR_GREATER + content.JsonWriter.WriteRawValue(item); +#else + using (global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(item)) + { + global::System.Text.Json.JsonSerializer.Serialize(content.JsonWriter, document.RootElement); + } +#endif + } + } + content.JsonWriter.WriteEndArray(); + + return content; + } + + public static global::System.ClientModel.BinaryContent FromEnumerable(global::System.ReadOnlySpan span, global::System.ClientModel.Primitives.ModelReaderWriterOptions options = null) + where T : notnull + { + options ??= global::Sample.ModelSerializationExtensions.WireOptions; + global::Sample.Utf8JsonBinaryContent content = new global::Sample.Utf8JsonBinaryContent(); + content.JsonWriter.WriteStartArray(); + int i = 0; + for (; (i < span.Length); i++) + { + content.JsonWriter.WriteObjectValue(span[i], options); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + + public static global::System.ClientModel.BinaryContent FromDictionary(global::System.Collections.Generic.IDictionary dictionary, global::System.ClientModel.Primitives.ModelReaderWriterOptions options = null) + where TValue : notnull + { + options ??= global::Sample.ModelSerializationExtensions.WireOptions; + global::Sample.Utf8JsonBinaryContent content = new global::Sample.Utf8JsonBinaryContent(); + content.JsonWriter.WriteStartObject(); + foreach (var item in dictionary) + { + content.JsonWriter.WritePropertyName(item.Key); + content.JsonWriter.WriteObjectValue(item.Value, options); + } + content.JsonWriter.WriteEndObject(); + + return content; + } + + public static global::System.ClientModel.BinaryContent FromDictionary(global::System.Collections.Generic.IDictionary dictionary) + { + global::Sample.Utf8JsonBinaryContent content = new global::Sample.Utf8JsonBinaryContent(); + content.JsonWriter.WriteStartObject(); + foreach (var item in dictionary) + { + content.JsonWriter.WritePropertyName(item.Key); + if ((item.Value == null)) + { + content.JsonWriter.WriteNullValue(); + } + else + { +#if NET6_0_OR_GREATER + content.JsonWriter.WriteRawValue(item.Value); +#else + using (global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(item.Value)) + { + global::System.Text.Json.JsonSerializer.Serialize(content.JsonWriter, document.RootElement); + } +#endif + } + } + content.JsonWriter.WriteEndObject(); + + return content; + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/MultipartFormDataSerializationDefinitionTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/MultipartFormDataSerializationDefinitionTests.cs index 07b97c03e2d..8afa7ec5a60 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/MultipartFormDataSerializationDefinitionTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/MultipartFormDataSerializationDefinitionTests.cs @@ -148,6 +148,25 @@ public void TestSerialization_NestedJsonModelPart() Assert.AreEqual(Helpers.GetExpectedFromFile(), actual); } + // Pipelines whose client options don't carry model proxies keep writing model parts with the wire options. + [Test] + public void TestSerialization_WithoutModelProxies_UsesWireOptions() + { + var addressModel = InputFactory.Model("address", properties: [InputFactory.Property("city", InputPrimitiveType.String)]); + var inputModel = MultipartModel( + "JsonPartRequest", + [ + NonFilePartProperty("address", addressModel, defaultContentTypes: ["application/json"]), + NonFilePartProperty("addresses", InputFactory.Array(addressModel), defaultContentTypes: ["application/json"]) + ]); + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel], clientPipelineApi: ClientPipelineWithoutModelProxies.Instance); + var model = (ScmModel)ScmCodeModelGenerator.Instance.TypeFactory.CreateModel(inputModel)!; + + var actual = new TypeProviderWriter(new MultipartFormDataSerializationDefinition(inputModel, model)).Write().Content; + + Assert.AreEqual(Helpers.GetExpectedFromFile(), actual); + } + [Test] public void TestSerialization_AllPrimitiveParts() { diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_AllPrimitiveParts.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_AllPrimitiveParts.cs index 3b7c47a6f02..735848f0caf 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_AllPrimitiveParts.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_AllPrimitiveParts.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal AllPrimitivesContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_AllShapesCombined.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_AllShapesCombined.cs index 9d1a1fb4ae9..4c30efc64f5 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_AllShapesCombined.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_AllShapesCombined.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; using Sample; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. @@ -14,12 +15,12 @@ internal ComplexPartsContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); content.Add("id", Id); - content.Add("address", Address, global::Sample.SampleContext.Default, global::Sample.ModelSerializationExtensions.WireOptions, "application/json"); + content.Add("address", Address, global::Sample.SampleContext.Default, options, "application/json"); content.Add("profileImage", ProfileImage); foreach (global::System.ClientModel.FileBinaryContent item in Pictures) { diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_BinaryDataPart(WithDefaultContentType).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_BinaryDataPart(WithDefaultContentType).cs index 347cc0a822f..9f4390f9435 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_BinaryDataPart(WithDefaultContentType).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_BinaryDataPart(WithDefaultContentType).cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal BinaryDataContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_BinaryDataPart(WithoutDefaultContentType).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_BinaryDataPart(WithoutDefaultContentType).cs index c8235905efd..9454310ae05 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_BinaryDataPart(WithoutDefaultContentType).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_BinaryDataPart(WithoutDefaultContentType).cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal BinaryDataContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedFileToBinaryData_WrapsInFileBinaryContent.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedFileToBinaryData_WrapsInFileBinaryContent.cs index 07bf248bd75..a70feda2575 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedFileToBinaryData_WrapsInFileBinaryContent.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedFileToBinaryData_WrapsInFileBinaryContent.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal CustomizedFileRequest() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedFileToStream_WrapsInFileBinaryContent.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedFileToStream_WrapsInFileBinaryContent.cs index 07bf248bd75..a70feda2575 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedFileToStream_WrapsInFileBinaryContent.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedFileToStream_WrapsInFileBinaryContent.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal CustomizedFileRequest() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedNonFileToStream_WrapsInBinaryData.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedNonFileToStream_WrapsInBinaryData.cs index 5411d9375f7..c2fb578c6ec 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedNonFileToStream_WrapsInBinaryData.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedNonFileToStream_WrapsInBinaryData.cs @@ -4,6 +4,7 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -14,7 +15,7 @@ internal CustomizedBytesRequest() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedOptionalListUsesNullCheck.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedOptionalListUsesNullCheck.cs index f97e74db664..345dac09d89 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedOptionalListUsesNullCheck.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_CustomizedOptionalListUsesNullCheck.cs @@ -4,6 +4,7 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; using Sample; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. @@ -11,7 +12,7 @@ namespace Sample.Models { public partial class ConcreteListRequest { - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_IntExtensibleEnumPart_UsesUnderlyingValue.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_IntExtensibleEnumPart_UsesUnderlyingValue.cs index 9a7e157518e..2d319722dba 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_IntExtensibleEnumPart_UsesUnderlyingValue.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_IntExtensibleEnumPart_UsesUnderlyingValue.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal IntExtensibleEnumContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_IntFixedEnumPart_UsesUnderlyingValue.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_IntFixedEnumPart_UsesUnderlyingValue.cs index b56db41f479..034d74a2b0d 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_IntFixedEnumPart_UsesUnderlyingValue.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_IntFixedEnumPart_UsesUnderlyingValue.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal IntFixedEnumContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_MixedJsonAndMultipartUsage.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_MixedJsonAndMultipartUsage.cs index 19ce25747f1..0f6f7a6094b 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_MixedJsonAndMultipartUsage.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_MixedJsonAndMultipartUsage.cs @@ -3,13 +3,14 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models { public partial class MixedUsageContent { - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_ModelArrayPart_AsSingleJsonPart.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_ModelArrayPart_AsSingleJsonPart.cs index 325757f20e1..c4a75503393 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_ModelArrayPart_AsSingleJsonPart.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_ModelArrayPart_AsSingleJsonPart.cs @@ -17,11 +17,11 @@ internal ModelArrayContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); - global::System.BinaryData addressesData = global::System.ClientModel.Primitives.ModelReaderWriter.Write(((global::System.Collections.Generic.IList)Addresses), global::Sample.ModelSerializationExtensions.WireOptions, global::Sample.SampleContext.Default).WithMediaType("application/json"); + global::System.BinaryData addressesData = global::System.ClientModel.Primitives.ModelReaderWriter.Write(((global::System.Collections.Generic.IList)Addresses), options, global::Sample.SampleContext.Default).WithMediaType("application/json"); content.Add("addresses", addressesData); return content; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_ModelArrayPart_EmitsPartPerElement.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_ModelArrayPart_EmitsPartPerElement.cs index f6cf7b24fda..7e99502562c 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_ModelArrayPart_EmitsPartPerElement.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_ModelArrayPart_EmitsPartPerElement.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; using Sample; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. @@ -14,13 +15,13 @@ internal ModelArrayMultiContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); foreach (global::Sample.Models.Address item in Addresses) { - content.Add("addresses", item, global::Sample.SampleContext.Default, global::Sample.ModelSerializationExtensions.WireOptions, "application/json"); + content.Add("addresses", item, global::Sample.SampleContext.Default, options, "application/json"); } return content; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_ModelDictionaryPart_UsesModelReaderWriter.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_ModelDictionaryPart_UsesModelReaderWriter.cs index 3f264bdae7c..161e22d72f9 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_ModelDictionaryPart_UsesModelReaderWriter.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_ModelDictionaryPart_UsesModelReaderWriter.cs @@ -17,11 +17,11 @@ internal ModelDictionaryContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); - global::System.BinaryData addressesByNameData = global::System.ClientModel.Primitives.ModelReaderWriter.Write(((global::System.Collections.Generic.IDictionary)AddressesByName), global::Sample.ModelSerializationExtensions.WireOptions, global::Sample.SampleContext.Default).WithMediaType("application/json"); + global::System.BinaryData addressesByNameData = global::System.ClientModel.Primitives.ModelReaderWriter.Write(((global::System.Collections.Generic.IDictionary)AddressesByName), options, global::Sample.SampleContext.Default).WithMediaType("application/json"); content.Add("addressesByName", addressesByNameData); return content; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_MultiFilePart.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_MultiFilePart.cs index b3f6a63f42a..6bd4375642d 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_MultiFilePart.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_MultiFilePart.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal BinaryArrayPartsContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_MultiFilePartWithContentType_OmitsMediaType.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_MultiFilePartWithContentType_OmitsMediaType.cs index 68e2e44bdc5..7bed1e301c1 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_MultiFilePartWithContentType_OmitsMediaType.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_MultiFilePartWithContentType_OmitsMediaType.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal FileArrayWithContentTypeContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_NestedJsonModelPart.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_NestedJsonModelPart.cs index 1139d4b16d1..504c1399a8f 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_NestedJsonModelPart.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_NestedJsonModelPart.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; using Sample; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. @@ -14,11 +15,11 @@ internal JsonPartContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); - content.Add("address", Address, global::Sample.SampleContext.Default, global::Sample.ModelSerializationExtensions.WireOptions, "application/json"); + content.Add("address", Address, global::Sample.SampleContext.Default, options, "application/json"); return content; } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_NullableValueTypePart_UnwrapsValue.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_NullableValueTypePart_UnwrapsValue.cs index c628ebe4c7f..035b5e41848 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_NullableValueTypePart_UnwrapsValue.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_NullableValueTypePart_UnwrapsValue.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; using Sample; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. @@ -10,7 +11,7 @@ namespace Sample.Models { public partial class NullableValuePartContent { - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_OptionalFile.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_OptionalFile.cs index 2b301d9938a..d39ebca2d1c 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_OptionalFile.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_OptionalFile.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; using Sample; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. @@ -14,7 +15,7 @@ internal OptionalFileContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveArrayPart_AsSingleJsonPart.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveArrayPart_AsSingleJsonPart.cs index 42f00afd237..8c9186155d2 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveArrayPart_AsSingleJsonPart.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveArrayPart_AsSingleJsonPart.cs @@ -4,6 +4,7 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; using Sample; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. @@ -15,7 +16,7 @@ internal PrimitiveArrayJsonContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveArrayPart_EmitsPartPerElement.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveArrayPart_EmitsPartPerElement.cs index 2b9bffdcb48..e4419c134b1 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveArrayPart_EmitsPartPerElement.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveArrayPart_EmitsPartPerElement.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal PrimitiveArrayContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveDictionaryPart_UsesMultipartFormDataHelper.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveDictionaryPart_UsesMultipartFormDataHelper.cs index 4179ef69760..c89d68bdcdf 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveDictionaryPart_UsesMultipartFormDataHelper.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveDictionaryPart_UsesMultipartFormDataHelper.cs @@ -4,6 +4,7 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; using Sample; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. @@ -15,7 +16,7 @@ internal PrimitiveDictionaryContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveWithExplicitContentType_EmitsMediaType.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveWithExplicitContentType_EmitsMediaType.cs index ec7c579e905..c0925047650 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveWithExplicitContentType_EmitsMediaType.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_PrimitiveWithExplicitContentType_EmitsMediaType.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal ExplicitContentTypeContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_SingleRequiredFile.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_SingleRequiredFile.cs index cdc1d480821..fa3c22dd879 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_SingleRequiredFile.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_SingleRequiredFile.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal FileContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_StringExtensibleEnumPart_UsesUnderlyingValue.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_StringExtensibleEnumPart_UsesUnderlyingValue.cs index d70e688456a..095c0d80f56 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_StringExtensibleEnumPart_UsesUnderlyingValue.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_StringExtensibleEnumPart_UsesUnderlyingValue.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal StringExtensibleEnumContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_StringFixedEnumPart_UsesUnderlyingValue.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_StringFixedEnumPart_UsesUnderlyingValue.cs index 0f47ca66539..f9fa44f0904 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_StringFixedEnumPart_UsesUnderlyingValue.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_StringFixedEnumPart_UsesUnderlyingValue.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal StringFixedEnumContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_StringWithDefaultContentType.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_StringWithDefaultContentType.cs index e8069884e92..6d4c4d4d4ae 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_StringWithDefaultContentType.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_StringWithDefaultContentType.cs @@ -3,6 +3,7 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; #pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. namespace Sample.Models @@ -13,7 +14,7 @@ internal TextContent() { } - internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent(global::System.ClientModel.Primitives.ModelReaderWriterOptions options) { global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_WithoutModelProxies_UsesWireOptions.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_WithoutModelProxies_UsesWireOptions.cs new file mode 100644 index 00000000000..cd8785d8a28 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MultipartFormDataSerializationDefinitions/TestData/MultipartFormDataSerializationDefinitionTests/TestSerialization_WithoutModelProxies_UsesWireOptions.cs @@ -0,0 +1,32 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using Sample; + +#pragma warning disable SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. +namespace Sample.Models +{ + public partial class JsonPartContent + { + internal JsonPartContent() + { + } + + internal global::System.ClientModel.MultiPartFormContent ToMultipartFormContent() + { + global::System.ClientModel.MultiPartFormContent content = new global::System.ClientModel.MultiPartFormContent(); + + content.Add("address", Address, global::Sample.SampleContext.Default, global::Sample.ModelSerializationExtensions.WireOptions, "application/json"); + global::System.BinaryData addressesData = global::System.ClientModel.Primitives.ModelReaderWriter.Write(((global::System.Collections.Generic.IList)Addresses), global::Sample.ModelSerializationExtensions.WireOptions, global::Sample.SampleContext.Default).WithMediaType("application/json"); + content.Add("addresses", addressesData); + + return content; + } + } +} +#pragma warning restore SCME0004 // Type is for evaluation purposes only and is subject to change or removal in future updates. diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs index fb2706226c9..e3364d5dab0 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs @@ -2636,12 +2636,12 @@ public void RequestBodyConstructedUsingBinaryContentHelpers(InputType inputType) if (inputType is InputArrayType) { Assert.IsTrue(convenienceMethod!.BodyStatements!.ToDisplayString() - .Contains("using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(message);")); + .Contains("using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(message, _modelReaderWriterOptions);")); } else if (inputType is InputDictionaryType) { Assert.IsTrue(convenienceMethod!.BodyStatements!.ToDisplayString() - .Contains("using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(message);")); + .Contains("using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(message, _modelReaderWriterOptions);")); } else { @@ -2678,7 +2678,7 @@ public void RequestBodyConstructedUsingReadOnlyMemoryBinaryContentHelpers() Assert.IsNotNull(convenienceMethod); Assert.IsTrue(convenienceMethod!.BodyStatements!.ToDisplayString() - .Contains("using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(data.Span);")); + .Contains("using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(data.Span, _modelReaderWriterOptions);")); } [Test] @@ -2748,12 +2748,12 @@ public void RequestBodyConstructedRespectingRequestContentApi(InputType inputTyp if (inputType is InputArrayType) { Assert.IsTrue(convenienceMethod!.BodyStatements!.ToDisplayString() - .Contains("using global::Microsoft.TypeSpec.Generator.ClientModel.Tests.TestRequestContent content = global::Sample.BinaryContentHelper.FromEnumerable(message);")); + .Contains("using global::Microsoft.TypeSpec.Generator.ClientModel.Tests.TestRequestContent content = global::Sample.BinaryContentHelper.FromEnumerable(message, _modelReaderWriterOptions);")); } else if (inputType is InputDictionaryType) { Assert.IsTrue(convenienceMethod!.BodyStatements!.ToDisplayString() - .Contains("using global::Microsoft.TypeSpec.Generator.ClientModel.Tests.TestRequestContent content = global::Sample.BinaryContentHelper.FromDictionary(message);")); + .Contains("using global::Microsoft.TypeSpec.Generator.ClientModel.Tests.TestRequestContent content = global::Sample.BinaryContentHelper.FromDictionary(message, _modelReaderWriterOptions);")); } else { @@ -4722,6 +4722,39 @@ public void ConvenienceMethod_ModelProxies_ConvertsWithClientOptions(InputModelT Assert.AreEqual(Helpers.GetExpectedFromFile(parameters), methodBody); } + // Collection bodies written by BinaryContentHelper pass the client's options so its proxies apply to model items. + // BinaryData items are written by their own overloads, which don't take options. + [TestCase("ModelList")] + [TestCase("ModelDictionary")] + [TestCase("BinaryDataList")] + public void ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(string bodyKind) + { + var item = InputFactory.Model("Item", usage: InputModelTypeUsage.Input | InputModelTypeUsage.Json); + InputType bodyType = bodyKind switch + { + "ModelList" => InputFactory.Array(item), + "ModelDictionary" => InputFactory.Dictionary(item), + _ => InputFactory.Array(InputPrimitiveType.Any) + }; + var operation = InputFactory.Operation( + "Upload", + parameters: [InputFactory.BodyParameter("body", bodyType, isRequired: true)], + requestMediaTypes: ["application/json"], + responses: [InputFactory.OperationResponse([204])]); + var serviceMethod = InputFactory.BasicServiceMethod( + "Upload", + operation, + parameters: [InputFactory.MethodParameter("body", bodyType, isRequired: true, location: InputRequestLocation.Body)]); + var inputClient = InputFactory.Client("TestClient", methods: [serviceMethod]); + MockHelpers.LoadMockGenerator(clients: () => [inputClient], inputModels: () => [item]); + + var client = ScmCodeModelGenerator.Instance.TypeFactory.CreateClient(inputClient); + var convenienceMethod = new ScmMethodProviderCollection(serviceMethod, client!).Single(m => + m.Signature.Parameters.All(p => p.Name != "options") && m.Signature.Name == "Upload"); + + Assert.AreEqual(Helpers.GetExpectedFromFile(bodyKind), convenienceMethod.BodyStatements!.ToDisplayString()); + } + [Test] public void ConvenienceMethod_XmlListBody_UsesXmlFromEnumerable() { @@ -4863,7 +4896,7 @@ public void ConvenienceMethod_JsonListBody_DoesNotUseXmlFromEnumerable() var methodBody = convenienceMethod!.BodyStatements!.ToDisplayString(); // Ensure the method body uses the standard JSON FromEnumerable (no rootNameHint/childNameHint) - Assert.IsTrue(methodBody.Contains("BinaryContentHelper.FromEnumerable(body)")); + Assert.IsTrue(methodBody.Contains("BinaryContentHelper.FromEnumerable(body, _modelReaderWriterOptions)")); Assert.IsFalse(methodBody.Contains("rootNameHint")); Assert.IsFalse(methodBody.Contains("childNameHint")); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(BinaryDataList).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(BinaryDataList).cs new file mode 100644 index 00000000000..1d576caf2b2 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(BinaryDataList).cs @@ -0,0 +1,4 @@ +global::Sample.Argument.AssertNotNull(body, nameof(body)); + +using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body); +return this.Upload(content, cancellationToken.ToRequestOptions()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(ModelDictionary).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(ModelDictionary).cs new file mode 100644 index 00000000000..222f59600dc --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(ModelDictionary).cs @@ -0,0 +1,4 @@ +global::Sample.Argument.AssertNotNull(body, nameof(body)); + +using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body, _modelReaderWriterOptions); +return this.Upload(content, cancellationToken.ToRequestOptions()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(ModelList).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(ModelList).cs new file mode 100644 index 00000000000..aa71d230dfb --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_ModelProxies_PassClientOptionsToBinaryContentHelper(ModelList).cs @@ -0,0 +1,4 @@ +global::Sample.Argument.AssertNotNull(body, nameof(body)); + +using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body, _modelReaderWriterOptions); +return this.Upload(content, cancellationToken.ToRequestOptions()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_XmlListBody_UsesXmlFromEnumerable.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_XmlListBody_UsesXmlFromEnumerable.cs index 9fedf14efd0..43f313b016f 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_XmlListBody_UsesXmlFromEnumerable.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_XmlListBody_UsesXmlFromEnumerable.cs @@ -1,4 +1,4 @@ global::Sample.Argument.AssertNotNull(body, nameof(body)); -using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body, "list", "SignedIdentifier"); +using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body, "list", "SignedIdentifier", _modelReaderWriterOptions); return this.Foo(content, cancellationToken.ToRequestOptions()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(Int16).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(Int16).cs index 62e2ec99a9a..dd41e6ad153 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(Int16).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(Int16).cs @@ -2,27 +2,27 @@ { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body, _modelReaderWriterOptions); return this.SendNested(content, cancellationToken.ToRequestOptions()); } public virtual async global::System.Threading.Tasks.Task SendNestedAsync(global::System.Collections.Generic.IEnumerable> body, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body, _modelReaderWriterOptions); return await this.SendNestedAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } public virtual global::System.ClientModel.ClientResult SendRecord(global::System.Collections.Generic.IDictionary> body, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body, _modelReaderWriterOptions); return this.SendRecord(content, cancellationToken.ToRequestOptions()); } public virtual async global::System.Threading.Tasks.Task SendRecordAsync(global::System.Collections.Generic.IDictionary> body, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body, _modelReaderWriterOptions); return await this.SendRecordAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(UInt16).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(UInt16).cs index 1f0fe2a3f5b..f34de50a8ee 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(UInt16).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(UInt16).cs @@ -2,27 +2,27 @@ { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body, _modelReaderWriterOptions); return this.SendNested(content, cancellationToken.ToRequestOptions()); } public virtual async global::System.Threading.Tasks.Task SendNestedAsync(global::System.Collections.Generic.IEnumerable> body, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body, _modelReaderWriterOptions); return await this.SendNestedAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } public virtual global::System.ClientModel.ClientResult SendRecord(global::System.Collections.Generic.IDictionary> body, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body, _modelReaderWriterOptions); return this.SendRecord(content, cancellationToken.ToRequestOptions()); } public virtual async global::System.Threading.Tasks.Task SendRecordAsync(global::System.Collections.Generic.IDictionary> body, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body, _modelReaderWriterOptions); return await this.SendRecordAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(UInt32).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(UInt32).cs index 99ab9612f46..ef711b1c5d7 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(UInt32).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(UInt32).cs @@ -2,27 +2,27 @@ { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body, _modelReaderWriterOptions); return this.SendNested(content, cancellationToken.ToRequestOptions()); } public virtual async global::System.Threading.Tasks.Task SendNestedAsync(global::System.Collections.Generic.IEnumerable> body, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body, _modelReaderWriterOptions); return await this.SendNestedAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } public virtual global::System.ClientModel.ClientResult SendRecord(global::System.Collections.Generic.IDictionary> body, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body, _modelReaderWriterOptions); return this.SendRecord(content, cancellationToken.ToRequestOptions()); } public virtual async global::System.Threading.Tasks.Task SendRecordAsync(global::System.Collections.Generic.IDictionary> body, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body, _modelReaderWriterOptions); return await this.SendRecordAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(UInt64).cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(UInt64).cs index 7038a7059a9..ecde7554bff 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(UInt64).cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/NestedIntegerCollectionRequestsUseBinaryContentHelpers(UInt64).cs @@ -2,27 +2,27 @@ { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body, _modelReaderWriterOptions); return this.SendNested(content, cancellationToken.ToRequestOptions()); } public virtual async global::System.Threading.Tasks.Task SendNestedAsync(global::System.Collections.Generic.IEnumerable> body, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromEnumerable(body, _modelReaderWriterOptions); return await this.SendNestedAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } public virtual global::System.ClientModel.ClientResult SendRecord(global::System.Collections.Generic.IDictionary> body, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body, _modelReaderWriterOptions); return this.SendRecord(content, cancellationToken.ToRequestOptions()); } public virtual async global::System.Threading.Tasks.Task SendRecordAsync(global::System.Collections.Generic.IDictionary> body, global::System.Threading.CancellationToken cancellationToken = default) { global::Sample.Argument.AssertNotNull(body, nameof(body)); - using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body); + using global::System.ClientModel.BinaryContent content = global::Sample.BinaryContentHelper.FromDictionary(body, _modelReaderWriterOptions); return await this.SendRecordAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestHelpers/ClientPipelineWithoutModelProxies.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestHelpers/ClientPipelineWithoutModelProxies.cs index e6b7d1b7c8d..164fc15a1ad 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestHelpers/ClientPipelineWithoutModelProxies.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestHelpers/ClientPipelineWithoutModelProxies.cs @@ -19,7 +19,7 @@ public ClientPipelineWithoutModelProxies(ValueExpression original) : base(origin { } - public override ValueExpression? GetModelProxies(ValueExpression clientOptions) => null; + public override bool SupportsModelProxies => false; public override ClientPipelineApi FromExpression(ValueExpression expression) => new ClientPipelineWithoutModelProxies(expression); diff --git a/packages/http-client-csharp/generator/TestProjects/Local.Tests/ModelProxyTests.cs b/packages/http-client-csharp/generator/TestProjects/Local.Tests/ModelProxyTests.cs index 7656aa34afb..21ea1a3ef32 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local.Tests/ModelProxyTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local.Tests/ModelProxyTests.cs @@ -130,27 +130,6 @@ public void NestedXmlModelReadsUseRegisteredProxy() Assert.AreEqual(1, itemProxy.ReadCount); } - // An XML-only parent read with "W" resolves its own format to XML but passes "W" to nested reads. A nested model that - // also supports JSON reports "J" for "W", so its proxy-aware read must still request XML and keep the proxies. - [TestCase("W")] - [TestCase("X")] - public void NestedDualFormatXmlModelReadsUseRegisteredProxy(string format) - { - var proxy = new TreeXmlProxy(); - var options = new ModelReaderWriterOptions(format); - options.Proxies.Add(proxy); - - var container = ModelReaderWriter.Read( - BinaryData.FromString("""treet1105"""), - options, - SampleTypeSpecContext.Default); - - Assert.AreEqual("proxy:t1", container!.Tree.Id); - Assert.AreEqual(5, container.Tree.Age); - Assert.AreEqual(1, proxy.ReadCount); - Assert.AreEqual("X", proxy.LastReadFormat); - } - // Clients copy the proxies configured on their options into the options they use for every operation. [Test] public void ClientResponsesUseClientOptionsProxies() @@ -203,6 +182,43 @@ public void ClientPagesUseClientOptionsProxies() Assert.AreEqual(2, handler.RequestBodies.Count); } + // Multipart bodies write their model parts with the client's options. + [Test] + public void ClientMultipartBodiesUseClientOptionsProxies() + { + var proxy = new ThingProxy(); + var handler = new StubHandler(HttpStatusCode.NoContent); +#pragma warning disable SCME0004 // Multipart file parts and content are evaluation-only. + var cat = new Cat( + "id", + true, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + new Dictionary(), + new Dictionary { ["key"] = CreateThing("value") }, + [], + [CreateThing("item")], + [], + BinaryData.FromString("image"), + StringExtensibleEnum.One, + StringFixedEnum.One, + IntExtensibleEnum.One, + IntFixedEnum.One); + + CreateClient(handler, proxy).UploadCat(cat); +#pragma warning restore SCME0004 + + var body = handler.RequestBodies.Single(); + StringAssert.Contains("""{"proxied":"item"}""", body); + StringAssert.Contains("""{"proxied":"value"}""", body); + Assert.AreEqual(2, proxy.WriteCount); + } + [Test] public void SubClientResponsesUseClientOptionsProxies() { @@ -251,23 +267,34 @@ private static SampleTypeSpecClient CreateClient(StubHandler handler, ModelProxy return new SampleTypeSpecClient(new Uri("https://example.com"), new ApiKeyCredential("key"), options); } - // Returns the queued responses in order and records each request body. + // Returns the queued responses in order, or an empty response with the given status, and records each request body. private sealed class StubHandler : HttpMessageHandler { private readonly Queue<(string Content, string ContentType)> _responses; + private readonly HttpStatusCode _statusCode = HttpStatusCode.OK; public StubHandler(params (string Content, string ContentType)[] responses) { _responses = new(responses); } + public StubHandler(HttpStatusCode statusCode) + { + _responses = new(); + _statusCode = statusCode; + } + public List RequestBodies { get; } = []; protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) { RequestBodies.Add(request.Content?.ReadAsStringAsync(cancellationToken).GetAwaiter().GetResult() ?? string.Empty); + if (_responses.Count == 0) + { + return new HttpResponseMessage(_statusCode); + } var (content, contentType) = _responses.Dequeue(); - return new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent(content, Encoding.UTF8, contentType) }; + return new HttpResponseMessage(_statusCode) { Content = new StringContent(content, Encoding.UTF8, contentType) }; } protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/Sample-TypeSpec.tsp b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/Sample-TypeSpec.tsp index d03efe9c5a5..4ed8e2a3d2a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/Sample-TypeSpec.tsp +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/Sample-TypeSpec.tsp @@ -1012,20 +1012,6 @@ interface PlantOperations { @header contentType: "application/json"; @body body: Tree; }; - - @doc("Get an XML-only container that nests a tree, which also supports JSON") - @get - @route("/tree/container") - getTreeContainer(): { - @header contentType: "application/xml"; - @body body: XmlTreeContainer; - }; -} - -@doc("XML-only container whose nested tree also supports JSON") -model XmlTreeContainer { - @doc("The nested tree") - tree: Tree; } model MetricsClientParams { diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/BinaryContentHelper.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/BinaryContentHelper.cs index b76cf24aa37..05dd6f65630 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/BinaryContentHelper.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/BinaryContentHelper.cs @@ -7,6 +7,7 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; using System.Collections.Generic; using System.IO; using System.Text.Json; @@ -17,14 +18,16 @@ namespace SampleTypeSpec internal static partial class BinaryContentHelper { /// - public static BinaryContent FromEnumerable(IEnumerable enumerable) + /// + public static BinaryContent FromEnumerable(IEnumerable enumerable, ModelReaderWriterOptions options = null) where T : notnull { + options ??= ModelSerializationExtensions.WireOptions; Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); content.JsonWriter.WriteStartArray(); foreach (var item in enumerable) { - content.JsonWriter.WriteObjectValue(item, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(item, options); } content.JsonWriter.WriteEndArray(); @@ -60,15 +63,17 @@ public static BinaryContent FromEnumerable(IEnumerable enumerable) } /// - public static BinaryContent FromEnumerable(ReadOnlySpan span) + /// + public static BinaryContent FromEnumerable(ReadOnlySpan span, ModelReaderWriterOptions options = null) where T : notnull { + options ??= ModelSerializationExtensions.WireOptions; Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); content.JsonWriter.WriteStartArray(); int i = 0; for (; i < span.Length; i++) { - content.JsonWriter.WriteObjectValue(span[i], ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(span[i], options); } content.JsonWriter.WriteEndArray(); @@ -76,15 +81,17 @@ public static BinaryContent FromEnumerable(ReadOnlySpan span) } /// - public static BinaryContent FromDictionary(IDictionary dictionary) + /// + public static BinaryContent FromDictionary(IDictionary dictionary, ModelReaderWriterOptions options = null) where TValue : notnull { + options ??= ModelSerializationExtensions.WireOptions; Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); content.JsonWriter.WriteStartObject(); foreach (var item in dictionary) { content.JsonWriter.WritePropertyName(item.Key); - content.JsonWriter.WriteObjectValue(item.Value, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(item.Value, options); } content.JsonWriter.WriteEndObject(); @@ -146,9 +153,11 @@ public static BinaryContent FromObject(BinaryData value) /// /// /// - public static BinaryContent FromEnumerable(IEnumerable enumerable, string rootNameHint, string childNameHint) + /// + public static BinaryContent FromEnumerable(IEnumerable enumerable, string rootNameHint, string childNameHint, ModelReaderWriterOptions options = null) where T : notnull { + options ??= ModelSerializationExtensions.WireOptions; using (MemoryStream stream = new MemoryStream(256)) { using (XmlWriter writer = XmlWriter.Create(stream, ModelSerializationExtensions.XmlWriterSettings)) @@ -156,7 +165,7 @@ public static BinaryContent FromEnumerable(IEnumerable enumerable, string writer.WriteStartElement(rootNameHint); foreach (var item in enumerable) { - writer.WriteObjectValue(item, ModelSerializationExtensions.WireOptions, childNameHint); + writer.WriteObjectValue(item, options, childNameHint); } writer.WriteEndElement(); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Cat.Serialization.Multipart.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Cat.Serialization.Multipart.cs index d30bad1d64e..93afff924df 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Cat.Serialization.Multipart.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Cat.Serialization.Multipart.cs @@ -22,7 +22,8 @@ internal Cat() } /// - internal MultiPartFormContent ToMultipartFormContent() + /// The options used to write the model parts, including the registered model proxies. + internal MultiPartFormContent ToMultipartFormContent(ModelReaderWriterOptions options) { MultiPartFormContent content = new MultiPartFormContent(); @@ -37,11 +38,11 @@ internal MultiPartFormContent ToMultipartFormContent() content.Add("uint8Part", Uint8Part, "text/plain"); BinaryData dictionaryPartData = MultipartFormDataHelper.FromDictionary(DictionaryPart, "application/json"); content.Add("dictionaryPart", dictionaryPartData); - BinaryData dictionaryModelPartData = ModelReaderWriter.Write(DictionaryModelPart, ModelSerializationExtensions.WireOptions, SampleTypeSpecContext.Default).WithMediaType("application/json"); + BinaryData dictionaryModelPartData = ModelReaderWriter.Write(DictionaryModelPart, options, SampleTypeSpecContext.Default).WithMediaType("application/json"); content.Add("dictionaryModelPart", dictionaryModelPartData); BinaryData listPartData = MultipartFormDataHelper.FromEnumerable(ListPart, "application/json"); content.Add("listPart", listPartData); - BinaryData listModelPartData = ModelReaderWriter.Write(ListModelPart, ModelSerializationExtensions.WireOptions, SampleTypeSpecContext.Default).WithMediaType("application/json"); + BinaryData listModelPartData = ModelReaderWriter.Write(ListModelPart, options, SampleTypeSpecContext.Default).WithMediaType("application/json"); content.Add("listModelPart", listModelPartData); foreach (string item in MultipleListPart) { diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SampleTypeSpecContext.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SampleTypeSpecContext.cs index 85a5886eb9d..660e594732e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SampleTypeSpecContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/SampleTypeSpecContext.cs @@ -109,7 +109,6 @@ namespace SampleTypeSpec [ModelReaderWriterBuildable(typeof(XmlItem))] [ModelReaderWriterBuildable(typeof(XmlModelWithNamespace))] [ModelReaderWriterBuildable(typeof(XmlNestedModel))] - [ModelReaderWriterBuildable(typeof(XmlTreeContainer))] [ModelReaderWriterBuildable(typeof(XmlUnionCat))] [ModelReaderWriterBuildable(typeof(XmlUnionPet))] public partial class SampleTypeSpecContext : ModelReaderWriterContext diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.Serialization.cs deleted file mode 100644 index 82c70593814..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.Serialization.cs +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.IO; -using System.Xml; -using System.Xml.Linq; - -namespace SampleTypeSpec -{ - /// XML-only container whose nested tree also supports JSON. - public partial class XmlTreeContainer : IPersistableModel - { - /// Initializes a new instance of for deserialization. - internal XmlTreeContainer() - { - } - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual XmlTreeContainer PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "X": - using (Stream dataStream = data.ToStream()) - { - return DeserializeXmlTreeContainer(XElement.Load(dataStream, LoadOptions.PreserveWhitespace), options); - } - default: - throw new FormatException($"The model {nameof(XmlTreeContainer)} does not support reading '{options.Format}' format."); - } - } - - /// The client options for reading and writing models. - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "X": - using (MemoryStream stream = new MemoryStream(256)) - { - using (XmlWriter writer = XmlWriter.Create(stream, ModelSerializationExtensions.XmlWriterSettings)) - { - WriteXml(writer, options, "XmlTreeContainer"); - } - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } - } - default: - throw new FormatException($"The model {nameof(XmlTreeContainer)} does not support writing '{options.Format}' format."); - } - } - - /// The client options for reading and writing models. - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - - /// The data to parse. - /// The client options for reading and writing models. - XmlTreeContainer IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The client options for reading and writing models. - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "X"; - - /// The to deserialize the from. - public static explicit operator XmlTreeContainer(ClientResult result) - { - using PipelineResponse response = result.GetRawResponse(); - using Stream stream = response.ContentStream; - if (stream == null) - { - return default; - } - - return DeserializeXmlTreeContainer(XElement.Load(stream, LoadOptions.PreserveWhitespace), ModelSerializationExtensions.WireOptions); - } - - /// The to deserialize the from. - /// The options used to read the model, including the registered model proxies. - internal static XmlTreeContainer FromClientResult(ClientResult result, ModelReaderWriterOptions options) - { - PipelineResponse response = result.GetRawResponse(); - if (options.ShouldReadThroughProxy(SampleTypeSpecContext.Default)) - { - return ModelReaderWriter.Read(response.Content, options, SampleTypeSpecContext.Default); - } - using Stream stream = response.ContentStream; - if (stream == null) - { - return default; - } - - return DeserializeXmlTreeContainer(XElement.Load(stream, LoadOptions.PreserveWhitespace), options); - } - - /// The XML writer. - /// The client options for reading and writing models. - /// An optional name hint. - private void WriteXml(XmlWriter writer, ModelReaderWriterOptions options, string nameHint) - { - if (nameHint != null) - { - writer.WriteStartElement(nameHint); - } - - XmlModelWriteCore(writer, options); - - if (nameHint != null) - { - writer.WriteEndElement(); - } - } - - /// The XML writer. - /// The client options for reading and writing models. - internal virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "X") - { - throw new FormatException($"The model {nameof(XmlTreeContainer)} does not support writing '{format}' format."); - } - - writer.WriteStartElement("tree"); - writer.WriteObjectValue(Tree, options); - writer.WriteEndElement(); - } - - /// The xml element to deserialize. - /// The client options for reading and writing models. - internal static XmlTreeContainer DeserializeXmlTreeContainer(XElement element, ModelReaderWriterOptions options) - { - if (element == null) - { - return null; - } - - Tree tree = default; - - foreach (var child in element.Elements()) - { - string localName = child.Name.LocalName; - if (localName == "tree") - { - tree = options.ShouldReadThroughProxy(SampleTypeSpecContext.Default) ? ModelReaderWriter.Read(child.GetUtf8Bytes(), options.ToXmlOptions(), SampleTypeSpecContext.Default) : Tree.DeserializeTree(child, options); - continue; - } - } - return new XmlTreeContainer(tree); - } - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.cs deleted file mode 100644 index 9399f1230f9..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/XmlTreeContainer.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace SampleTypeSpec -{ - /// XML-only container whose nested tree also supports JSON. - public partial class XmlTreeContainer - { - /// Initializes a new instance of . - /// The nested tree. - internal XmlTreeContainer(Tree tree) - { - Tree = tree; - } - - /// The nested tree. - public Tree Tree { get; } - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.RestClient.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.RestClient.cs index e0fd5dcaa14..2e630d7c798 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.RestClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.RestClient.cs @@ -68,17 +68,5 @@ internal PipelineMessage CreateUpdateTreeAsJsonRequest(BinaryContent content, Re message.Apply(options); return message; } - - internal PipelineMessage CreateGetTreeContainerRequest(RequestOptions options) - { - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/plants/tree/container", false); - PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); - PipelineRequest request = message.Request; - request.Headers.Set("Accept", "application/xml"); - message.Apply(options); - return message; - } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.cs index 08397e41720..c7f18920a6c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.cs @@ -281,57 +281,5 @@ public virtual async Task> UpdateTreeAsJsonAsync(Tree tree, C ClientResult result = await UpdateTreeAsJsonAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue(Tree.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); } - - /// - /// [Protocol Method] Get an XML-only container that nests a tree, which also supports JSON - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual ClientResult GetTreeContainer(RequestOptions options) - { - using PipelineMessage message = CreateGetTreeContainerRequest(options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - /// - /// [Protocol Method] Get an XML-only container that nests a tree, which also supports JSON - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task GetTreeContainerAsync(RequestOptions options) - { - using PipelineMessage message = CreateGetTreeContainerRequest(options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - /// Get an XML-only container that nests a tree, which also supports JSON. - /// The cancellation token that can be used to cancel the operation. - /// Service returned a non-success status code. - public virtual ClientResult GetTreeContainer(CancellationToken cancellationToken = default) - { - ClientResult result = GetTreeContainer(cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(XmlTreeContainer.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); - } - - /// Get an XML-only container that nests a tree, which also supports JSON. - /// The cancellation token that can be used to cancel the operation. - /// Service returned a non-success status code. - public virtual async Task> GetTreeContainerAsync(CancellationToken cancellationToken = default) - { - ClientResult result = await GetTreeContainerAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(XmlTreeContainer.FromClientResult(result, _modelReaderWriterOptions), result.GetRawResponse()); - } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecClient.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecClient.cs index aa4963fd53e..8cee9356e00 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecClient.cs @@ -1947,7 +1947,7 @@ public virtual ClientResult UploadCat(Cat body, CancellationToken cancellationTo { Argument.AssertNotNull(body, nameof(body)); - using MultiPartFormContent content = body.ToMultipartFormContent(); + using MultiPartFormContent content = body.ToMultipartFormContent(_modelReaderWriterOptions); return UploadCat(content, content.MediaType, cancellationToken.ToRequestOptions()); } @@ -1961,7 +1961,7 @@ public virtual async Task UploadCatAsync(Cat body, CancellationTok { Argument.AssertNotNull(body, nameof(body)); - using MultiPartFormContent content = body.ToMultipartFormContent(); + using MultiPartFormContent content = body.ToMultipartFormContent(_modelReaderWriterOptions); return await UploadCatAsync(content, content.MediaType, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecModelFactory.cs index 7e9a0fd08ab..7981038091a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecModelFactory.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecModelFactory.cs @@ -561,14 +561,6 @@ public static Plant Plant(string species = default, string id = default, int hei return new UnknownPlant(species, id, height, additionalBinaryDataProperties: null); } - /// XML-only container whose nested tree also supports JSON. - /// The nested tree. - /// A new instance for mocking. - public static XmlTreeContainer XmlTreeContainer(Tree tree = default) - { - return new XmlTreeContainer(tree); - } - /// The GetWidgetMetricsResult. /// /// diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/tspCodeModel.json index c7fd75dca86..4c0b19a7d46 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/tspCodeModel.json +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/tspCodeModel.json @@ -3008,7 +3008,7 @@ { "$id": "298", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType12", + "name": "GetTreeAsJsonResponseContentType46", "namespace": "", "usage": "None", "valueType": { @@ -3018,14 +3018,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "300", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType13", + "name": "GetTreeAsJsonResponseContentType47", "namespace": "", "usage": "None", "valueType": { @@ -3035,14 +3035,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "302", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType46", + "name": "GetTreeAsJsonResponseContentType48", "namespace": "", "usage": "None", "valueType": { @@ -3059,7 +3059,7 @@ { "$id": "304", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType47", + "name": "GetTreeAsJsonResponseContentType49", "namespace": "", "usage": "None", "valueType": { @@ -3076,7 +3076,7 @@ { "$id": "306", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType48", + "name": "GetXmlAdvancedModelResponseContentType12", "namespace": "", "usage": "None", "valueType": { @@ -3086,14 +3086,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, { "$id": "308", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType49", + "name": "GetXmlAdvancedModelResponseContentType13", "namespace": "", "usage": "None", "valueType": { @@ -3103,7 +3103,7 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, @@ -3144,7 +3144,7 @@ { "$id": "314", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType16", + "name": "GetTreeAsJsonResponseContentType50", "namespace": "", "usage": "None", "valueType": { @@ -3154,14 +3154,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "316", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType17", + "name": "GetTreeAsJsonResponseContentType51", "namespace": "", "usage": "None", "valueType": { @@ -3171,14 +3171,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "318", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType50", + "name": "GetTreeAsJsonResponseContentType52", "namespace": "", "usage": "None", "valueType": { @@ -3195,7 +3195,7 @@ { "$id": "320", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType51", + "name": "GetTreeAsJsonResponseContentType53", "namespace": "", "usage": "None", "valueType": { @@ -3212,7 +3212,7 @@ { "$id": "322", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType52", + "name": "GetTreeAsJsonResponseContentType54", "namespace": "", "usage": "None", "valueType": { @@ -3229,7 +3229,7 @@ { "$id": "324", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType53", + "name": "GetTreeAsJsonResponseContentType55", "namespace": "", "usage": "None", "valueType": { @@ -3246,7 +3246,7 @@ { "$id": "326", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType54", + "name": "GetTreeAsJsonResponseContentType56", "namespace": "", "usage": "None", "valueType": { @@ -3263,7 +3263,7 @@ { "$id": "328", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType55", + "name": "GetTreeAsJsonResponseContentType57", "namespace": "", "usage": "None", "valueType": { @@ -3280,7 +3280,7 @@ { "$id": "330", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType56", + "name": "GetTreeAsJsonResponseContentType58", "namespace": "", "usage": "None", "valueType": { @@ -3297,7 +3297,7 @@ { "$id": "332", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType57", + "name": "GetTreeAsJsonResponseContentType59", "namespace": "", "usage": "None", "valueType": { @@ -3314,7 +3314,7 @@ { "$id": "334", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType58", + "name": "GetTreeAsJsonResponseContentType60", "namespace": "", "usage": "None", "valueType": { @@ -3331,7 +3331,7 @@ { "$id": "336", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType59", + "name": "GetTreeAsJsonResponseContentType61", "namespace": "", "usage": "None", "valueType": { @@ -3348,7 +3348,7 @@ { "$id": "338", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType60", + "name": "GetXmlAdvancedModelResponseContentType16", "namespace": "", "usage": "None", "valueType": { @@ -3358,14 +3358,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, { "$id": "340", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType61", + "name": "GetXmlAdvancedModelResponseContentType17", "namespace": "", "usage": "None", "valueType": { @@ -3375,7 +3375,7 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, @@ -3416,7 +3416,7 @@ { "$id": "346", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType20", + "name": "GetTreeAsJsonResponseContentType62", "namespace": "", "usage": "None", "valueType": { @@ -3426,14 +3426,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "348", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType21", + "name": "GetTreeAsJsonResponseContentType63", "namespace": "", "usage": "None", "valueType": { @@ -3443,14 +3443,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "350", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType62", + "name": "GetTreeAsJsonResponseContentType64", "namespace": "", "usage": "None", "valueType": { @@ -3467,7 +3467,7 @@ { "$id": "352", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType63", + "name": "GetTreeAsJsonResponseContentType65", "namespace": "", "usage": "None", "valueType": { @@ -3484,7 +3484,7 @@ { "$id": "354", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType64", + "name": "GetTreeAsJsonResponseContentType66", "namespace": "", "usage": "None", "valueType": { @@ -3501,7 +3501,7 @@ { "$id": "356", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType65", + "name": "GetTreeAsJsonResponseContentType67", "namespace": "", "usage": "None", "valueType": { @@ -3518,7 +3518,7 @@ { "$id": "358", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType66", + "name": "GetTreeAsJsonResponseContentType68", "namespace": "", "usage": "None", "valueType": { @@ -3535,7 +3535,7 @@ { "$id": "360", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType67", + "name": "GetTreeAsJsonResponseContentType69", "namespace": "", "usage": "None", "valueType": { @@ -3552,7 +3552,7 @@ { "$id": "362", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType68", + "name": "GetTreeAsJsonResponseContentType70", "namespace": "", "usage": "None", "valueType": { @@ -3569,7 +3569,7 @@ { "$id": "364", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType69", + "name": "GetTreeAsJsonResponseContentType71", "namespace": "", "usage": "None", "valueType": { @@ -3586,7 +3586,7 @@ { "$id": "366", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType70", + "name": "GetTreeAsJsonResponseContentType72", "namespace": "", "usage": "None", "valueType": { @@ -3603,7 +3603,7 @@ { "$id": "368", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType71", + "name": "GetTreeAsJsonResponseContentType73", "namespace": "", "usage": "None", "valueType": { @@ -3620,7 +3620,7 @@ { "$id": "370", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType72", + "name": "GetTreeAsJsonResponseContentType74", "namespace": "", "usage": "None", "valueType": { @@ -3637,7 +3637,7 @@ { "$id": "372", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType73", + "name": "GetTreeAsJsonResponseContentType75", "namespace": "", "usage": "None", "valueType": { @@ -3654,7 +3654,7 @@ { "$id": "374", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType74", + "name": "GetTreeAsJsonResponseContentType76", "namespace": "", "usage": "None", "valueType": { @@ -3671,7 +3671,7 @@ { "$id": "376", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType75", + "name": "GetTreeAsJsonResponseContentType77", "namespace": "", "usage": "None", "valueType": { @@ -3688,7 +3688,7 @@ { "$id": "378", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType76", + "name": "GetTreeAsJsonResponseContentType78", "namespace": "", "usage": "None", "valueType": { @@ -3705,7 +3705,7 @@ { "$id": "380", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType77", + "name": "GetTreeAsJsonResponseContentType79", "namespace": "", "usage": "None", "valueType": { @@ -3722,7 +3722,7 @@ { "$id": "382", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType78", + "name": "GetTreeAsJsonResponseContentType80", "namespace": "", "usage": "None", "valueType": { @@ -3739,7 +3739,7 @@ { "$id": "384", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType79", + "name": "GetTreeAsJsonResponseContentType81", "namespace": "", "usage": "None", "valueType": { @@ -3756,7 +3756,7 @@ { "$id": "386", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType80", + "name": "GetTreeAsJsonResponseContentType82", "namespace": "", "usage": "None", "valueType": { @@ -3773,7 +3773,7 @@ { "$id": "388", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType81", + "name": "GetTreeAsJsonResponseContentType83", "namespace": "", "usage": "None", "valueType": { @@ -3790,7 +3790,7 @@ { "$id": "390", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType82", + "name": "GetTreeAsJsonResponseContentType84", "namespace": "", "usage": "None", "valueType": { @@ -3807,7 +3807,7 @@ { "$id": "392", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType83", + "name": "GetTreeAsJsonResponseContentType85", "namespace": "", "usage": "None", "valueType": { @@ -3824,7 +3824,7 @@ { "$id": "394", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType84", + "name": "GetTreeAsJsonResponseContentType86", "namespace": "", "usage": "None", "valueType": { @@ -3841,7 +3841,7 @@ { "$id": "396", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType85", + "name": "GetTreeAsJsonResponseContentType87", "namespace": "", "usage": "None", "valueType": { @@ -3858,7 +3858,7 @@ { "$id": "398", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType86", + "name": "GetTreeAsJsonResponseContentType88", "namespace": "", "usage": "None", "valueType": { @@ -3875,7 +3875,7 @@ { "$id": "400", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType87", + "name": "GetTreeAsJsonResponseContentType89", "namespace": "", "usage": "None", "valueType": { @@ -3892,7 +3892,7 @@ { "$id": "402", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType88", + "name": "GetTreeAsJsonResponseContentType90", "namespace": "", "usage": "None", "valueType": { @@ -3909,7 +3909,7 @@ { "$id": "404", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType89", + "name": "GetTreeAsJsonResponseContentType91", "namespace": "", "usage": "None", "valueType": { @@ -3926,7 +3926,7 @@ { "$id": "406", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType90", + "name": "GetTreeAsJsonResponseContentType92", "namespace": "", "usage": "None", "valueType": { @@ -3943,7 +3943,7 @@ { "$id": "408", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType91", + "name": "GetTreeAsJsonResponseContentType93", "namespace": "", "usage": "None", "valueType": { @@ -3960,7 +3960,7 @@ { "$id": "410", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType92", + "name": "GetTreeAsJsonResponseContentType94", "namespace": "", "usage": "None", "valueType": { @@ -3977,7 +3977,7 @@ { "$id": "412", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType93", + "name": "GetTreeAsJsonResponseContentType95", "namespace": "", "usage": "None", "valueType": { @@ -3994,7 +3994,7 @@ { "$id": "414", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType94", + "name": "GetTreeAsJsonResponseContentType96", "namespace": "", "usage": "None", "valueType": { @@ -4011,7 +4011,7 @@ { "$id": "416", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType95", + "name": "GetTreeAsJsonResponseContentType97", "namespace": "", "usage": "None", "valueType": { @@ -4028,7 +4028,7 @@ { "$id": "418", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType96", + "name": "SendJsonLinesRequestContentType5", "namespace": "", "usage": "None", "valueType": { @@ -4038,14 +4038,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/jsonl", "decorators": [], "isExactName": false }, { "$id": "420", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType97", + "name": "SendJsonLinesRequestContentType6", "namespace": "", "usage": "None", "valueType": { @@ -4055,14 +4055,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/jsonl", "decorators": [], "isExactName": false }, { "$id": "422", "kind": "constant", - "name": "SendJsonLinesRequestContentType5", + "name": "SendJsonLinesRequestContentType7", "namespace": "", "usage": "None", "valueType": { @@ -4079,7 +4079,7 @@ { "$id": "424", "kind": "constant", - "name": "SendJsonLinesRequestContentType6", + "name": "SendJsonLinesRequestContentType8", "namespace": "", "usage": "None", "valueType": { @@ -4096,7 +4096,7 @@ { "$id": "426", "kind": "constant", - "name": "SendJsonLinesRequestContentType7", + "name": "SendJsonLinesRequestContentType9", "namespace": "", "usage": "None", "valueType": { @@ -4113,7 +4113,7 @@ { "$id": "428", "kind": "constant", - "name": "SendJsonLinesRequestContentType8", + "name": "SendJsonLinesRequestContentType10", "namespace": "", "usage": "None", "valueType": { @@ -4130,7 +4130,7 @@ { "$id": "430", "kind": "constant", - "name": "SendJsonLinesRequestContentType9", + "name": "GetTreeAsJsonResponseContentType98", "namespace": "", "usage": "None", "valueType": { @@ -4140,14 +4140,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/jsonl", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "432", "kind": "constant", - "name": "SendJsonLinesRequestContentType10", + "name": "GetTreeAsJsonResponseContentType99", "namespace": "", "usage": "None", "valueType": { @@ -4157,14 +4157,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/jsonl", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "434", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType98", + "name": "GetTreeAsJsonResponseContentType100", "namespace": "", "usage": "None", "valueType": { @@ -4181,7 +4181,7 @@ { "$id": "436", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType99", + "name": "GetTreeAsJsonResponseContentType101", "namespace": "", "usage": "None", "valueType": { @@ -4198,7 +4198,7 @@ { "$id": "438", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType100", + "name": "GetTreeAsJsonResponseContentType102", "namespace": "", "usage": "None", "valueType": { @@ -4215,7 +4215,7 @@ { "$id": "440", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType101", + "name": "GetTreeAsJsonResponseContentType103", "namespace": "", "usage": "None", "valueType": { @@ -4232,7 +4232,7 @@ { "$id": "442", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType102", + "name": "GetTreeAsJsonResponseContentType104", "namespace": "", "usage": "None", "valueType": { @@ -4249,7 +4249,7 @@ { "$id": "444", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType103", + "name": "GetTreeAsJsonResponseContentType105", "namespace": "", "usage": "None", "valueType": { @@ -4266,7 +4266,7 @@ { "$id": "446", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType104", + "name": "GetXmlAdvancedModelResponseContentType20", "namespace": "", "usage": "None", "valueType": { @@ -4276,14 +4276,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, { "$id": "448", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType105", + "name": "GetXmlAdvancedModelResponseContentType21", "namespace": "", "usage": "None", "valueType": { @@ -4293,14 +4293,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/json", + "value": "application/xml", "decorators": [], "isExactName": false }, { "$id": "450", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType22", + "name": "GetTreeAsJsonResponseContentType106", "namespace": "", "usage": "None", "valueType": { @@ -4310,14 +4310,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "452", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType23", + "name": "GetTreeAsJsonResponseContentType107", "namespace": "", "usage": "None", "valueType": { @@ -4327,14 +4327,14 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [], "isExactName": false }, { "$id": "454", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType106", + "name": "GetTreeAsJsonResponseContentType108", "namespace": "", "usage": "None", "valueType": { @@ -4351,7 +4351,7 @@ { "$id": "456", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType107", + "name": "GetTreeAsJsonResponseContentType109", "namespace": "", "usage": "None", "valueType": { @@ -4368,7 +4368,7 @@ { "$id": "458", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType108", + "name": "GetTreeAsJsonResponseContentType110", "namespace": "", "usage": "None", "valueType": { @@ -4385,7 +4385,7 @@ { "$id": "460", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType109", + "name": "GetTreeAsJsonResponseContentType111", "namespace": "", "usage": "None", "valueType": { @@ -4402,7 +4402,7 @@ { "$id": "462", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType110", + "name": "GetTreeAsJsonResponseContentType112", "namespace": "", "usage": "None", "valueType": { @@ -4419,7 +4419,7 @@ { "$id": "464", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType111", + "name": "GetTreeAsJsonResponseContentType113", "namespace": "", "usage": "None", "valueType": { @@ -4436,7 +4436,7 @@ { "$id": "466", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType112", + "name": "GetTreeAsJsonResponseContentType114", "namespace": "", "usage": "None", "valueType": { @@ -4453,7 +4453,7 @@ { "$id": "468", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType113", + "name": "GetTreeAsJsonResponseContentType115", "namespace": "", "usage": "None", "valueType": { @@ -4470,7 +4470,7 @@ { "$id": "470", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType114", + "name": "GetTreeAsJsonResponseContentType116", "namespace": "", "usage": "None", "valueType": { @@ -4487,45 +4487,11 @@ { "$id": "472", "kind": "constant", - "name": "GetTreeAsJsonResponseContentType115", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [], - "isExactName": false - }, - { - "$id": "474", - "kind": "constant", - "name": "GetTreeAsJsonResponseContentType116", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "475", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [], - "isExactName": false - }, - { - "$id": "476", - "kind": "constant", "name": "GetTreeAsJsonResponseContentType117", "namespace": "", "usage": "None", "valueType": { - "$id": "477", + "$id": "473", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4538,7 +4504,7 @@ ], "models": [ { - "$id": "478", + "$id": "474", "kind": "model", "name": "Thing", "apiVersions": [ @@ -4558,7 +4524,7 @@ "isExactName": false, "properties": [ { - "$id": "479", + "$id": "475", "kind": "property", "name": "name", "apiVersions": [ @@ -4568,7 +4534,7 @@ "serializedName": "name", "doc": "name of the Thing", "type": { - "$id": "480", + "$id": "476", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4589,7 +4555,7 @@ "isExactName": false }, { - "$id": "481", + "$id": "477", "kind": "property", "name": "requiredUnion", "apiVersions": [ @@ -4599,23 +4565,23 @@ "serializedName": "requiredUnion", "doc": "required Union", "type": { - "$id": "482", + "$id": "478", "kind": "union", "name": "ThingRequiredUnion", "variantTypes": [ { - "$id": "483", + "$id": "479", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "484", + "$id": "480", "kind": "array", "name": "Array", "valueType": { - "$id": "485", + "$id": "481", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4625,7 +4591,7 @@ "decorators": [] }, { - "$id": "486", + "$id": "482", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4651,7 +4617,7 @@ "isExactName": false }, { - "$id": "487", + "$id": "483", "kind": "property", "name": "requiredLiteralString", "apiVersions": [ @@ -4678,7 +4644,7 @@ "isExactName": false }, { - "$id": "488", + "$id": "484", "kind": "property", "name": "requiredNullableString", "apiVersions": [ @@ -4688,10 +4654,10 @@ "serializedName": "requiredNullableString", "doc": "required nullable string", "type": { - "$id": "489", + "$id": "485", "kind": "nullable", "type": { - "$id": "490", + "$id": "486", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4714,7 +4680,7 @@ "isExactName": false }, { - "$id": "491", + "$id": "487", "kind": "property", "name": "optionalNullableString", "apiVersions": [ @@ -4724,10 +4690,10 @@ "serializedName": "optionalNullableString", "doc": "required optional string", "type": { - "$id": "492", + "$id": "488", "kind": "nullable", "type": { - "$id": "493", + "$id": "489", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4750,7 +4716,7 @@ "isExactName": false }, { - "$id": "494", + "$id": "490", "kind": "property", "name": "requiredLiteralInt", "apiVersions": [ @@ -4777,7 +4743,7 @@ "isExactName": false }, { - "$id": "495", + "$id": "491", "kind": "property", "name": "requiredLiteralFloat", "apiVersions": [ @@ -4804,7 +4770,7 @@ "isExactName": false }, { - "$id": "496", + "$id": "492", "kind": "property", "name": "requiredLiteralBool", "apiVersions": [ @@ -4831,7 +4797,7 @@ "isExactName": false }, { - "$id": "497", + "$id": "493", "kind": "property", "name": "optionalLiteralString", "apiVersions": [ @@ -4858,7 +4824,7 @@ "isExactName": false }, { - "$id": "498", + "$id": "494", "kind": "property", "name": "requiredNullableLiteralString", "apiVersions": [ @@ -4868,7 +4834,7 @@ "serializedName": "requiredNullableLiteralString", "doc": "required nullable literal string", "type": { - "$id": "499", + "$id": "495", "kind": "nullable", "type": { "$ref": "5" @@ -4890,7 +4856,7 @@ "isExactName": false }, { - "$id": "500", + "$id": "496", "kind": "property", "name": "optionalLiteralInt", "apiVersions": [ @@ -4917,7 +4883,7 @@ "isExactName": false }, { - "$id": "501", + "$id": "497", "kind": "property", "name": "optionalLiteralFloat", "apiVersions": [ @@ -4944,7 +4910,7 @@ "isExactName": false }, { - "$id": "502", + "$id": "498", "kind": "property", "name": "optionalLiteralBool", "apiVersions": [ @@ -4971,7 +4937,7 @@ "isExactName": false }, { - "$id": "503", + "$id": "499", "kind": "property", "name": "requiredBadDescription", "apiVersions": [ @@ -4981,7 +4947,7 @@ "serializedName": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "504", + "$id": "500", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5002,7 +4968,7 @@ "isExactName": false }, { - "$id": "505", + "$id": "501", "kind": "property", "name": "optionalNullableList", "apiVersions": [ @@ -5012,14 +4978,14 @@ "serializedName": "optionalNullableList", "doc": "optional nullable collection", "type": { - "$id": "506", + "$id": "502", "kind": "nullable", "type": { - "$id": "507", + "$id": "503", "kind": "array", "name": "Array1", "valueType": { - "$id": "508", + "$id": "504", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -5045,7 +5011,7 @@ "isExactName": false }, { - "$id": "509", + "$id": "505", "kind": "property", "name": "requiredNullableList", "apiVersions": [ @@ -5055,10 +5021,10 @@ "serializedName": "requiredNullableList", "doc": "required nullable collection", "type": { - "$id": "510", + "$id": "506", "kind": "nullable", "type": { - "$ref": "507" + "$ref": "503" }, "namespace": "SampleTypeSpec" }, @@ -5077,7 +5043,7 @@ "isExactName": false }, { - "$id": "511", + "$id": "507", "kind": "property", "name": "propertyWithSpecialDocs", "apiVersions": [ @@ -5087,7 +5053,7 @@ "serializedName": "propertyWithSpecialDocs", "doc": "This tests:\n- Simple bullet point. This bullet point is going to be very long to test how text wrapping is handled in bullet points within documentation comments. It should properly indent the wrapped lines.\n- Another bullet point with **bold text**. This bullet point is also intentionally long to see how the formatting is preserved when the text wraps onto multiple lines in the generated documentation.\n- Third bullet point with *italic text*. Similar to the previous points, this one is extended to ensure that the wrapping and formatting are correctly applied in the output.\n- Complex bullet point with **bold** and *italic* combined. This bullet point combines both bold and italic formatting and is long enough to test the wrapping behavior in such cases.\n- **Bold bullet point**: A bullet point that is entirely bolded. This point is also made lengthy to observe how the bold formatting is maintained across wrapped lines.\n- *Italic bullet point*: A bullet point that is entirely italicized. This final point is extended to verify that italic formatting is correctly applied even when the text spans multiple lines.", "type": { - "$id": "512", + "$id": "508", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5110,7 +5076,7 @@ ] }, { - "$id": "513", + "$id": "509", "kind": "model", "name": "RoundTripModel", "apiVersions": [ @@ -5130,7 +5096,7 @@ "isExactName": false, "properties": [ { - "$id": "514", + "$id": "510", "kind": "property", "name": "requiredString", "apiVersions": [ @@ -5140,7 +5106,7 @@ "serializedName": "requiredString", "doc": "Required string, illustrating a reference type property.", "type": { - "$id": "515", + "$id": "511", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5161,7 +5127,7 @@ "isExactName": false }, { - "$id": "516", + "$id": "512", "kind": "property", "name": "requiredInt", "apiVersions": [ @@ -5171,7 +5137,7 @@ "serializedName": "requiredInt", "doc": "Required int, illustrating a value type property.", "type": { - "$id": "517", + "$id": "513", "kind": "int32", "name": "int32", "encode": "string", @@ -5193,7 +5159,7 @@ "isExactName": false }, { - "$id": "518", + "$id": "514", "kind": "property", "name": "requiredCollection", "apiVersions": [ @@ -5203,7 +5169,7 @@ "serializedName": "requiredCollection", "doc": "Required collection of enums", "type": { - "$id": "519", + "$id": "515", "kind": "array", "name": "ArrayStringFixedEnum", "valueType": { @@ -5227,7 +5193,7 @@ "isExactName": false }, { - "$id": "520", + "$id": "516", "kind": "property", "name": "requiredDictionary", "apiVersions": [ @@ -5237,10 +5203,10 @@ "serializedName": "requiredDictionary", "doc": "Required dictionary of enums", "type": { - "$id": "521", + "$id": "517", "kind": "dict", "keyType": { - "$id": "522", + "$id": "518", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5266,7 +5232,7 @@ "isExactName": false }, { - "$id": "523", + "$id": "519", "kind": "property", "name": "requiredModel", "apiVersions": [ @@ -5276,7 +5242,7 @@ "serializedName": "requiredModel", "doc": "Required model", "type": { - "$ref": "478" + "$ref": "474" }, "optional": false, "readOnly": false, @@ -5293,7 +5259,7 @@ "isExactName": false }, { - "$id": "524", + "$id": "520", "kind": "property", "name": "intExtensibleEnum", "apiVersions": [ @@ -5320,7 +5286,7 @@ "isExactName": false }, { - "$id": "525", + "$id": "521", "kind": "property", "name": "intExtensibleEnumCollection", "apiVersions": [ @@ -5330,7 +5296,7 @@ "serializedName": "intExtensibleEnumCollection", "doc": "this is a collection of int based extensible enum", "type": { - "$id": "526", + "$id": "522", "kind": "array", "name": "ArrayIntExtensibleEnum", "valueType": { @@ -5354,7 +5320,7 @@ "isExactName": false }, { - "$id": "527", + "$id": "523", "kind": "property", "name": "floatExtensibleEnum", "apiVersions": [ @@ -5381,7 +5347,7 @@ "isExactName": false }, { - "$id": "528", + "$id": "524", "kind": "property", "name": "floatExtensibleEnumWithIntValue", "apiVersions": [ @@ -5408,7 +5374,7 @@ "isExactName": false }, { - "$id": "529", + "$id": "525", "kind": "property", "name": "floatExtensibleEnumCollection", "apiVersions": [ @@ -5418,7 +5384,7 @@ "serializedName": "floatExtensibleEnumCollection", "doc": "this is a collection of float based extensible enum", "type": { - "$id": "530", + "$id": "526", "kind": "array", "name": "ArrayFloatExtensibleEnum", "valueType": { @@ -5442,7 +5408,7 @@ "isExactName": false }, { - "$id": "531", + "$id": "527", "kind": "property", "name": "floatFixedEnum", "apiVersions": [ @@ -5469,7 +5435,7 @@ "isExactName": false }, { - "$id": "532", + "$id": "528", "kind": "property", "name": "floatFixedEnumWithIntValue", "apiVersions": [ @@ -5496,7 +5462,7 @@ "isExactName": false }, { - "$id": "533", + "$id": "529", "kind": "property", "name": "floatFixedEnumCollection", "apiVersions": [ @@ -5506,7 +5472,7 @@ "serializedName": "floatFixedEnumCollection", "doc": "this is a collection of float based fixed enum", "type": { - "$id": "534", + "$id": "530", "kind": "array", "name": "ArrayFloatFixedEnum", "valueType": { @@ -5530,7 +5496,7 @@ "isExactName": false }, { - "$id": "535", + "$id": "531", "kind": "property", "name": "intFixedEnum", "apiVersions": [ @@ -5557,7 +5523,7 @@ "isExactName": false }, { - "$id": "536", + "$id": "532", "kind": "property", "name": "intFixedEnumCollection", "apiVersions": [ @@ -5567,7 +5533,7 @@ "serializedName": "intFixedEnumCollection", "doc": "this is a collection of int based fixed enum", "type": { - "$id": "537", + "$id": "533", "kind": "array", "name": "ArrayIntFixedEnum", "valueType": { @@ -5591,7 +5557,7 @@ "isExactName": false }, { - "$id": "538", + "$id": "534", "kind": "property", "name": "stringFixedEnum", "apiVersions": [ @@ -5618,7 +5584,7 @@ "isExactName": false }, { - "$id": "539", + "$id": "535", "kind": "property", "name": "requiredUnknown", "apiVersions": [ @@ -5628,7 +5594,7 @@ "serializedName": "requiredUnknown", "doc": "required unknown", "type": { - "$id": "540", + "$id": "536", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -5649,7 +5615,7 @@ "isExactName": false }, { - "$id": "541", + "$id": "537", "kind": "property", "name": "optionalUnknown", "apiVersions": [ @@ -5659,7 +5625,7 @@ "serializedName": "optionalUnknown", "doc": "optional unknown", "type": { - "$id": "542", + "$id": "538", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -5680,7 +5646,7 @@ "isExactName": false }, { - "$id": "543", + "$id": "539", "kind": "property", "name": "requiredRecordUnknown", "apiVersions": [ @@ -5690,17 +5656,17 @@ "serializedName": "requiredRecordUnknown", "doc": "required record of unknown", "type": { - "$id": "544", + "$id": "540", "kind": "dict", "keyType": { - "$id": "545", + "$id": "541", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "546", + "$id": "542", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -5723,7 +5689,7 @@ "isExactName": false }, { - "$id": "547", + "$id": "543", "kind": "property", "name": "optionalRecordUnknown", "apiVersions": [ @@ -5733,7 +5699,7 @@ "serializedName": "optionalRecordUnknown", "doc": "optional record of unknown", "type": { - "$ref": "544" + "$ref": "540" }, "optional": true, "readOnly": false, @@ -5750,7 +5716,7 @@ "isExactName": false }, { - "$id": "548", + "$id": "544", "kind": "property", "name": "readOnlyRequiredRecordUnknown", "apiVersions": [ @@ -5760,7 +5726,7 @@ "serializedName": "readOnlyRequiredRecordUnknown", "doc": "required readonly record of unknown", "type": { - "$ref": "544" + "$ref": "540" }, "optional": false, "readOnly": true, @@ -5777,7 +5743,7 @@ "isExactName": false }, { - "$id": "549", + "$id": "545", "kind": "property", "name": "readOnlyOptionalRecordUnknown", "apiVersions": [ @@ -5787,7 +5753,7 @@ "serializedName": "readOnlyOptionalRecordUnknown", "doc": "optional readonly record of unknown", "type": { - "$ref": "544" + "$ref": "540" }, "optional": true, "readOnly": true, @@ -5804,7 +5770,7 @@ "isExactName": false }, { - "$id": "550", + "$id": "546", "kind": "property", "name": "modelWithRequiredNullable", "apiVersions": [ @@ -5814,7 +5780,7 @@ "serializedName": "modelWithRequiredNullable", "doc": "this is a model with required nullable properties", "type": { - "$id": "551", + "$id": "547", "kind": "model", "name": "ModelWithRequiredNullableProperties", "apiVersions": [ @@ -5834,7 +5800,7 @@ "isExactName": false, "properties": [ { - "$id": "552", + "$id": "548", "kind": "property", "name": "requiredNullablePrimitive", "apiVersions": [ @@ -5844,10 +5810,10 @@ "serializedName": "requiredNullablePrimitive", "doc": "required nullable primitive type", "type": { - "$id": "553", + "$id": "549", "kind": "nullable", "type": { - "$id": "554", + "$id": "550", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -5870,7 +5836,7 @@ "isExactName": false }, { - "$id": "555", + "$id": "551", "kind": "property", "name": "requiredExtensibleEnum", "apiVersions": [ @@ -5880,7 +5846,7 @@ "serializedName": "requiredExtensibleEnum", "doc": "required nullable extensible enum type", "type": { - "$id": "556", + "$id": "552", "kind": "nullable", "type": { "$ref": "27" @@ -5902,7 +5868,7 @@ "isExactName": false }, { - "$id": "557", + "$id": "553", "kind": "property", "name": "requiredFixedEnum", "apiVersions": [ @@ -5912,7 +5878,7 @@ "serializedName": "requiredFixedEnum", "doc": "required nullable fixed enum type", "type": { - "$id": "558", + "$id": "554", "kind": "nullable", "type": { "$ref": "17" @@ -5934,7 +5900,7 @@ "isExactName": false }, { - "$id": "559", + "$id": "555", "kind": "property", "name": "fixedUnion", "apiVersions": [ @@ -5960,7 +5926,7 @@ "isExactName": false }, { - "$id": "560", + "$id": "556", "kind": "property", "name": "numericEnum", "apiVersions": [ @@ -6002,7 +5968,7 @@ "isExactName": false }, { - "$id": "561", + "$id": "557", "kind": "property", "name": "requiredBytes", "apiVersions": [ @@ -6012,7 +5978,7 @@ "serializedName": "requiredBytes", "doc": "Required bytes", "type": { - "$id": "562", + "$id": "558", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -6036,10 +6002,10 @@ ] }, { - "$ref": "551" + "$ref": "547" }, { - "$id": "563", + "$id": "559", "kind": "model", "name": "Wrapper", "apiVersions": [ @@ -6054,7 +6020,7 @@ "isExactName": false, "properties": [ { - "$id": "564", + "$id": "560", "kind": "property", "name": "p1", "apiVersions": [ @@ -6063,7 +6029,7 @@ ], "doc": "header parameter", "type": { - "$id": "565", + "$id": "561", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6080,7 +6046,7 @@ "isExactName": false }, { - "$id": "566", + "$id": "562", "kind": "property", "name": "action", "apiVersions": [ @@ -6089,7 +6055,7 @@ ], "doc": "body parameter", "type": { - "$ref": "513" + "$ref": "509" }, "optional": false, "readOnly": false, @@ -6102,7 +6068,7 @@ "isExactName": false }, { - "$id": "567", + "$id": "563", "kind": "property", "name": "p2", "apiVersions": [ @@ -6111,7 +6077,7 @@ ], "doc": "path parameter", "type": { - "$id": "568", + "$id": "564", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6130,7 +6096,7 @@ ] }, { - "$id": "569", + "$id": "565", "kind": "model", "name": "Friend", "apiVersions": [ @@ -6150,7 +6116,7 @@ "isExactName": false, "properties": [ { - "$id": "570", + "$id": "566", "kind": "property", "name": "name", "apiVersions": [ @@ -6160,7 +6126,7 @@ "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "571", + "$id": "567", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6183,7 +6149,7 @@ ] }, { - "$id": "572", + "$id": "568", "kind": "model", "name": "RenamedModel", "apiVersions": [ @@ -6203,7 +6169,7 @@ "isExactName": false, "properties": [ { - "$id": "573", + "$id": "569", "kind": "property", "name": "otherName", "apiVersions": [ @@ -6213,7 +6179,7 @@ "serializedName": "otherName", "doc": "name of the ModelWithClientName", "type": { - "$id": "574", + "$id": "570", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6236,7 +6202,7 @@ ] }, { - "$id": "575", + "$id": "571", "kind": "model", "name": "ReturnsAnonymousModelResponse", "apiVersions": [ @@ -6256,7 +6222,7 @@ "properties": [] }, { - "$id": "576", + "$id": "572", "kind": "model", "name": "ListWithNextLinkResponse", "apiVersions": [ @@ -6275,7 +6241,7 @@ "isExactName": false, "properties": [ { - "$id": "577", + "$id": "573", "kind": "property", "name": "things", "apiVersions": [ @@ -6284,11 +6250,11 @@ ], "serializedName": "things", "type": { - "$id": "578", + "$id": "574", "kind": "array", "name": "ArrayThing", "valueType": { - "$ref": "478" + "$ref": "474" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -6308,7 +6274,7 @@ "isExactName": false }, { - "$id": "579", + "$id": "575", "kind": "property", "name": "next", "apiVersions": [ @@ -6317,7 +6283,7 @@ ], "serializedName": "next", "type": { - "$id": "580", + "$id": "576", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -6340,7 +6306,7 @@ ] }, { - "$id": "581", + "$id": "577", "kind": "model", "name": "ListWithStringNextLinkResponse", "apiVersions": [ @@ -6359,7 +6325,7 @@ "isExactName": false, "properties": [ { - "$id": "582", + "$id": "578", "kind": "property", "name": "things", "apiVersions": [ @@ -6368,7 +6334,7 @@ ], "serializedName": "things", "type": { - "$ref": "578" + "$ref": "574" }, "optional": false, "readOnly": false, @@ -6385,7 +6351,7 @@ "isExactName": false }, { - "$id": "583", + "$id": "579", "kind": "property", "name": "next", "apiVersions": [ @@ -6394,7 +6360,7 @@ ], "serializedName": "next", "type": { - "$id": "584", + "$id": "580", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6417,7 +6383,7 @@ ] }, { - "$id": "585", + "$id": "581", "kind": "model", "name": "ListWithContinuationTokenResponse", "apiVersions": [ @@ -6436,7 +6402,7 @@ "isExactName": false, "properties": [ { - "$id": "586", + "$id": "582", "kind": "property", "name": "things", "apiVersions": [ @@ -6445,7 +6411,7 @@ ], "serializedName": "things", "type": { - "$ref": "578" + "$ref": "574" }, "optional": false, "readOnly": false, @@ -6462,7 +6428,7 @@ "isExactName": false }, { - "$id": "587", + "$id": "583", "kind": "property", "name": "nextToken", "apiVersions": [ @@ -6471,7 +6437,7 @@ ], "serializedName": "nextToken", "type": { - "$id": "588", + "$id": "584", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6494,7 +6460,7 @@ ] }, { - "$id": "589", + "$id": "585", "kind": "model", "name": "ListWithContinuationTokenHeaderResponseResponse", "apiVersions": [], @@ -6510,7 +6476,7 @@ "isExactName": false, "properties": [ { - "$id": "590", + "$id": "586", "kind": "property", "name": "things", "apiVersions": [ @@ -6519,7 +6485,7 @@ ], "serializedName": "things", "type": { - "$ref": "578" + "$ref": "574" }, "optional": false, "readOnly": false, @@ -6538,7 +6504,7 @@ ] }, { - "$id": "591", + "$id": "587", "kind": "model", "name": "PageThing", "apiVersions": [ @@ -6557,7 +6523,7 @@ "isExactName": false, "properties": [ { - "$id": "592", + "$id": "588", "kind": "property", "name": "items", "apiVersions": [ @@ -6566,7 +6532,7 @@ ], "serializedName": "items", "type": { - "$ref": "578" + "$ref": "574" }, "optional": false, "readOnly": false, @@ -6585,7 +6551,7 @@ ] }, { - "$id": "593", + "$id": "589", "kind": "model", "name": "ModelWithEmbeddedNonBodyParameters", "apiVersions": [ @@ -6604,7 +6570,7 @@ "isExactName": false, "properties": [ { - "$id": "594", + "$id": "590", "kind": "property", "name": "name", "apiVersions": [ @@ -6614,7 +6580,7 @@ "serializedName": "name", "doc": "name of the ModelWithEmbeddedNonBodyParameters", "type": { - "$id": "595", + "$id": "591", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6635,7 +6601,7 @@ "isExactName": false }, { - "$id": "596", + "$id": "592", "kind": "property", "name": "requiredHeader", "apiVersions": [ @@ -6645,7 +6611,7 @@ "serializedName": "requiredHeader", "doc": "required header parameter", "type": { - "$id": "597", + "$id": "593", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6666,7 +6632,7 @@ "isExactName": false }, { - "$id": "598", + "$id": "594", "kind": "property", "name": "optionalHeader", "apiVersions": [ @@ -6676,7 +6642,7 @@ "serializedName": "optionalHeader", "doc": "optional header parameter", "type": { - "$id": "599", + "$id": "595", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6697,7 +6663,7 @@ "isExactName": false }, { - "$id": "600", + "$id": "596", "kind": "property", "name": "requiredQuery", "apiVersions": [ @@ -6707,7 +6673,7 @@ "serializedName": "requiredQuery", "doc": "required query parameter", "type": { - "$id": "601", + "$id": "597", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6728,7 +6694,7 @@ "isExactName": false }, { - "$id": "602", + "$id": "598", "kind": "property", "name": "optionalQuery", "apiVersions": [ @@ -6738,7 +6704,7 @@ "serializedName": "optionalQuery", "doc": "optional query parameter", "type": { - "$id": "603", + "$id": "599", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6761,7 +6727,7 @@ ] }, { - "$id": "604", + "$id": "600", "kind": "model", "name": "DynamicModel", "apiVersions": [ @@ -6788,7 +6754,7 @@ "isExactName": false, "properties": [ { - "$id": "605", + "$id": "601", "kind": "property", "name": "name", "apiVersions": [ @@ -6797,7 +6763,7 @@ ], "serializedName": "name", "type": { - "$id": "606", + "$id": "602", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6818,7 +6784,7 @@ "isExactName": false }, { - "$id": "607", + "$id": "603", "kind": "property", "name": "optionalUnknown", "apiVersions": [ @@ -6827,7 +6793,7 @@ ], "serializedName": "optionalUnknown", "type": { - "$id": "608", + "$id": "604", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -6848,7 +6814,7 @@ "isExactName": false }, { - "$id": "609", + "$id": "605", "kind": "property", "name": "optionalInt", "apiVersions": [ @@ -6857,7 +6823,7 @@ ], "serializedName": "optionalInt", "type": { - "$id": "610", + "$id": "606", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6878,7 +6844,7 @@ "isExactName": false }, { - "$id": "611", + "$id": "607", "kind": "property", "name": "optionalNullableList", "apiVersions": [ @@ -6887,10 +6853,10 @@ ], "serializedName": "optionalNullableList", "type": { - "$id": "612", + "$id": "608", "kind": "nullable", "type": { - "$ref": "507" + "$ref": "503" }, "namespace": "SampleTypeSpec" }, @@ -6909,7 +6875,7 @@ "isExactName": false }, { - "$id": "613", + "$id": "609", "kind": "property", "name": "requiredNullableList", "apiVersions": [ @@ -6918,10 +6884,10 @@ ], "serializedName": "requiredNullableList", "type": { - "$id": "614", + "$id": "610", "kind": "nullable", "type": { - "$ref": "507" + "$ref": "503" }, "namespace": "SampleTypeSpec" }, @@ -6940,7 +6906,7 @@ "isExactName": false }, { - "$id": "615", + "$id": "611", "kind": "property", "name": "optionalNullableDictionary", "apiVersions": [ @@ -6949,20 +6915,20 @@ ], "serializedName": "optionalNullableDictionary", "type": { - "$id": "616", + "$id": "612", "kind": "nullable", "type": { - "$id": "617", + "$id": "613", "kind": "dict", "keyType": { - "$id": "618", + "$id": "614", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "619", + "$id": "615", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6987,7 +6953,7 @@ "isExactName": false }, { - "$id": "620", + "$id": "616", "kind": "property", "name": "requiredNullableDictionary", "apiVersions": [ @@ -6996,10 +6962,10 @@ ], "serializedName": "requiredNullableDictionary", "type": { - "$id": "621", + "$id": "617", "kind": "nullable", "type": { - "$ref": "617" + "$ref": "613" }, "namespace": "SampleTypeSpec" }, @@ -7018,7 +6984,7 @@ "isExactName": false }, { - "$id": "622", + "$id": "618", "kind": "property", "name": "primitiveDictionary", "apiVersions": [ @@ -7027,7 +6993,7 @@ ], "serializedName": "primitiveDictionary", "type": { - "$ref": "617" + "$ref": "613" }, "optional": false, "readOnly": false, @@ -7044,7 +7010,7 @@ "isExactName": false }, { - "$id": "623", + "$id": "619", "kind": "property", "name": "foo", "apiVersions": [ @@ -7053,7 +7019,7 @@ ], "serializedName": "foo", "type": { - "$id": "624", + "$id": "620", "kind": "model", "name": "AnotherDynamicModel", "apiVersions": [ @@ -7080,7 +7046,7 @@ "isExactName": false, "properties": [ { - "$id": "625", + "$id": "621", "kind": "property", "name": "bar", "apiVersions": [ @@ -7089,7 +7055,7 @@ ], "serializedName": "bar", "type": { - "$id": "626", + "$id": "622", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7126,7 +7092,7 @@ "isExactName": false }, { - "$id": "627", + "$id": "623", "kind": "property", "name": "listFoo", "apiVersions": [ @@ -7135,11 +7101,11 @@ ], "serializedName": "listFoo", "type": { - "$id": "628", + "$id": "624", "kind": "array", "name": "ArrayAnotherDynamicModel", "valueType": { - "$ref": "624" + "$ref": "620" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -7159,7 +7125,7 @@ "isExactName": false }, { - "$id": "629", + "$id": "625", "kind": "property", "name": "listOfListFoo", "apiVersions": [ @@ -7168,11 +7134,11 @@ ], "serializedName": "listOfListFoo", "type": { - "$id": "630", + "$id": "626", "kind": "array", "name": "ArrayArray", "valueType": { - "$ref": "628" + "$ref": "624" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -7192,7 +7158,7 @@ "isExactName": false }, { - "$id": "631", + "$id": "627", "kind": "property", "name": "dictionaryFoo", "apiVersions": [ @@ -7201,17 +7167,17 @@ ], "serializedName": "dictionaryFoo", "type": { - "$id": "632", + "$id": "628", "kind": "dict", "keyType": { - "$id": "633", + "$id": "629", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "624" + "$ref": "620" }, "decorators": [] }, @@ -7230,7 +7196,7 @@ "isExactName": false }, { - "$id": "634", + "$id": "630", "kind": "property", "name": "dictionaryOfDictionaryFoo", "apiVersions": [ @@ -7239,17 +7205,17 @@ ], "serializedName": "dictionaryOfDictionaryFoo", "type": { - "$id": "635", + "$id": "631", "kind": "dict", "keyType": { - "$id": "636", + "$id": "632", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "632" + "$ref": "628" }, "decorators": [] }, @@ -7268,7 +7234,7 @@ "isExactName": false }, { - "$id": "637", + "$id": "633", "kind": "property", "name": "dictionaryListFoo", "apiVersions": [ @@ -7277,17 +7243,17 @@ ], "serializedName": "dictionaryListFoo", "type": { - "$id": "638", + "$id": "634", "kind": "dict", "keyType": { - "$id": "639", + "$id": "635", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "628" + "$ref": "624" }, "decorators": [] }, @@ -7306,7 +7272,7 @@ "isExactName": false }, { - "$id": "640", + "$id": "636", "kind": "property", "name": "listOfDictionaryFoo", "apiVersions": [ @@ -7315,11 +7281,11 @@ ], "serializedName": "listOfDictionaryFoo", "type": { - "$id": "641", + "$id": "637", "kind": "array", "name": "ArrayRecord", "valueType": { - "$ref": "632" + "$ref": "628" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -7341,10 +7307,10 @@ ] }, { - "$ref": "624" + "$ref": "620" }, { - "$id": "642", + "$id": "638", "kind": "model", "name": "XmlAdvancedModel", "apiVersions": [ @@ -7373,7 +7339,7 @@ "isExactName": false, "properties": [ { - "$id": "643", + "$id": "639", "kind": "property", "name": "name", "apiVersions": [ @@ -7383,7 +7349,7 @@ "serializedName": "name", "doc": "A simple string property", "type": { - "$id": "644", + "$id": "640", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7406,7 +7372,7 @@ "isExactName": false }, { - "$id": "645", + "$id": "641", "kind": "property", "name": "age", "apiVersions": [ @@ -7416,7 +7382,7 @@ "serializedName": "age", "doc": "An integer property", "type": { - "$id": "646", + "$id": "642", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -7439,7 +7405,7 @@ "isExactName": false }, { - "$id": "647", + "$id": "643", "kind": "property", "name": "enabled", "apiVersions": [ @@ -7449,7 +7415,7 @@ "serializedName": "enabled", "doc": "A boolean property", "type": { - "$id": "648", + "$id": "644", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -7472,7 +7438,7 @@ "isExactName": false }, { - "$id": "649", + "$id": "645", "kind": "property", "name": "score", "apiVersions": [ @@ -7482,7 +7448,7 @@ "serializedName": "score", "doc": "A float property", "type": { - "$id": "650", + "$id": "646", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -7505,7 +7471,7 @@ "isExactName": false }, { - "$id": "651", + "$id": "647", "kind": "property", "name": "optionalString", "apiVersions": [ @@ -7515,7 +7481,7 @@ "serializedName": "optionalString", "doc": "An optional string", "type": { - "$id": "652", + "$id": "648", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7538,7 +7504,7 @@ "isExactName": false }, { - "$id": "653", + "$id": "649", "kind": "property", "name": "optionalInt", "apiVersions": [ @@ -7548,7 +7514,7 @@ "serializedName": "optionalInt", "doc": "An optional integer", "type": { - "$id": "654", + "$id": "650", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -7571,7 +7537,7 @@ "isExactName": false }, { - "$id": "655", + "$id": "651", "kind": "property", "name": "nullableString", "apiVersions": [ @@ -7581,10 +7547,10 @@ "serializedName": "nullableString", "doc": "A nullable string", "type": { - "$id": "656", + "$id": "652", "kind": "nullable", "type": { - "$id": "657", + "$id": "653", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7609,7 +7575,7 @@ "isExactName": false }, { - "$id": "658", + "$id": "654", "kind": "property", "name": "id", "apiVersions": [ @@ -7619,7 +7585,7 @@ "serializedName": "id", "doc": "A string as XML attribute", "type": { - "$id": "659", + "$id": "655", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7647,7 +7613,7 @@ "isExactName": false }, { - "$id": "660", + "$id": "656", "kind": "property", "name": "version", "apiVersions": [ @@ -7657,7 +7623,7 @@ "serializedName": "version", "doc": "An integer as XML attribute", "type": { - "$id": "661", + "$id": "657", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -7685,7 +7651,7 @@ "isExactName": false }, { - "$id": "662", + "$id": "658", "kind": "property", "name": "isActive", "apiVersions": [ @@ -7695,7 +7661,7 @@ "serializedName": "isActive", "doc": "A boolean as XML attribute", "type": { - "$id": "663", + "$id": "659", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -7723,7 +7689,7 @@ "isExactName": false }, { - "$id": "664", + "$id": "660", "kind": "property", "name": "originalName", "apiVersions": [ @@ -7733,7 +7699,7 @@ "serializedName": "RenamedProperty", "doc": "A property with a custom XML element name", "type": { - "$id": "665", + "$id": "661", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7763,7 +7729,7 @@ "isExactName": false }, { - "$id": "666", + "$id": "662", "kind": "property", "name": "xmlIdentifier", "apiVersions": [ @@ -7773,7 +7739,7 @@ "serializedName": "xml-id", "doc": "An attribute with a custom XML name", "type": { - "$id": "667", + "$id": "663", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7807,7 +7773,7 @@ "isExactName": false }, { - "$id": "668", + "$id": "664", "kind": "property", "name": "content", "apiVersions": [ @@ -7817,7 +7783,7 @@ "serializedName": "content", "doc": "Text content in the element (unwrapped string)", "type": { - "$id": "669", + "$id": "665", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7845,7 +7811,7 @@ "isExactName": false }, { - "$id": "670", + "$id": "666", "kind": "property", "name": "unwrappedStrings", "apiVersions": [ @@ -7855,7 +7821,7 @@ "serializedName": "unwrappedStrings", "doc": "An unwrapped array of strings - items appear directly without wrapper", "type": { - "$ref": "484" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -7880,7 +7846,7 @@ "isExactName": false }, { - "$id": "671", + "$id": "667", "kind": "property", "name": "unwrappedCounts", "apiVersions": [ @@ -7890,7 +7856,7 @@ "serializedName": "unwrappedCounts", "doc": "An unwrapped array of integers", "type": { - "$ref": "507" + "$ref": "503" }, "optional": false, "readOnly": false, @@ -7915,7 +7881,7 @@ "isExactName": false }, { - "$id": "672", + "$id": "668", "kind": "property", "name": "unwrappedItems", "apiVersions": [ @@ -7925,11 +7891,11 @@ "serializedName": "unwrappedItems", "doc": "An unwrapped array of models", "type": { - "$id": "673", + "$id": "669", "kind": "array", "name": "ArrayXmlItem", "valueType": { - "$id": "674", + "$id": "670", "kind": "model", "name": "XmlItem", "apiVersions": [ @@ -7958,7 +7924,7 @@ "isExactName": false, "properties": [ { - "$id": "675", + "$id": "671", "kind": "property", "name": "itemName", "apiVersions": [ @@ -7968,7 +7934,7 @@ "serializedName": "itemName", "doc": "The item name", "type": { - "$id": "676", + "$id": "672", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7991,7 +7957,7 @@ "isExactName": false }, { - "$id": "677", + "$id": "673", "kind": "property", "name": "itemValue", "apiVersions": [ @@ -8001,7 +7967,7 @@ "serializedName": "itemValue", "doc": "The item value", "type": { - "$id": "678", + "$id": "674", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -8024,7 +7990,7 @@ "isExactName": false }, { - "$id": "679", + "$id": "675", "kind": "property", "name": "itemId", "apiVersions": [ @@ -8034,7 +8000,7 @@ "serializedName": "itemId", "doc": "Item ID as attribute", "type": { - "$id": "680", + "$id": "676", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8089,7 +8055,7 @@ "isExactName": false }, { - "$id": "681", + "$id": "677", "kind": "property", "name": "wrappedColors", "apiVersions": [ @@ -8099,7 +8065,7 @@ "serializedName": "wrappedColors", "doc": "A wrapped array of strings (default)", "type": { - "$ref": "484" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -8119,7 +8085,7 @@ "isExactName": false }, { - "$id": "682", + "$id": "678", "kind": "property", "name": "items", "apiVersions": [ @@ -8129,7 +8095,7 @@ "serializedName": "ItemCollection", "doc": "A wrapped array with custom wrapper name", "type": { - "$ref": "673" + "$ref": "669" }, "optional": false, "readOnly": false, @@ -8156,7 +8122,7 @@ "isExactName": false }, { - "$id": "683", + "$id": "679", "kind": "property", "name": "nestedModel", "apiVersions": [ @@ -8166,7 +8132,7 @@ "serializedName": "nestedModel", "doc": "A nested model property", "type": { - "$id": "684", + "$id": "680", "kind": "model", "name": "XmlNestedModel", "apiVersions": [ @@ -8188,7 +8154,7 @@ "isExactName": false, "properties": [ { - "$id": "685", + "$id": "681", "kind": "property", "name": "value", "apiVersions": [ @@ -8198,7 +8164,7 @@ "serializedName": "value", "doc": "The value of the nested model", "type": { - "$id": "686", + "$id": "682", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8221,7 +8187,7 @@ "isExactName": false }, { - "$id": "687", + "$id": "683", "kind": "property", "name": "nestedId", "apiVersions": [ @@ -8231,7 +8197,7 @@ "serializedName": "nestedId", "doc": "An attribute on the nested model", "type": { - "$id": "688", + "$id": "684", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -8277,7 +8243,7 @@ "isExactName": false }, { - "$id": "689", + "$id": "685", "kind": "property", "name": "optionalNestedModel", "apiVersions": [ @@ -8287,7 +8253,7 @@ "serializedName": "optionalNestedModel", "doc": "An optional nested model", "type": { - "$ref": "684" + "$ref": "680" }, "optional": true, "readOnly": false, @@ -8306,7 +8272,7 @@ "isExactName": false }, { - "$id": "690", + "$id": "686", "kind": "property", "name": "metadata", "apiVersions": [ @@ -8316,17 +8282,17 @@ "serializedName": "metadata", "doc": "A dictionary property", "type": { - "$id": "691", + "$id": "687", "kind": "dict", "keyType": { - "$id": "692", + "$id": "688", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "693", + "$id": "689", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8351,7 +8317,7 @@ "isExactName": false }, { - "$id": "694", + "$id": "690", "kind": "property", "name": "createdAt", "apiVersions": [ @@ -8361,12 +8327,12 @@ "serializedName": "createdAt", "doc": "A date-time property", "type": { - "$id": "695", + "$id": "691", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "696", + "$id": "692", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8392,7 +8358,7 @@ "isExactName": false }, { - "$id": "697", + "$id": "693", "kind": "property", "name": "duration", "apiVersions": [ @@ -8402,12 +8368,12 @@ "serializedName": "duration", "doc": "A duration property", "type": { - "$id": "698", + "$id": "694", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "699", + "$id": "695", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8433,7 +8399,7 @@ "isExactName": false }, { - "$id": "700", + "$id": "696", "kind": "property", "name": "data", "apiVersions": [ @@ -8443,7 +8409,7 @@ "serializedName": "data", "doc": "A bytes property", "type": { - "$id": "701", + "$id": "697", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -8467,7 +8433,7 @@ "isExactName": false }, { - "$id": "702", + "$id": "698", "kind": "property", "name": "optionalRecordUnknown", "apiVersions": [ @@ -8477,7 +8443,7 @@ "serializedName": "optionalRecordUnknown", "doc": "optional record of unknown", "type": { - "$ref": "544" + "$ref": "540" }, "optional": true, "readOnly": false, @@ -8496,7 +8462,7 @@ "isExactName": false }, { - "$id": "703", + "$id": "699", "kind": "property", "name": "fixedEnum", "apiVersions": [ @@ -8525,7 +8491,7 @@ "isExactName": false }, { - "$id": "704", + "$id": "700", "kind": "property", "name": "extensibleEnum", "apiVersions": [ @@ -8554,7 +8520,7 @@ "isExactName": false }, { - "$id": "705", + "$id": "701", "kind": "property", "name": "optionalFixedEnum", "apiVersions": [ @@ -8583,7 +8549,7 @@ "isExactName": false }, { - "$id": "706", + "$id": "702", "kind": "property", "name": "optionalExtensibleEnum", "apiVersions": [ @@ -8612,7 +8578,7 @@ "isExactName": false }, { - "$id": "707", + "$id": "703", "kind": "property", "name": "label", "apiVersions": [ @@ -8621,7 +8587,7 @@ ], "serializedName": "label", "type": { - "$id": "708", + "$id": "704", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8636,14 +8602,14 @@ "name": "TypeSpec.Xml.@ns", "arguments": { "ns": { - "$id": "709", + "$id": "705", "kind": "enumvalue", "decorators": [], "name": "ns1", "isExactName": false, "value": "https://example.com/ns1", "enumType": { - "$id": "710", + "$id": "706", "kind": "enum", "decorators": [ { @@ -8656,7 +8622,7 @@ "isExactName": false, "namespace": "SampleTypeSpec", "valueType": { - "$id": "711", + "$id": "707", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -8665,32 +8631,32 @@ }, "values": [ { - "$id": "712", + "$id": "708", "kind": "enumvalue", "decorators": [], "name": "ns1", "isExactName": false, "value": "https://example.com/ns1", "enumType": { - "$ref": "710" + "$ref": "706" }, "valueType": { - "$ref": "711" + "$ref": "707" }, "crossLanguageDefinitionId": "SampleTypeSpec.XmlNamespaces.ns1" }, { - "$id": "713", + "$id": "709", "kind": "enumvalue", "decorators": [], "name": "ns2", "isExactName": false, "value": "https://example.com/ns2", "enumType": { - "$ref": "710" + "$ref": "706" }, "valueType": { - "$ref": "711" + "$ref": "707" }, "crossLanguageDefinitionId": "SampleTypeSpec.XmlNamespaces.ns2" } @@ -8708,7 +8674,7 @@ "__accessSet": true }, "valueType": { - "$ref": "711" + "$ref": "707" }, "crossLanguageDefinitionId": "SampleTypeSpec.XmlNamespaces.ns1" } @@ -8735,7 +8701,7 @@ "isExactName": false }, { - "$id": "714", + "$id": "710", "kind": "property", "name": "daysUsed", "apiVersions": [ @@ -8744,7 +8710,7 @@ ], "serializedName": "daysUsed", "type": { - "$id": "715", + "$id": "711", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -8759,17 +8725,17 @@ "name": "TypeSpec.Xml.@ns", "arguments": { "ns": { - "$id": "716", + "$id": "712", "kind": "enumvalue", "decorators": [], "name": "ns2", "isExactName": false, "value": "https://example.com/ns2", "enumType": { - "$ref": "710" + "$ref": "706" }, "valueType": { - "$ref": "711" + "$ref": "707" }, "crossLanguageDefinitionId": "SampleTypeSpec.XmlNamespaces.ns2" } @@ -8792,7 +8758,7 @@ "isExactName": false }, { - "$id": "717", + "$id": "713", "kind": "property", "name": "fooItems", "apiVersions": [ @@ -8801,7 +8767,7 @@ ], "serializedName": "fooItems", "type": { - "$ref": "484" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -8833,7 +8799,7 @@ "isExactName": false }, { - "$id": "718", + "$id": "714", "kind": "property", "name": "anotherModel", "apiVersions": [ @@ -8842,7 +8808,7 @@ ], "serializedName": "anotherModel", "type": { - "$ref": "684" + "$ref": "680" }, "optional": false, "readOnly": false, @@ -8873,7 +8839,7 @@ "isExactName": false }, { - "$id": "719", + "$id": "715", "kind": "property", "name": "modelsWithNamespaces", "apiVersions": [ @@ -8882,11 +8848,11 @@ ], "serializedName": "modelsWithNamespaces", "type": { - "$id": "720", + "$id": "716", "kind": "array", "name": "ArrayXmlModelWithNamespace", "valueType": { - "$id": "721", + "$id": "717", "kind": "model", "name": "XmlModelWithNamespace", "apiVersions": [ @@ -8919,7 +8885,7 @@ "isExactName": false, "properties": [ { - "$id": "722", + "$id": "718", "kind": "property", "name": "foo", "apiVersions": [ @@ -8928,7 +8894,7 @@ ], "serializedName": "foo", "type": { - "$id": "723", + "$id": "719", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8977,7 +8943,7 @@ "isExactName": false }, { - "$id": "724", + "$id": "720", "kind": "property", "name": "unwrappedModelsWithNamespaces", "apiVersions": [ @@ -8986,7 +8952,7 @@ ], "serializedName": "unwrappedModelsWithNamespaces", "type": { - "$ref": "720" + "$ref": "716" }, "optional": false, "readOnly": false, @@ -9011,7 +8977,7 @@ "isExactName": false }, { - "$id": "725", + "$id": "721", "kind": "property", "name": "listOfListFoo", "apiVersions": [ @@ -9020,11 +8986,11 @@ ], "serializedName": "listOfListFoo", "type": { - "$id": "726", + "$id": "722", "kind": "array", "name": "ArrayArray1", "valueType": { - "$ref": "673" + "$ref": "669" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -9047,7 +9013,7 @@ "isExactName": false }, { - "$id": "727", + "$id": "723", "kind": "property", "name": "dictionaryFoo", "apiVersions": [ @@ -9056,17 +9022,17 @@ ], "serializedName": "dictionaryFoo", "type": { - "$id": "728", + "$id": "724", "kind": "dict", "keyType": { - "$id": "729", + "$id": "725", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "674" + "$ref": "670" }, "decorators": [] }, @@ -9087,7 +9053,7 @@ "isExactName": false }, { - "$id": "730", + "$id": "726", "kind": "property", "name": "dictionaryOfDictionaryFoo", "apiVersions": [ @@ -9096,17 +9062,17 @@ ], "serializedName": "dictionaryOfDictionaryFoo", "type": { - "$id": "731", + "$id": "727", "kind": "dict", "keyType": { - "$id": "732", + "$id": "728", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "728" + "$ref": "724" }, "decorators": [] }, @@ -9127,7 +9093,7 @@ "isExactName": false }, { - "$id": "733", + "$id": "729", "kind": "property", "name": "dictionaryListFoo", "apiVersions": [ @@ -9136,17 +9102,17 @@ ], "serializedName": "dictionaryListFoo", "type": { - "$id": "734", + "$id": "730", "kind": "dict", "keyType": { - "$id": "735", + "$id": "731", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "673" + "$ref": "669" }, "decorators": [] }, @@ -9167,7 +9133,7 @@ "isExactName": false }, { - "$id": "736", + "$id": "732", "kind": "property", "name": "listOfDictionaryFoo", "apiVersions": [ @@ -9176,11 +9142,11 @@ ], "serializedName": "listOfDictionaryFoo", "type": { - "$id": "737", + "$id": "733", "kind": "array", "name": "ArrayRecord1", "valueType": { - "$ref": "728" + "$ref": "724" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -9205,16 +9171,16 @@ ] }, { - "$ref": "674" + "$ref": "670" }, { - "$ref": "684" + "$ref": "680" }, { - "$ref": "721" + "$ref": "717" }, { - "$id": "738", + "$id": "734", "kind": "model", "name": "Cat", "apiVersions": [ @@ -9229,7 +9195,7 @@ "isExactName": false, "properties": [ { - "$id": "739", + "$id": "735", "kind": "property", "name": "id", "apiVersions": [ @@ -9238,7 +9204,7 @@ ], "serializedName": "id", "type": { - "$id": "740", + "$id": "736", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9265,7 +9231,7 @@ "isExactName": false }, { - "$id": "741", + "$id": "737", "kind": "property", "name": "boolPart", "apiVersions": [ @@ -9274,7 +9240,7 @@ ], "serializedName": "boolPart", "type": { - "$id": "742", + "$id": "738", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -9301,7 +9267,7 @@ "isExactName": false }, { - "$id": "743", + "$id": "739", "kind": "property", "name": "int32Part", "apiVersions": [ @@ -9310,7 +9276,7 @@ ], "serializedName": "int32Part", "type": { - "$id": "744", + "$id": "740", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -9337,7 +9303,7 @@ "isExactName": false }, { - "$id": "745", + "$id": "741", "kind": "property", "name": "int64Part", "apiVersions": [ @@ -9346,7 +9312,7 @@ ], "serializedName": "int64Part", "type": { - "$id": "746", + "$id": "742", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -9373,7 +9339,7 @@ "isExactName": false }, { - "$id": "747", + "$id": "743", "kind": "property", "name": "float32Part", "apiVersions": [ @@ -9382,7 +9348,7 @@ ], "serializedName": "float32Part", "type": { - "$id": "748", + "$id": "744", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -9409,7 +9375,7 @@ "isExactName": false }, { - "$id": "749", + "$id": "745", "kind": "property", "name": "float64Part", "apiVersions": [ @@ -9418,7 +9384,7 @@ ], "serializedName": "float64Part", "type": { - "$id": "750", + "$id": "746", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -9445,7 +9411,7 @@ "isExactName": false }, { - "$id": "751", + "$id": "747", "kind": "property", "name": "decimalPart", "apiVersions": [ @@ -9454,7 +9420,7 @@ ], "serializedName": "decimalPart", "type": { - "$id": "752", + "$id": "748", "kind": "decimal128", "name": "decimal128", "crossLanguageDefinitionId": "TypeSpec.decimal128", @@ -9481,7 +9447,7 @@ "isExactName": false }, { - "$id": "753", + "$id": "749", "kind": "property", "name": "int8Part", "apiVersions": [ @@ -9490,7 +9456,7 @@ ], "serializedName": "int8Part", "type": { - "$id": "754", + "$id": "750", "kind": "int8", "name": "int8", "crossLanguageDefinitionId": "TypeSpec.int8", @@ -9517,7 +9483,7 @@ "isExactName": false }, { - "$id": "755", + "$id": "751", "kind": "property", "name": "uint8Part", "apiVersions": [ @@ -9526,7 +9492,7 @@ ], "serializedName": "uint8Part", "type": { - "$id": "756", + "$id": "752", "kind": "uint8", "name": "uint8", "crossLanguageDefinitionId": "TypeSpec.uint8", @@ -9553,7 +9519,7 @@ "isExactName": false }, { - "$id": "757", + "$id": "753", "kind": "property", "name": "dictionaryPart", "apiVersions": [ @@ -9562,7 +9528,7 @@ ], "serializedName": "dictionaryPart", "type": { - "$ref": "691" + "$ref": "687" }, "optional": false, "readOnly": false, @@ -9585,7 +9551,7 @@ "isExactName": false }, { - "$id": "758", + "$id": "754", "kind": "property", "name": "dictionaryModelPart", "apiVersions": [ @@ -9594,17 +9560,17 @@ ], "serializedName": "dictionaryModelPart", "type": { - "$id": "759", + "$id": "755", "kind": "dict", "keyType": { - "$id": "760", + "$id": "756", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "478" + "$ref": "474" }, "decorators": [] }, @@ -9629,7 +9595,7 @@ "isExactName": false }, { - "$id": "761", + "$id": "757", "kind": "property", "name": "listPart", "apiVersions": [ @@ -9638,7 +9604,7 @@ ], "serializedName": "listPart", "type": { - "$ref": "484" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -9661,7 +9627,7 @@ "isExactName": false }, { - "$id": "762", + "$id": "758", "kind": "property", "name": "listModelPart", "apiVersions": [ @@ -9670,7 +9636,7 @@ ], "serializedName": "listModelPart", "type": { - "$ref": "578" + "$ref": "574" }, "optional": false, "readOnly": false, @@ -9693,7 +9659,7 @@ "isExactName": false }, { - "$id": "763", + "$id": "759", "kind": "property", "name": "multipleListPart", "apiVersions": [ @@ -9702,11 +9668,11 @@ ], "serializedName": "multipleListPart", "type": { - "$id": "764", + "$id": "760", "kind": "array", "name": "ArrayHttpPart", "valueType": { - "$id": "765", + "$id": "761", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9736,7 +9702,7 @@ "isExactName": false }, { - "$id": "766", + "$id": "762", "kind": "property", "name": "profileImage", "apiVersions": [ @@ -9745,7 +9711,7 @@ ], "serializedName": "profileImage", "type": { - "$id": "767", + "$id": "763", "kind": "model", "name": "File", "apiVersions": [], @@ -9760,14 +9726,14 @@ "isFileType": true, "properties": [ { - "$id": "768", + "$id": "764", "kind": "property", "name": "contentType", "apiVersions": [], "summary": "The allowed media (MIME) types of the file contents.", "doc": "The allowed media (MIME) types of the file contents.\n\nIn file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies,\nthis value is serialized as a field in the response.\n\nNOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but\nit will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the\n_contents_ of the file, and not necessarily the way the file itself is transmitted or serialized.", "type": { - "$id": "769", + "$id": "765", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9784,14 +9750,14 @@ "isExactName": false }, { - "$id": "770", + "$id": "766", "kind": "property", "name": "filename", "apiVersions": [], "summary": "The name of the file, if any.", "doc": "The name of the file, if any.\n\nIn file bodies, this value comes from the `filename` parameter of the `Content-Disposition` header of the response\nor multipart payload. In JSON bodies, this value is serialized as a field in the response.\n\nNOTE: By default, `filename` cannot be sent in request payloads and can only be sent in responses and multipart\npayloads, as the `Content-Disposition` header is not valid in requests. If you want to send the `filename` in a request,\nyou must extend the `File` model and override the `filename` property with a different location defined by HTTP metadata\ndecorators.", "type": { - "$id": "771", + "$id": "767", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9808,14 +9774,14 @@ "isExactName": false }, { - "$id": "772", + "$id": "768", "kind": "property", "name": "contents", "apiVersions": [], "summary": "The contents of the file.", "doc": "The contents of the file.\n\nIn file bodies, this value comes from the body of the request, response, or multipart payload. In JSON bodies,\nthis value is serialized as a field in the response.", "type": { - "$id": "773", + "$id": "769", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -9845,12 +9811,12 @@ "isFilePart": true, "isMulti": false, "filename": { - "$id": "774", + "$id": "770", "doc": "The name of the file, if any.\n\nIn file bodies, this value comes from the `filename` parameter of the `Content-Disposition` header of the response\nor multipart payload. In JSON bodies, this value is serialized as a field in the response.\n\nNOTE: By default, `filename` cannot be sent in request payloads and can only be sent in responses and multipart\npayloads, as the `Content-Disposition` header is not valid in requests. If you want to send the `filename` in a request,\nyou must extend the `File` model and override the `filename` property with a different location defined by HTTP metadata\ndecorators.", "summary": "The name of the file, if any.", "apiVersions": [], "type": { - "$id": "775", + "$id": "771", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -9881,12 +9847,12 @@ "serializationOptions": {} }, "contentType": { - "$id": "776", + "$id": "772", "doc": "The allowed media (MIME) types of the file contents.\n\nIn file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies,\nthis value is serialized as a field in the response.\n\nNOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but\nit will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the\n_contents_ of the file, and not necessarily the way the file itself is transmitted or serialized.", "summary": "The allowed media (MIME) types of the file contents.", "apiVersions": [], "type": { - "$id": "777", + "$id": "773", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -9927,7 +9893,7 @@ "isExactName": false }, { - "$id": "778", + "$id": "774", "kind": "property", "name": "extensibleEnumPart", "apiVersions": [ @@ -9959,7 +9925,7 @@ "isExactName": false }, { - "$id": "779", + "$id": "775", "kind": "property", "name": "fixedEnumPart", "apiVersions": [ @@ -9991,7 +9957,7 @@ "isExactName": false }, { - "$id": "780", + "$id": "776", "kind": "property", "name": "intExtensibleEnumPart", "apiVersions": [ @@ -10023,7 +9989,7 @@ "isExactName": false }, { - "$id": "781", + "$id": "777", "kind": "property", "name": "intFixedEnumPart", "apiVersions": [ @@ -10057,7 +10023,7 @@ ] }, { - "$id": "782", + "$id": "778", "kind": "model", "name": "File", "apiVersions": [], @@ -10072,18 +10038,18 @@ "isFileType": true, "properties": [ { - "$ref": "768" + "$ref": "764" }, { - "$ref": "770" + "$ref": "766" }, { - "$ref": "772" + "$ref": "768" } ] }, { - "$id": "783", + "$id": "779", "kind": "model", "name": "StreamingItem", "apiVersions": [ @@ -10102,7 +10068,7 @@ "isExactName": false, "properties": [ { - "$id": "784", + "$id": "780", "kind": "property", "name": "message", "apiVersions": [ @@ -10111,7 +10077,7 @@ ], "serializedName": "message", "type": { - "$id": "785", + "$id": "781", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10134,7 +10100,7 @@ ] }, { - "$id": "786", + "$id": "782", "kind": "model", "name": "ResponseStreamCreated", "apiVersions": [ @@ -10152,7 +10118,7 @@ }, "isExactName": false, "baseModel": { - "$id": "787", + "$id": "783", "kind": "model", "name": "ResponseStreamEvent", "apiVersions": [ @@ -10171,7 +10137,7 @@ "isExactName": false, "properties": [ { - "$id": "788", + "$id": "784", "kind": "property", "name": "sequenceNumber", "apiVersions": [ @@ -10180,7 +10146,7 @@ ], "serializedName": "sequenceNumber", "type": { - "$id": "789", + "$id": "785", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -10204,7 +10170,7 @@ }, "properties": [ { - "$id": "790", + "$id": "786", "kind": "property", "name": "id", "apiVersions": [ @@ -10213,7 +10179,7 @@ ], "serializedName": "id", "type": { - "$id": "791", + "$id": "787", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10236,10 +10202,10 @@ ] }, { - "$ref": "787" + "$ref": "783" }, { - "$id": "792", + "$id": "788", "kind": "model", "name": "ResponseStreamTextDelta", "apiVersions": [ @@ -10257,11 +10223,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "787" + "$ref": "783" }, "properties": [ { - "$id": "793", + "$id": "789", "kind": "property", "name": "delta", "apiVersions": [ @@ -10270,7 +10236,7 @@ ], "serializedName": "delta", "type": { - "$id": "794", + "$id": "790", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10293,7 +10259,7 @@ ] }, { - "$id": "795", + "$id": "791", "kind": "model", "name": "PreviewDetails", "apiVersions": [ @@ -10312,7 +10278,7 @@ "isExactName": false, "properties": [ { - "$id": "796", + "$id": "792", "kind": "property", "name": "choice", "apiVersions": [ @@ -10346,7 +10312,7 @@ } }, { - "$id": "797", + "$id": "793", "kind": "model", "name": "LifecycleModel", "apiVersions": [ @@ -10365,7 +10331,7 @@ "isExactName": false, "properties": [ { - "$id": "798", + "$id": "794", "kind": "property", "name": "preview", "apiVersions": [ @@ -10374,7 +10340,7 @@ ], "serializedName": "preview", "type": { - "$ref": "795" + "$ref": "791" }, "optional": true, "readOnly": false, @@ -10397,7 +10363,7 @@ } }, { - "$id": "799", + "$id": "795", "kind": "property", "name": "choice", "apiVersions": [ @@ -10425,7 +10391,7 @@ ] }, { - "$id": "800", + "$id": "796", "kind": "model", "name": "PagePreviewDetails", "apiVersions": [ @@ -10444,7 +10410,7 @@ "isExactName": false, "properties": [ { - "$id": "801", + "$id": "797", "kind": "property", "name": "items", "apiVersions": [ @@ -10453,11 +10419,11 @@ ], "serializedName": "items", "type": { - "$id": "802", + "$id": "798", "kind": "array", "name": "ArrayPreviewDetails", "valueType": { - "$ref": "795" + "$ref": "791" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -10479,7 +10445,7 @@ ] }, { - "$id": "803", + "$id": "799", "kind": "model", "name": "Animal", "apiVersions": [ @@ -10498,7 +10464,7 @@ }, "isExactName": false, "discriminatorProperty": { - "$id": "804", + "$id": "800", "kind": "property", "name": "kind", "apiVersions": [ @@ -10508,7 +10474,7 @@ "serializedName": "kind", "doc": "The kind of animal", "type": { - "$id": "805", + "$id": "801", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10530,10 +10496,10 @@ }, "properties": [ { - "$ref": "804" + "$ref": "800" }, { - "$id": "806", + "$id": "802", "kind": "property", "name": "name", "apiVersions": [ @@ -10543,7 +10509,7 @@ "serializedName": "name", "doc": "Name of the animal", "type": { - "$id": "807", + "$id": "803", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10566,7 +10532,7 @@ ], "discriminatedSubtypes": { "pet": { - "$id": "808", + "$id": "804", "kind": "model", "name": "Pet", "apiVersions": [ @@ -10586,7 +10552,7 @@ }, "isExactName": false, "discriminatorProperty": { - "$id": "809", + "$id": "805", "kind": "property", "name": "kind", "apiVersions": [ @@ -10612,14 +10578,14 @@ "isExactName": false }, "baseModel": { - "$ref": "803" + "$ref": "799" }, "properties": [ { - "$ref": "809" + "$ref": "805" }, { - "$id": "810", + "$id": "806", "kind": "property", "name": "trained", "apiVersions": [ @@ -10629,7 +10595,7 @@ "serializedName": "trained", "doc": "Whether the pet is trained", "type": { - "$id": "811", + "$id": "807", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -10652,7 +10618,7 @@ ], "discriminatedSubtypes": { "dog": { - "$id": "812", + "$id": "808", "kind": "model", "name": "Dog", "apiVersions": [ @@ -10672,11 +10638,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "808" + "$ref": "804" }, "properties": [ { - "$id": "813", + "$id": "809", "kind": "property", "name": "kind", "apiVersions": [ @@ -10702,7 +10668,7 @@ "isExactName": false }, { - "$id": "814", + "$id": "810", "kind": "property", "name": "breed", "apiVersions": [ @@ -10712,7 +10678,7 @@ "serializedName": "breed", "doc": "The breed of the dog", "type": { - "$id": "815", + "$id": "811", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10737,18 +10703,18 @@ } }, "dog": { - "$ref": "812" + "$ref": "808" } } }, { - "$ref": "808" + "$ref": "804" }, { - "$ref": "812" + "$ref": "808" }, { - "$id": "816", + "$id": "812", "kind": "model", "name": "Tree", "apiVersions": [ @@ -10773,7 +10739,7 @@ }, "isExactName": false, "baseModel": { - "$id": "817", + "$id": "813", "kind": "model", "name": "Plant", "apiVersions": [ @@ -10797,7 +10763,7 @@ }, "isExactName": false, "discriminatorProperty": { - "$id": "818", + "$id": "814", "kind": "property", "name": "species", "apiVersions": [ @@ -10807,7 +10773,7 @@ "serializedName": "species", "doc": "The species of plant", "type": { - "$id": "819", + "$id": "815", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10834,10 +10800,10 @@ }, "properties": [ { - "$ref": "818" + "$ref": "814" }, { - "$id": "820", + "$id": "816", "kind": "property", "name": "id", "apiVersions": [ @@ -10847,7 +10813,7 @@ "serializedName": "id", "doc": "The unique identifier of the plant", "type": { - "$id": "821", + "$id": "817", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10873,7 +10839,7 @@ "isExactName": false }, { - "$id": "822", + "$id": "818", "kind": "property", "name": "height", "apiVersions": [ @@ -10883,7 +10849,7 @@ "serializedName": "height", "doc": "The height of the plant in centimeters", "type": { - "$id": "823", + "$id": "819", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -10911,13 +10877,13 @@ ], "discriminatedSubtypes": { "tree": { - "$ref": "816" + "$ref": "812" } } }, "properties": [ { - "$id": "824", + "$id": "820", "kind": "property", "name": "species", "apiVersions": [ @@ -10948,7 +10914,7 @@ "isExactName": false }, { - "$id": "825", + "$id": "821", "kind": "property", "name": "age", "apiVersions": [ @@ -10958,7 +10924,7 @@ "serializedName": "age", "doc": "The age of the tree in years", "type": { - "$id": "826", + "$id": "822", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -10984,7 +10950,7 @@ "isExactName": false }, { - "$id": "827", + "$id": "823", "kind": "property", "name": "nullableText", "apiVersions": [ @@ -10993,10 +10959,10 @@ ], "serializedName": "nullableText", "type": { - "$id": "828", + "$id": "824", "kind": "nullable", "type": { - "$id": "829", + "$id": "825", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11024,7 +10990,7 @@ "isExactName": false }, { - "$id": "830", + "$id": "826", "kind": "property", "name": "nullableLabels", "apiVersions": [ @@ -11033,10 +10999,10 @@ ], "serializedName": "nullableLabels", "type": { - "$id": "831", + "$id": "827", "kind": "nullable", "type": { - "$ref": "691" + "$ref": "687" }, "namespace": "SampleTypeSpec" }, @@ -11062,63 +11028,10 @@ ] }, { - "$ref": "817" - }, - { - "$id": "832", - "kind": "model", - "name": "XmlTreeContainer", - "apiVersions": [ - "2024-07-16-preview", - "2024-08-16-preview" - ], - "namespace": "SampleTypeSpec", - "crossLanguageDefinitionId": "SampleTypeSpec.XmlTreeContainer", - "usage": "Output,Xml", - "doc": "XML-only container whose nested tree also supports JSON", - "decorators": [], - "serializationOptions": { - "xml": { - "name": "XmlTreeContainer", - "attribute": false, - "unwrapped": false - } - }, - "isExactName": false, - "properties": [ - { - "$id": "833", - "kind": "property", - "name": "tree", - "apiVersions": [ - "2024-07-16-preview", - "2024-08-16-preview" - ], - "serializedName": "tree", - "doc": "The nested tree", - "type": { - "$ref": "816" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "SampleTypeSpec.XmlTreeContainer.tree", - "serializationOptions": { - "xml": { - "name": "tree", - "attribute": false, - "unwrapped": false - } - }, - "isHttpMetadata": false, - "isExactName": false - } - ] + "$ref": "813" }, { - "$id": "834", + "$id": "828", "kind": "model", "name": "GetWidgetMetricsResponse", "apiVersions": [ @@ -11137,7 +11050,7 @@ "isExactName": false, "properties": [ { - "$id": "835", + "$id": "829", "kind": "property", "name": "numSold", "apiVersions": [ @@ -11146,7 +11059,7 @@ ], "serializedName": "numSold", "type": { - "$id": "836", + "$id": "830", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -11167,7 +11080,7 @@ "isExactName": false }, { - "$id": "837", + "$id": "831", "kind": "property", "name": "averagePrice", "apiVersions": [ @@ -11176,7 +11089,7 @@ ], "serializedName": "averagePrice", "type": { - "$id": "838", + "$id": "832", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -11199,7 +11112,7 @@ ] }, { - "$id": "839", + "$id": "833", "kind": "model", "name": "GetNotebookResponse", "apiVersions": [ @@ -11218,7 +11131,7 @@ "isExactName": false, "properties": [ { - "$id": "840", + "$id": "834", "kind": "property", "name": "name", "apiVersions": [ @@ -11227,7 +11140,7 @@ ], "serializedName": "name", "type": { - "$id": "841", + "$id": "835", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11248,7 +11161,7 @@ "isExactName": false }, { - "$id": "842", + "$id": "836", "kind": "property", "name": "content", "apiVersions": [ @@ -11257,7 +11170,7 @@ ], "serializedName": "content", "type": { - "$id": "843", + "$id": "837", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11280,7 +11193,7 @@ ] }, { - "$id": "844", + "$id": "838", "kind": "model", "name": "UnionCat", "apiVersions": [ @@ -11298,7 +11211,7 @@ }, "isExactName": false, "baseModel": { - "$id": "845", + "$id": "839", "kind": "model", "name": "UnionPet", "apiVersions": [ @@ -11317,7 +11230,7 @@ "isExactName": false, "properties": [ { - "$id": "846", + "$id": "840", "kind": "property", "name": "name", "apiVersions": [ @@ -11326,7 +11239,7 @@ ], "serializedName": "name", "type": { - "$id": "847", + "$id": "841", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11350,7 +11263,7 @@ }, "properties": [ { - "$id": "848", + "$id": "842", "kind": "property", "name": "meow", "apiVersions": [ @@ -11359,7 +11272,7 @@ ], "serializedName": "meow", "type": { - "$id": "849", + "$id": "843", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -11382,10 +11295,10 @@ ] }, { - "$ref": "845" + "$ref": "839" }, { - "$id": "850", + "$id": "844", "kind": "model", "name": "UnionDog", "apiVersions": [ @@ -11403,11 +11316,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "845" + "$ref": "839" }, "properties": [ { - "$id": "851", + "$id": "845", "kind": "property", "name": "bark", "apiVersions": [ @@ -11416,7 +11329,7 @@ ], "serializedName": "bark", "type": { - "$id": "852", + "$id": "846", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -11439,7 +11352,7 @@ ] }, { - "$id": "853", + "$id": "847", "kind": "model", "name": "XmlUnionCat", "apiVersions": [ @@ -11462,7 +11375,7 @@ }, "isExactName": false, "baseModel": { - "$id": "854", + "$id": "848", "kind": "model", "name": "XmlUnionPet", "apiVersions": [ @@ -11486,7 +11399,7 @@ "isExactName": false, "properties": [ { - "$id": "855", + "$id": "849", "kind": "property", "name": "name", "apiVersions": [ @@ -11495,7 +11408,7 @@ ], "serializedName": "name", "type": { - "$id": "856", + "$id": "850", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11524,7 +11437,7 @@ }, "properties": [ { - "$id": "857", + "$id": "851", "kind": "property", "name": "meow", "apiVersions": [ @@ -11533,7 +11446,7 @@ ], "serializedName": "meow", "type": { - "$id": "858", + "$id": "852", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -11561,10 +11474,10 @@ ] }, { - "$ref": "854" + "$ref": "848" }, { - "$id": "859", + "$id": "853", "kind": "model", "name": "UnionPetContainer", "apiVersions": [ @@ -11583,7 +11496,7 @@ "isExactName": false, "properties": [ { - "$id": "860", + "$id": "854", "kind": "property", "name": "pet", "apiVersions": [ @@ -11592,31 +11505,31 @@ ], "serializedName": "pet", "type": { - "$id": "861", + "$id": "855", "kind": "union", "name": "UnionPets", "variantTypes": [ { - "$ref": "844" + "$ref": "838" }, { - "$ref": "850" + "$ref": "844" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "845" + "$ref": "839" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "844" + "$ref": "838" }, "dog": { - "$ref": "850" + "$ref": "844" } } }, @@ -11635,7 +11548,7 @@ "isExactName": false }, { - "$id": "862", + "$id": "856", "kind": "property", "name": "nullablePet", "apiVersions": [ @@ -11644,10 +11557,10 @@ ], "serializedName": "nullablePet", "type": { - "$id": "863", + "$id": "857", "kind": "nullable", "type": { - "$ref": "861" + "$ref": "855" }, "namespace": "SampleTypeSpec" }, @@ -11666,7 +11579,7 @@ "isExactName": false }, { - "$id": "864", + "$id": "858", "kind": "property", "name": "pets", "apiVersions": [ @@ -11675,11 +11588,11 @@ ], "serializedName": "pets", "type": { - "$id": "865", + "$id": "859", "kind": "array", "name": "ArrayUnionPets", "valueType": { - "$ref": "861" + "$ref": "855" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -11699,7 +11612,7 @@ "isExactName": false }, { - "$id": "866", + "$id": "860", "kind": "property", "name": "lookup", "apiVersions": [ @@ -11708,17 +11621,17 @@ ], "serializedName": "lookup", "type": { - "$id": "867", + "$id": "861", "kind": "dict", "keyType": { - "$id": "868", + "$id": "862", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "861" + "$ref": "855" }, "decorators": [] }, @@ -11737,7 +11650,7 @@ "isExactName": false }, { - "$id": "869", + "$id": "863", "kind": "property", "name": "alternatePet", "apiVersions": [ @@ -11746,31 +11659,31 @@ ], "serializedName": "alternatePet", "type": { - "$id": "870", + "$id": "864", "kind": "union", "name": "AlternateUnionPets", "variantTypes": [ { - "$ref": "844" + "$ref": "838" }, { - "$ref": "850" + "$ref": "844" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "845" + "$ref": "839" }, "discriminatorPropertyName": "type", "envelopePropertyName": "data", "discriminatedSubtypes": { "feline": { - "$ref": "844" + "$ref": "838" }, "canine": { - "$ref": "850" + "$ref": "844" } } }, @@ -11791,7 +11704,7 @@ ] }, { - "$id": "871", + "$id": "865", "kind": "model", "name": "RawUnionPetContainer", "apiVersions": [ @@ -11810,7 +11723,7 @@ "isExactName": false, "properties": [ { - "$id": "872", + "$id": "866", "kind": "property", "name": "pet", "apiVersions": [ @@ -11819,7 +11732,7 @@ ], "serializedName": "pet", "type": { - "$ref": "861" + "$ref": "855" }, "optional": false, "readOnly": false, @@ -11836,7 +11749,7 @@ "isExactName": false }, { - "$id": "873", + "$id": "867", "kind": "property", "name": "nullablePet", "apiVersions": [ @@ -11845,10 +11758,10 @@ ], "serializedName": "nullablePet", "type": { - "$id": "874", + "$id": "868", "kind": "nullable", "type": { - "$ref": "861" + "$ref": "855" }, "namespace": "SampleTypeSpec" }, @@ -11867,7 +11780,7 @@ "isExactName": false }, { - "$id": "875", + "$id": "869", "kind": "property", "name": "pets", "apiVersions": [ @@ -11876,7 +11789,7 @@ ], "serializedName": "pets", "type": { - "$ref": "865" + "$ref": "859" }, "optional": true, "readOnly": false, @@ -11893,7 +11806,7 @@ "isExactName": false }, { - "$id": "876", + "$id": "870", "kind": "property", "name": "lookup", "apiVersions": [ @@ -11902,7 +11815,7 @@ ], "serializedName": "lookup", "type": { - "$ref": "867" + "$ref": "861" }, "optional": true, "readOnly": false, @@ -11919,7 +11832,7 @@ "isExactName": false }, { - "$id": "877", + "$id": "871", "kind": "property", "name": "rawPets", "apiVersions": [ @@ -11928,7 +11841,7 @@ ], "serializedName": "rawPets", "type": { - "$ref": "865" + "$ref": "859" }, "optional": true, "readOnly": false, @@ -11945,7 +11858,7 @@ "isExactName": false }, { - "$id": "878", + "$id": "872", "kind": "property", "name": "rawLookup", "apiVersions": [ @@ -11954,7 +11867,7 @@ ], "serializedName": "rawLookup", "type": { - "$ref": "867" + "$ref": "861" }, "optional": true, "readOnly": false, @@ -11973,7 +11886,7 @@ ] }, { - "$id": "879", + "$id": "873", "kind": "model", "name": "NestedMammal", "apiVersions": [ @@ -11991,7 +11904,7 @@ }, "isExactName": false, "baseModel": { - "$id": "880", + "$id": "874", "kind": "model", "name": "CollisionPetsUnion", "apiVersions": [ @@ -12010,7 +11923,7 @@ "isExactName": false, "properties": [ { - "$id": "881", + "$id": "875", "kind": "property", "name": "name", "apiVersions": [ @@ -12019,7 +11932,7 @@ ], "serializedName": "name", "type": { - "$id": "882", + "$id": "876", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12044,10 +11957,10 @@ "properties": [] }, { - "$ref": "880" + "$ref": "874" }, { - "$id": "883", + "$id": "877", "kind": "model", "name": "ExperimentalUnionCat", "apiVersions": [ @@ -12065,11 +11978,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "879" + "$ref": "873" }, "properties": [ { - "$id": "884", + "$id": "878", "kind": "property", "name": "meow", "apiVersions": [ @@ -12078,7 +11991,7 @@ ], "serializedName": "meow", "type": { - "$id": "885", + "$id": "879", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -12105,7 +12018,7 @@ } }, { - "$id": "886", + "$id": "880", "kind": "model", "name": "MappedUnionCat", "apiVersions": [ @@ -12123,7 +12036,7 @@ }, "isExactName": false, "baseModel": { - "$id": "887", + "$id": "881", "kind": "model", "name": "MappedUnionPet", "apiVersions": [ @@ -12144,7 +12057,7 @@ }, "properties": [ { - "$id": "888", + "$id": "882", "kind": "property", "name": "name", "apiVersions": [ @@ -12153,7 +12066,7 @@ ], "serializedName": "name", "type": { - "$id": "889", + "$id": "883", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12176,10 +12089,10 @@ ] }, { - "$ref": "887" + "$ref": "881" }, { - "$id": "890", + "$id": "884", "kind": "model", "name": "ExternalUnionCat", "apiVersions": [ @@ -12197,7 +12110,7 @@ }, "isExactName": false, "baseModel": { - "$id": "891", + "$id": "885", "kind": "model", "name": "ExternalUnionBase", "apiVersions": [ @@ -12221,7 +12134,7 @@ }, "properties": [ { - "$id": "892", + "$id": "886", "kind": "property", "name": "name", "apiVersions": [ @@ -12230,7 +12143,7 @@ ], "serializedName": "name", "type": { - "$id": "893", + "$id": "887", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12253,10 +12166,10 @@ ] }, { - "$ref": "891" + "$ref": "885" }, { - "$id": "894", + "$id": "888", "kind": "model", "name": "ExternalVariantCat", "apiVersions": [ @@ -12277,7 +12190,7 @@ }, "isExactName": false, "baseModel": { - "$id": "895", + "$id": "889", "kind": "model", "name": "ExternalVariantBase", "apiVersions": [ @@ -12298,7 +12211,7 @@ }, "properties": [ { - "$id": "896", + "$id": "890", "kind": "property", "name": "name", "apiVersions": [ @@ -12307,7 +12220,7 @@ ], "serializedName": "name", "type": { - "$id": "897", + "$id": "891", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12330,10 +12243,10 @@ ] }, { - "$ref": "895" + "$ref": "889" }, { - "$id": "898", + "$id": "892", "kind": "model", "name": "DirectUnionPet", "apiVersions": [ @@ -12352,7 +12265,7 @@ "isExactName": false, "properties": [ { - "$id": "899", + "$id": "893", "kind": "property", "name": "name", "apiVersions": [ @@ -12361,7 +12274,7 @@ ], "serializedName": "name", "type": { - "$id": "900", + "$id": "894", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12382,7 +12295,7 @@ "isExactName": false }, { - "$id": "901", + "$id": "895", "kind": "property", "name": "deserializeDirectPetsUnion", "apiVersions": [ @@ -12391,7 +12304,7 @@ ], "serializedName": "deserializeDirectPetsUnion", "type": { - "$id": "902", + "$id": "896", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12412,7 +12325,7 @@ "isExactName": false }, { - "$id": "903", + "$id": "897", "kind": "property", "name": "serializeDirectPetsUnion", "apiVersions": [ @@ -12421,7 +12334,7 @@ ], "serializedName": "serializeDirectPetsUnion", "type": { - "$id": "904", + "$id": "898", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12444,7 +12357,7 @@ ] }, { - "$id": "905", + "$id": "899", "kind": "model", "name": "DirectUnionCat", "apiVersions": [ @@ -12462,11 +12375,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "898" + "$ref": "892" }, "properties": [ { - "$id": "906", + "$id": "900", "kind": "property", "name": "meow", "apiVersions": [ @@ -12475,7 +12388,7 @@ ], "serializedName": "meow", "type": { - "$id": "907", + "$id": "901", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -12498,7 +12411,7 @@ ] }, { - "$id": "908", + "$id": "902", "kind": "model", "name": "DirectUnionPetContainer", "apiVersions": [ @@ -12517,7 +12430,7 @@ "isExactName": false, "properties": [ { - "$id": "909", + "$id": "903", "kind": "property", "name": "pet", "apiVersions": [ @@ -12526,7 +12439,7 @@ ], "serializedName": "pet", "type": { - "$ref": "898" + "$ref": "892" }, "optional": false, "readOnly": false, @@ -12545,7 +12458,7 @@ ] }, { - "$id": "910", + "$id": "904", "kind": "model", "name": "DynamicUnionPetContainer", "apiVersions": [ @@ -12571,7 +12484,7 @@ "isExactName": false, "properties": [ { - "$id": "911", + "$id": "905", "kind": "property", "name": "pets", "apiVersions": [ @@ -12580,14 +12493,14 @@ ], "serializedName": "pets", "type": { - "$id": "912", + "$id": "906", "kind": "array", "name": "Array2", "valueType": { - "$id": "913", + "$id": "907", "kind": "nullable", "type": { - "$ref": "861" + "$ref": "855" }, "namespace": "SampleTypeSpec" }, @@ -12609,7 +12522,7 @@ "isExactName": false }, { - "$id": "914", + "$id": "908", "kind": "property", "name": "lookup", "apiVersions": [ @@ -12618,20 +12531,20 @@ ], "serializedName": "lookup", "type": { - "$id": "915", + "$id": "909", "kind": "dict", "keyType": { - "$id": "916", + "$id": "910", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "917", + "$id": "911", "kind": "nullable", "type": { - "$ref": "861" + "$ref": "855" }, "namespace": "SampleTypeSpec" }, @@ -12652,7 +12565,7 @@ "isExactName": false }, { - "$id": "918", + "$id": "912", "kind": "property", "name": "nested", "apiVersions": [ @@ -12661,18 +12574,18 @@ ], "serializedName": "nested", "type": { - "$id": "919", + "$id": "913", "kind": "array", "name": "ArrayArray2", "valueType": { - "$id": "920", + "$id": "914", "kind": "array", "name": "Array3", "valueType": { - "$id": "921", + "$id": "915", "kind": "nullable", "type": { - "$ref": "861" + "$ref": "855" }, "namespace": "SampleTypeSpec" }, @@ -12697,7 +12610,7 @@ "isExactName": false }, { - "$id": "922", + "$id": "916", "kind": "property", "name": "nestedLookup", "apiVersions": [ @@ -12706,24 +12619,24 @@ ], "serializedName": "nestedLookup", "type": { - "$id": "923", + "$id": "917", "kind": "array", "name": "ArrayRecord2", "valueType": { - "$id": "924", + "$id": "918", "kind": "dict", "keyType": { - "$id": "925", + "$id": "919", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "926", + "$id": "920", "kind": "nullable", "type": { - "$ref": "861" + "$ref": "855" }, "namespace": "SampleTypeSpec" }, @@ -12749,7 +12662,7 @@ ] }, { - "$id": "927", + "$id": "921", "kind": "model", "name": "DescendantUnionCat", "apiVersions": [ @@ -12767,7 +12680,7 @@ }, "isExactName": false, "baseModel": { - "$id": "928", + "$id": "922", "kind": "model", "name": "DescendantUnionPet", "apiVersions": [ @@ -12786,7 +12699,7 @@ "isExactName": false, "properties": [ { - "$id": "929", + "$id": "923", "kind": "property", "name": "name", "apiVersions": [ @@ -12795,7 +12708,7 @@ ], "serializedName": "name", "type": { - "$id": "930", + "$id": "924", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12819,7 +12732,7 @@ }, "properties": [ { - "$id": "931", + "$id": "925", "kind": "property", "name": "deserializeDescendantPetsUnion", "apiVersions": [ @@ -12828,7 +12741,7 @@ ], "serializedName": "deserializeDescendantPetsUnion", "type": { - "$id": "932", + "$id": "926", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12849,7 +12762,7 @@ "isExactName": false }, { - "$id": "933", + "$id": "927", "kind": "property", "name": "serializeDescendantPetsUnion", "apiVersions": [ @@ -12858,7 +12771,7 @@ ], "serializedName": "serializeDescendantPetsUnion", "type": { - "$id": "934", + "$id": "928", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12881,10 +12794,10 @@ ] }, { - "$ref": "928" + "$ref": "922" }, { - "$id": "935", + "$id": "929", "kind": "model", "name": "IntermediateUnionCat", "apiVersions": [ @@ -12902,7 +12815,7 @@ }, "isExactName": false, "baseModel": { - "$id": "936", + "$id": "930", "kind": "model", "name": "IntermediateUnionMammal", "apiVersions": [ @@ -12923,7 +12836,7 @@ }, "isExactName": false, "baseModel": { - "$id": "937", + "$id": "931", "kind": "model", "name": "IntermediateUnionPet", "apiVersions": [ @@ -12946,7 +12859,7 @@ }, "properties": [ { - "$id": "938", + "$id": "932", "kind": "property", "name": "name", "apiVersions": [ @@ -12955,7 +12868,7 @@ ], "serializedName": "name", "type": { - "$id": "939", + "$id": "933", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12978,13 +12891,13 @@ ] }, { - "$ref": "936" + "$ref": "930" }, { - "$ref": "937" + "$ref": "931" }, { - "$id": "940", + "$id": "934", "kind": "model", "name": "SerializeNamedCat", "apiVersions": [ @@ -13002,7 +12915,7 @@ }, "isExactName": false, "baseModel": { - "$id": "941", + "$id": "935", "kind": "model", "name": "SerializePetsUnion", "apiVersions": [ @@ -13021,7 +12934,7 @@ "isExactName": false, "properties": [ { - "$id": "942", + "$id": "936", "kind": "property", "name": "name", "apiVersions": [ @@ -13030,7 +12943,7 @@ ], "serializedName": "name", "type": { - "$id": "943", + "$id": "937", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13055,10 +12968,10 @@ "properties": [] }, { - "$ref": "941" + "$ref": "935" }, { - "$id": "944", + "$id": "938", "kind": "model", "name": "DeserializeNamedCat", "apiVersions": [ @@ -13076,7 +12989,7 @@ }, "isExactName": false, "baseModel": { - "$id": "945", + "$id": "939", "kind": "model", "name": "DeserializePetsUnion", "apiVersions": [ @@ -13095,7 +13008,7 @@ "isExactName": false, "properties": [ { - "$id": "946", + "$id": "940", "kind": "property", "name": "name", "apiVersions": [ @@ -13104,7 +13017,7 @@ ], "serializedName": "name", "type": { - "$id": "947", + "$id": "941", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13129,10 +13042,10 @@ "properties": [] }, { - "$ref": "945" + "$ref": "939" }, { - "$id": "948", + "$id": "942", "kind": "model", "name": "CustomUnionCat", "apiVersions": [ @@ -13150,7 +13063,7 @@ }, "isExactName": false, "baseModel": { - "$id": "949", + "$id": "943", "kind": "model", "name": "CustomUnionPet", "apiVersions": [ @@ -13169,7 +13082,7 @@ "isExactName": false, "properties": [ { - "$id": "950", + "$id": "944", "kind": "property", "name": "name", "apiVersions": [ @@ -13178,7 +13091,7 @@ ], "serializedName": "name", "type": { - "$id": "951", + "$id": "945", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13199,7 +13112,7 @@ "isExactName": false }, { - "$id": "952", + "$id": "946", "kind": "property", "name": "children", "apiVersions": [ @@ -13208,29 +13121,29 @@ ], "serializedName": "children", "type": { - "$id": "953", + "$id": "947", "kind": "array", "name": "ArrayCustomUnionPets", "valueType": { - "$id": "954", + "$id": "948", "kind": "union", "name": "CustomUnionPets", "variantTypes": [ { - "$ref": "948" + "$ref": "942" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "949" + "$ref": "943" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "948" + "$ref": "942" } } }, @@ -13255,7 +13168,7 @@ }, "properties": [ { - "$id": "955", + "$id": "949", "kind": "property", "name": "meow", "apiVersions": [ @@ -13264,7 +13177,7 @@ ], "serializedName": "meow", "type": { - "$id": "956", + "$id": "950", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -13287,10 +13200,10 @@ ] }, { - "$ref": "949" + "$ref": "943" }, { - "$id": "957", + "$id": "951", "kind": "model", "name": "CustomIntermediateCat", "apiVersions": [ @@ -13308,7 +13221,7 @@ }, "isExactName": false, "baseModel": { - "$id": "958", + "$id": "952", "kind": "model", "name": "CustomIntermediateMammal", "apiVersions": [ @@ -13326,7 +13239,7 @@ }, "isExactName": false, "baseModel": { - "$id": "959", + "$id": "953", "kind": "model", "name": "CustomIntermediatePet", "apiVersions": [ @@ -13349,7 +13262,7 @@ }, "properties": [ { - "$id": "960", + "$id": "954", "kind": "property", "name": "meow", "apiVersions": [ @@ -13358,7 +13271,7 @@ ], "serializedName": "meow", "type": { - "$id": "961", + "$id": "955", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -13381,13 +13294,13 @@ ] }, { - "$ref": "958" + "$ref": "952" }, { - "$ref": "959" + "$ref": "953" }, { - "$id": "962", + "$id": "956", "kind": "model", "name": "RebasedUnionA", "apiVersions": [ @@ -13405,7 +13318,7 @@ }, "isExactName": false, "baseModel": { - "$id": "963", + "$id": "957", "kind": "model", "name": "RebasedUnionPet", "apiVersions": [ @@ -13424,7 +13337,7 @@ "isExactName": false, "properties": [ { - "$id": "964", + "$id": "958", "kind": "property", "name": "name", "apiVersions": [ @@ -13433,7 +13346,7 @@ ], "serializedName": "name", "type": { - "$id": "965", + "$id": "959", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13458,10 +13371,10 @@ "properties": [] }, { - "$ref": "963" + "$ref": "957" }, { - "$id": "966", + "$id": "960", "kind": "model", "name": "RebasedUnionB", "apiVersions": [ @@ -13479,12 +13392,12 @@ }, "isExactName": false, "baseModel": { - "$ref": "963" + "$ref": "957" }, "properties": [] }, { - "$id": "967", + "$id": "961", "kind": "model", "name": "RebasedUnionALeaf", "apiVersions": [ @@ -13502,12 +13415,12 @@ }, "isExactName": false, "baseModel": { - "$ref": "962" + "$ref": "956" }, "properties": [] }, { - "$id": "968", + "$id": "962", "kind": "model", "name": "RebasedUnionBLeaf", "apiVersions": [ @@ -13525,12 +13438,12 @@ }, "isExactName": false, "baseModel": { - "$ref": "966" + "$ref": "960" }, "properties": [] }, { - "$id": "969", + "$id": "963", "kind": "model", "name": "PetsUnion", "apiVersions": [ @@ -13548,7 +13461,7 @@ }, "isExactName": false, "baseModel": { - "$id": "970", + "$id": "964", "kind": "model", "name": "DeserializerPet", "apiVersions": [ @@ -13567,7 +13480,7 @@ "isExactName": false, "properties": [ { - "$id": "971", + "$id": "965", "kind": "property", "name": "name", "apiVersions": [ @@ -13576,7 +13489,7 @@ ], "serializedName": "name", "type": { - "$id": "972", + "$id": "966", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13601,10 +13514,10 @@ "properties": [] }, { - "$ref": "970" + "$ref": "964" }, { - "$id": "973", + "$id": "967", "kind": "model", "name": "ConstructorOverride", "apiVersions": [ @@ -13622,7 +13535,7 @@ }, "isExactName": false, "baseModel": { - "$id": "974", + "$id": "968", "kind": "model", "name": "ConstructorBase", "apiVersions": [ @@ -13641,7 +13554,7 @@ "isExactName": false, "properties": [ { - "$id": "975", + "$id": "969", "kind": "property", "name": "value", "apiVersions": [ @@ -13650,7 +13563,7 @@ ], "serializedName": "value", "type": { - "$id": "976", + "$id": "970", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13671,7 +13584,7 @@ "isExactName": false }, { - "$id": "977", + "$id": "971", "kind": "property", "name": "mode", "apiVersions": [ @@ -13697,7 +13610,7 @@ "isExactName": false }, { - "$id": "978", + "$id": "972", "kind": "property", "name": "items", "apiVersions": [ @@ -13706,7 +13619,7 @@ ], "serializedName": "items", "type": { - "$ref": "484" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -13726,7 +13639,7 @@ }, "properties": [ { - "$id": "979", + "$id": "973", "kind": "property", "name": "value", "apiVersions": [ @@ -13735,7 +13648,7 @@ ], "serializedName": "value", "type": { - "$id": "980", + "$id": "974", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13759,10 +13672,10 @@ ] }, { - "$ref": "974" + "$ref": "968" }, { - "$id": "981", + "$id": "975", "kind": "model", "name": "ConstructorReadOnlyOverride", "apiVersions": [ @@ -13780,7 +13693,7 @@ }, "isExactName": false, "baseModel": { - "$id": "982", + "$id": "976", "kind": "model", "name": "ConstructorReadOnlyBase", "apiVersions": [ @@ -13799,7 +13712,7 @@ "isExactName": false, "properties": [ { - "$id": "983", + "$id": "977", "kind": "property", "name": "value", "apiVersions": [ @@ -13808,7 +13721,7 @@ ], "serializedName": "value", "type": { - "$id": "984", + "$id": "978", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13832,7 +13745,7 @@ }, "properties": [ { - "$id": "985", + "$id": "979", "kind": "property", "name": "value", "apiVersions": [ @@ -13841,7 +13754,7 @@ ], "serializedName": "value", "type": { - "$id": "986", + "$id": "980", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13865,10 +13778,10 @@ ] }, { - "$ref": "982" + "$ref": "976" }, { - "$id": "987", + "$id": "981", "kind": "model", "name": "ConstructorReadOnlyLeaf", "apiVersions": [ @@ -13886,11 +13799,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "981" + "$ref": "975" }, "properties": [ { - "$id": "988", + "$id": "982", "kind": "property", "name": "value", "apiVersions": [ @@ -13899,7 +13812,7 @@ ], "serializedName": "value", "type": { - "$id": "989", + "$id": "983", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13923,7 +13836,7 @@ ] }, { - "$id": "990", + "$id": "984", "kind": "model", "name": "XmlConstructorOverride", "apiVersions": [ @@ -13943,7 +13856,7 @@ }, "isExactName": false, "baseModel": { - "$id": "991", + "$id": "985", "kind": "model", "name": "XmlConstructorMiddle", "apiVersions": [ @@ -13963,7 +13876,7 @@ }, "isExactName": false, "baseModel": { - "$id": "992", + "$id": "986", "kind": "model", "name": "XmlConstructorBase", "apiVersions": [ @@ -13984,7 +13897,7 @@ "isExactName": false, "properties": [ { - "$id": "993", + "$id": "987", "kind": "property", "name": "value", "apiVersions": [ @@ -13993,7 +13906,7 @@ ], "serializedName": "value", "type": { - "$id": "994", + "$id": "988", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14016,7 +13929,7 @@ "isExactName": false }, { - "$id": "995", + "$id": "989", "kind": "property", "name": "title", "apiVersions": [ @@ -14025,7 +13938,7 @@ ], "serializedName": "title", "type": { - "$id": "996", + "$id": "990", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14051,7 +13964,7 @@ }, "properties": [ { - "$id": "997", + "$id": "991", "kind": "property", "name": "note", "apiVersions": [ @@ -14060,7 +13973,7 @@ ], "serializedName": "note", "type": { - "$id": "998", + "$id": "992", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14086,7 +13999,7 @@ }, "properties": [ { - "$id": "999", + "$id": "993", "kind": "property", "name": "value", "apiVersions": [ @@ -14095,7 +14008,7 @@ ], "serializedName": "value", "type": { - "$id": "1000", + "$id": "994", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14121,13 +14034,13 @@ ] }, { - "$ref": "991" + "$ref": "985" }, { - "$ref": "992" + "$ref": "986" }, { - "$id": "1001", + "$id": "995", "kind": "model", "name": "ConstructorInheritedLeaf", "apiVersions": [ @@ -14145,12 +14058,12 @@ }, "isExactName": false, "baseModel": { - "$ref": "973" + "$ref": "967" }, "properties": [] }, { - "$id": "1002", + "$id": "996", "kind": "model", "name": "RenamedConstructorOverride", "apiVersions": [ @@ -14168,7 +14081,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1003", + "$id": "997", "kind": "model", "name": "RenamedConstructorBase", "apiVersions": [ @@ -14187,7 +14100,7 @@ "isExactName": false, "properties": [ { - "$id": "1004", + "$id": "998", "kind": "property", "name": "value", "apiVersions": [ @@ -14196,7 +14109,7 @@ ], "serializedName": "value", "type": { - "$id": "1005", + "$id": "999", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14217,7 +14130,7 @@ "isExactName": false }, { - "$id": "1006", + "$id": "1000", "kind": "property", "name": "title", "apiVersions": [ @@ -14226,7 +14139,7 @@ ], "serializedName": "title", "type": { - "$id": "1007", + "$id": "1001", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14250,7 +14163,7 @@ }, "properties": [ { - "$id": "1008", + "$id": "1002", "kind": "property", "name": "renamedValue", "originalName": "value", @@ -14260,7 +14173,7 @@ ], "serializedName": "value", "type": { - "$id": "1009", + "$id": "1003", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14284,10 +14197,10 @@ ] }, { - "$ref": "1003" + "$ref": "997" }, { - "$id": "1010", + "$id": "1004", "kind": "model", "name": "RenamedConstructorLeaf", "apiVersions": [ @@ -14305,12 +14218,12 @@ }, "isExactName": false, "baseModel": { - "$ref": "1002" + "$ref": "996" }, "properties": [] }, { - "$id": "1011", + "$id": "1005", "kind": "model", "name": "ConstructorWritableLeaf", "apiVersions": [ @@ -14328,7 +14241,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1012", + "$id": "1006", "kind": "model", "name": "ConstructorReadOnlyMiddle", "apiVersions": [ @@ -14346,7 +14259,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1013", + "$id": "1007", "kind": "model", "name": "ConstructorWritableBase", "apiVersions": [ @@ -14365,7 +14278,7 @@ "isExactName": false, "properties": [ { - "$id": "1014", + "$id": "1008", "kind": "property", "name": "value", "apiVersions": [ @@ -14374,7 +14287,7 @@ ], "serializedName": "value", "type": { - "$id": "1015", + "$id": "1009", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14398,7 +14311,7 @@ }, "properties": [ { - "$id": "1016", + "$id": "1010", "kind": "property", "name": "value", "apiVersions": [ @@ -14407,7 +14320,7 @@ ], "serializedName": "value", "type": { - "$id": "1017", + "$id": "1011", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14431,7 +14344,7 @@ }, "properties": [ { - "$id": "1018", + "$id": "1012", "kind": "property", "name": "value", "apiVersions": [ @@ -14440,7 +14353,7 @@ ], "serializedName": "value", "type": { - "$id": "1019", + "$id": "1013", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14464,13 +14377,13 @@ ] }, { - "$ref": "1012" + "$ref": "1006" }, { - "$ref": "1013" + "$ref": "1007" }, { - "$id": "1020", + "$id": "1014", "kind": "model", "name": "RenamedConstructorReturnedName", "apiVersions": [ @@ -14488,11 +14401,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "1002" + "$ref": "996" }, "properties": [ { - "$id": "1021", + "$id": "1015", "kind": "property", "name": "value", "apiVersions": [ @@ -14501,7 +14414,7 @@ ], "serializedName": "value", "type": { - "$id": "1022", + "$id": "1016", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14525,7 +14438,7 @@ ] }, { - "$id": "1023", + "$id": "1017", "kind": "model", "name": "RequiredRenamedConstructorOverride", "apiVersions": [ @@ -14543,11 +14456,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "1002" + "$ref": "996" }, "properties": [ { - "$id": "1024", + "$id": "1018", "kind": "property", "name": "requiredValue", "originalName": "value", @@ -14557,7 +14470,7 @@ ], "serializedName": "value", "type": { - "$id": "1025", + "$id": "1019", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14580,7 +14493,7 @@ ] }, { - "$id": "1026", + "$id": "1020", "kind": "model", "name": "ConstructorReadOnlyCollectionOverride", "apiVersions": [ @@ -14598,7 +14511,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1027", + "$id": "1021", "kind": "model", "name": "ConstructorReadOnlyCollectionBase", "apiVersions": [ @@ -14617,7 +14530,7 @@ "isExactName": false, "properties": [ { - "$id": "1028", + "$id": "1022", "kind": "property", "name": "items", "apiVersions": [ @@ -14626,7 +14539,7 @@ ], "serializedName": "items", "type": { - "$ref": "484" + "$ref": "480" }, "optional": false, "readOnly": true, @@ -14643,7 +14556,7 @@ "isExactName": false }, { - "$id": "1029", + "$id": "1023", "kind": "property", "name": "values", "apiVersions": [ @@ -14652,7 +14565,7 @@ ], "serializedName": "values", "type": { - "$ref": "691" + "$ref": "687" }, "optional": false, "readOnly": true, @@ -14672,7 +14585,7 @@ }, "properties": [ { - "$id": "1030", + "$id": "1024", "kind": "property", "name": "renamedItems", "originalName": "items", @@ -14682,7 +14595,7 @@ ], "serializedName": "items", "type": { - "$ref": "484" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -14700,7 +14613,7 @@ "requiredInConstructor": false }, { - "$id": "1031", + "$id": "1025", "kind": "property", "name": "renamedValues", "originalName": "values", @@ -14710,7 +14623,7 @@ ], "serializedName": "values", "type": { - "$ref": "691" + "$ref": "687" }, "optional": false, "readOnly": false, @@ -14730,10 +14643,10 @@ ] }, { - "$ref": "1027" + "$ref": "1021" }, { - "$id": "1032", + "$id": "1026", "kind": "model", "name": "ConstructorRequiredCollectionOverride", "apiVersions": [ @@ -14751,11 +14664,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "1026" + "$ref": "1020" }, "properties": [ { - "$id": "1033", + "$id": "1027", "kind": "property", "name": "requiredItems", "originalName": "items", @@ -14765,7 +14678,7 @@ ], "serializedName": "items", "type": { - "$ref": "484" + "$ref": "480" }, "optional": false, "readOnly": false, @@ -14782,7 +14695,7 @@ "isExactName": false }, { - "$id": "1034", + "$id": "1028", "kind": "property", "name": "requiredValues", "originalName": "values", @@ -14792,7 +14705,7 @@ ], "serializedName": "values", "type": { - "$ref": "691" + "$ref": "687" }, "optional": false, "readOnly": false, @@ -14811,7 +14724,7 @@ ] }, { - "$id": "1035", + "$id": "1029", "kind": "model", "name": "RenamedLiteralConstructorOverride", "apiVersions": [ @@ -14829,7 +14742,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1036", + "$id": "1030", "kind": "model", "name": "LiteralConstructorBase", "apiVersions": [ @@ -14848,7 +14761,7 @@ "isExactName": false, "properties": [ { - "$id": "1037", + "$id": "1031", "kind": "property", "name": "value", "apiVersions": [ @@ -14857,7 +14770,7 @@ ], "serializedName": "value", "type": { - "$id": "1038", + "$id": "1032", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14881,7 +14794,7 @@ }, "properties": [ { - "$id": "1039", + "$id": "1033", "kind": "property", "name": "renamedValue", "originalName": "value", @@ -14910,10 +14823,10 @@ ] }, { - "$ref": "1036" + "$ref": "1030" }, { - "$id": "1040", + "$id": "1034", "kind": "model", "name": "ConstructorClientNameCollisionLeaf", "apiVersions": [ @@ -14931,7 +14844,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1041", + "$id": "1035", "kind": "model", "name": "ConstructorClientNameCollision", "apiVersions": [ @@ -14949,7 +14862,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1042", + "$id": "1036", "kind": "model", "name": "ConstructorClientNameCollisionBase", "apiVersions": [ @@ -14968,7 +14881,7 @@ "isExactName": false, "properties": [ { - "$id": "1043", + "$id": "1037", "kind": "property", "name": "value", "originalName": "original", @@ -14978,7 +14891,7 @@ ], "serializedName": "original", "type": { - "$id": "1044", + "$id": "1038", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15002,7 +14915,7 @@ }, "properties": [ { - "$id": "1045", + "$id": "1039", "kind": "property", "name": "value", "originalName": "other", @@ -15012,7 +14925,7 @@ ], "serializedName": "other", "type": { - "$id": "1046", + "$id": "1040", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15037,13 +14950,13 @@ "properties": [] }, { - "$ref": "1041" + "$ref": "1035" }, { - "$ref": "1042" + "$ref": "1036" }, { - "$id": "1047", + "$id": "1041", "kind": "model", "name": "NullableDynamicModel", "apiVersions": [ @@ -15070,7 +14983,7 @@ "isExactName": false, "properties": [ { - "$id": "1048", + "$id": "1042", "kind": "property", "name": "modelValue", "apiVersions": [ @@ -15079,10 +14992,10 @@ ], "serializedName": "modelValue", "type": { - "$id": "1049", + "$id": "1043", "kind": "nullable", "type": { - "$ref": "624" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -15101,7 +15014,7 @@ "isExactName": false }, { - "$id": "1050", + "$id": "1044", "kind": "property", "name": "children", "apiVersions": [ @@ -15110,17 +15023,17 @@ ], "serializedName": "children", "type": { - "$id": "1051", + "$id": "1045", "kind": "nullable", "type": { - "$id": "1052", + "$id": "1046", "kind": "array", "name": "Array4", "valueType": { - "$id": "1053", + "$id": "1047", "kind": "nullable", "type": { - "$ref": "624" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -15144,7 +15057,7 @@ "isExactName": false }, { - "$id": "1054", + "$id": "1048", "kind": "property", "name": "childDictionary", "apiVersions": [ @@ -15153,23 +15066,23 @@ ], "serializedName": "childDictionary", "type": { - "$id": "1055", + "$id": "1049", "kind": "nullable", "type": { - "$id": "1056", + "$id": "1050", "kind": "dict", "keyType": { - "$id": "1057", + "$id": "1051", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1058", + "$id": "1052", "kind": "nullable", "type": { - "$ref": "624" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -15192,7 +15105,7 @@ "isExactName": false }, { - "$id": "1059", + "$id": "1053", "kind": "property", "name": "nestedChildren", "apiVersions": [ @@ -15201,24 +15114,24 @@ ], "serializedName": "nestedChildren", "type": { - "$id": "1060", + "$id": "1054", "kind": "nullable", "type": { - "$id": "1061", + "$id": "1055", "kind": "array", "name": "Array5", "valueType": { - "$id": "1062", + "$id": "1056", "kind": "nullable", "type": { - "$id": "1063", + "$id": "1057", "kind": "array", "name": "Array6", "valueType": { - "$id": "1064", + "$id": "1058", "kind": "nullable", "type": { - "$ref": "624" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -15247,7 +15160,7 @@ "isExactName": false }, { - "$id": "1065", + "$id": "1059", "kind": "property", "name": "nestedChildDictionary", "apiVersions": [ @@ -15256,36 +15169,36 @@ ], "serializedName": "nestedChildDictionary", "type": { - "$id": "1066", + "$id": "1060", "kind": "nullable", "type": { - "$id": "1067", + "$id": "1061", "kind": "dict", "keyType": { - "$id": "1068", + "$id": "1062", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1069", + "$id": "1063", "kind": "nullable", "type": { - "$id": "1070", + "$id": "1064", "kind": "dict", "keyType": { - "$id": "1071", + "$id": "1065", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1072", + "$id": "1066", "kind": "nullable", "type": { - "$ref": "624" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -15312,7 +15225,7 @@ "isExactName": false }, { - "$id": "1073", + "$id": "1067", "kind": "property", "name": "dictionaryChildren", "apiVersions": [ @@ -15321,30 +15234,30 @@ ], "serializedName": "dictionaryChildren", "type": { - "$id": "1074", + "$id": "1068", "kind": "nullable", "type": { - "$id": "1075", + "$id": "1069", "kind": "dict", "keyType": { - "$id": "1076", + "$id": "1070", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1077", + "$id": "1071", "kind": "nullable", "type": { - "$id": "1078", + "$id": "1072", "kind": "array", "name": "Array7", "valueType": { - "$id": "1079", + "$id": "1073", "kind": "nullable", "type": { - "$ref": "624" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -15372,7 +15285,7 @@ "isExactName": false }, { - "$id": "1080", + "$id": "1074", "kind": "property", "name": "listOfDictionaries", "apiVersions": [ @@ -15381,30 +15294,30 @@ ], "serializedName": "listOfDictionaries", "type": { - "$id": "1081", + "$id": "1075", "kind": "nullable", "type": { - "$id": "1082", + "$id": "1076", "kind": "array", "name": "Array8", "valueType": { - "$id": "1083", + "$id": "1077", "kind": "nullable", "type": { - "$id": "1084", + "$id": "1078", "kind": "dict", "keyType": { - "$id": "1085", + "$id": "1079", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1086", + "$id": "1080", "kind": "nullable", "type": { - "$ref": "624" + "$ref": "620" }, "namespace": "SampleTypeSpec" }, @@ -15434,7 +15347,7 @@ ] }, { - "$id": "1087", + "$id": "1081", "kind": "model", "name": "OptionalNullableDynamicProperties", "apiVersions": [ @@ -15460,7 +15373,7 @@ }, "isExactName": false, "baseModel": { - "$id": "1088", + "$id": "1082", "kind": "model", "name": "OptionalNullableBase", "apiVersions": [ @@ -15480,7 +15393,7 @@ "isExactName": false, "properties": [ { - "$id": "1089", + "$id": "1083", "kind": "property", "name": "inheritedNullable", "apiVersions": [ @@ -15489,10 +15402,10 @@ ], "serializedName": "inheritedNullable", "type": { - "$id": "1090", + "$id": "1084", "kind": "nullable", "type": { - "$id": "1091", + "$id": "1085", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15519,10 +15432,10 @@ "properties": [] }, { - "$ref": "1088" + "$ref": "1082" }, { - "$id": "1092", + "$id": "1086", "kind": "model", "name": "OptionalNullableChild", "apiVersions": [ @@ -15542,7 +15455,7 @@ "isExactName": false, "properties": [ { - "$id": "1093", + "$id": "1087", "kind": "property", "name": "value", "apiVersions": [ @@ -15551,7 +15464,7 @@ ], "serializedName": "value", "type": { - "$id": "1094", + "$id": "1088", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15574,7 +15487,7 @@ ] }, { - "$id": "1095", + "$id": "1089", "kind": "model", "name": "OptionalNullableProperties", "apiVersions": [ @@ -15593,11 +15506,11 @@ }, "isExactName": false, "baseModel": { - "$ref": "1088" + "$ref": "1082" }, "properties": [ { - "$id": "1096", + "$id": "1090", "kind": "property", "name": "nullableModel", "apiVersions": [ @@ -15606,10 +15519,10 @@ ], "serializedName": "nullableModel", "type": { - "$id": "1097", + "$id": "1091", "kind": "nullable", "type": { - "$ref": "1092" + "$ref": "1086" }, "namespace": "SampleTypeSpec" }, @@ -15628,7 +15541,7 @@ "isExactName": false }, { - "$id": "1098", + "$id": "1092", "kind": "property", "name": "nullableString", "apiVersions": [ @@ -15637,10 +15550,10 @@ ], "serializedName": "nullableString", "type": { - "$id": "1099", + "$id": "1093", "kind": "nullable", "type": { - "$id": "1100", + "$id": "1094", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15663,7 +15576,7 @@ "isExactName": false }, { - "$id": "1101", + "$id": "1095", "kind": "property", "name": "nullableInt", "apiVersions": [ @@ -15672,10 +15585,10 @@ ], "serializedName": "nullableInt", "type": { - "$id": "1102", + "$id": "1096", "kind": "nullable", "type": { - "$id": "1103", + "$id": "1097", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -15698,7 +15611,7 @@ "isExactName": false }, { - "$id": "1104", + "$id": "1098", "kind": "property", "name": "nullableBoolean", "apiVersions": [ @@ -15707,10 +15620,10 @@ ], "serializedName": "nullableBoolean", "type": { - "$id": "1105", + "$id": "1099", "kind": "nullable", "type": { - "$id": "1106", + "$id": "1100", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -15733,7 +15646,7 @@ "isExactName": false }, { - "$id": "1107", + "$id": "1101", "kind": "property", "name": "nullableEnum", "apiVersions": [ @@ -15742,7 +15655,7 @@ ], "serializedName": "nullableEnum", "type": { - "$id": "1108", + "$id": "1102", "kind": "nullable", "type": { "$ref": "17" @@ -15764,7 +15677,7 @@ "isExactName": false }, { - "$id": "1109", + "$id": "1103", "kind": "property", "name": "nullableDateTime", "apiVersions": [ @@ -15773,15 +15686,15 @@ ], "serializedName": "nullableDateTime", "type": { - "$id": "1110", + "$id": "1104", "kind": "nullable", "type": { - "$id": "1111", + "$id": "1105", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "1112", + "$id": "1106", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15807,7 +15720,7 @@ "isExactName": false }, { - "$id": "1113", + "$id": "1107", "kind": "property", "name": "nullableBytes", "apiVersions": [ @@ -15816,10 +15729,10 @@ ], "serializedName": "nullableBytes", "type": { - "$id": "1114", + "$id": "1108", "kind": "nullable", "type": { - "$id": "1115", + "$id": "1109", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -15843,7 +15756,7 @@ "isExactName": false }, { - "$id": "1116", + "$id": "1110", "kind": "property", "name": "nullableList", "apiVersions": [ @@ -15852,17 +15765,17 @@ ], "serializedName": "nullableList", "type": { - "$id": "1117", + "$id": "1111", "kind": "nullable", "type": { - "$id": "1118", + "$id": "1112", "kind": "array", "name": "Array9", "valueType": { - "$id": "1119", + "$id": "1113", "kind": "nullable", "type": { - "$id": "1120", + "$id": "1114", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15890,7 +15803,7 @@ "isExactName": false }, { - "$id": "1121", + "$id": "1115", "kind": "property", "name": "nullableDictionary", "apiVersions": [ @@ -15899,23 +15812,23 @@ ], "serializedName": "nullableDictionary", "type": { - "$id": "1122", + "$id": "1116", "kind": "nullable", "type": { - "$id": "1123", + "$id": "1117", "kind": "dict", "keyType": { - "$id": "1124", + "$id": "1118", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1125", + "$id": "1119", "kind": "nullable", "type": { - "$id": "1126", + "$id": "1120", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -15942,7 +15855,7 @@ "isExactName": false }, { - "$id": "1127", + "$id": "1121", "kind": "property", "name": "readOnlyNullable", "apiVersions": [ @@ -15951,10 +15864,10 @@ ], "serializedName": "readOnlyNullable", "type": { - "$id": "1128", + "$id": "1122", "kind": "nullable", "type": { - "$id": "1129", + "$id": "1123", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15977,7 +15890,7 @@ "isExactName": false }, { - "$id": "1130", + "$id": "1124", "kind": "property", "name": "requiredNullable", "apiVersions": [ @@ -15986,10 +15899,10 @@ ], "serializedName": "requiredNullable", "type": { - "$id": "1131", + "$id": "1125", "kind": "nullable", "type": { - "$id": "1132", + "$id": "1126", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16012,7 +15925,7 @@ "isExactName": false }, { - "$id": "1133", + "$id": "1127", "kind": "property", "name": "optionalNonNullable", "apiVersions": [ @@ -16021,7 +15934,7 @@ ], "serializedName": "optionalNonNullable", "type": { - "$id": "1134", + "$id": "1128", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16042,7 +15955,7 @@ "isExactName": false }, { - "$id": "1135", + "$id": "1129", "kind": "property", "name": "optionalNonNullableInt", "apiVersions": [ @@ -16051,7 +15964,7 @@ ], "serializedName": "optionalNonNullableInt", "type": { - "$id": "1136", + "$id": "1130", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -16074,7 +15987,7 @@ ] }, { - "$id": "1137", + "$id": "1131", "kind": "model", "name": "OptionalNullableContainer", "apiVersions": [ @@ -16094,7 +16007,7 @@ "isExactName": false, "properties": [ { - "$id": "1138", + "$id": "1132", "kind": "property", "name": "child", "apiVersions": [ @@ -16103,7 +16016,7 @@ ], "serializedName": "child", "type": { - "$ref": "1095" + "$ref": "1089" }, "optional": false, "readOnly": false, @@ -16122,7 +16035,7 @@ ] }, { - "$id": "1139", + "$id": "1133", "kind": "model", "name": "OptionalNullableFieldNames", "apiVersions": [ @@ -16141,10 +16054,10 @@ }, "isExactName": false, "additionalProperties": { - "$id": "1140", + "$id": "1134", "kind": "nullable", "type": { - "$id": "1141", + "$id": "1135", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16154,7 +16067,7 @@ }, "properties": [ { - "$id": "1142", + "$id": "1136", "kind": "property", "name": "additionalStringProperties", "apiVersions": [ @@ -16163,10 +16076,10 @@ ], "serializedName": "additionalStringProperties", "type": { - "$id": "1143", + "$id": "1137", "kind": "nullable", "type": { - "$id": "1144", + "$id": "1138", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16189,7 +16102,7 @@ "isExactName": false }, { - "$id": "1145", + "$id": "1139", "kind": "property", "name": "additionalStringPropertiesIsDefined", "apiVersions": [ @@ -16198,10 +16111,10 @@ ], "serializedName": "additionalStringPropertiesIsDefined", "type": { - "$id": "1146", + "$id": "1140", "kind": "nullable", "type": { - "$id": "1147", + "$id": "1141", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16226,7 +16139,7 @@ ] }, { - "$id": "1148", + "$id": "1142", "kind": "model", "name": "UnionAdditionalProperties", "apiVersions": [ @@ -16245,29 +16158,29 @@ }, "isExactName": false, "additionalProperties": { - "$id": "1149", + "$id": "1143", "kind": "nullable", "type": { - "$id": "1150", + "$id": "1144", "kind": "union", "name": "UnionAdditionalPropertiesAdditionalProperty", "variantTypes": [ { - "$id": "1151", + "$id": "1145", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "1152", + "$id": "1146", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, { - "$id": "1153", + "$id": "1147", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -16283,7 +16196,7 @@ "properties": [] }, { - "$id": "1154", + "$id": "1148", "kind": "model", "name": "JsonlStreamStreamingItem", "apiVersions": [], @@ -16296,7 +16209,7 @@ "isExactName": false, "properties": [ { - "$id": "1155", + "$id": "1149", "kind": "property", "name": "contentType", "apiVersions": [ @@ -16317,7 +16230,7 @@ "isExactName": false }, { - "$id": "1156", + "$id": "1150", "kind": "property", "name": "body", "apiVersions": [ @@ -16325,7 +16238,7 @@ "2024-08-16-preview" ], "type": { - "$id": "1157", + "$id": "1151", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "", @@ -16346,7 +16259,7 @@ ], "clients": [ { - "$id": "1158", + "$id": "1152", "kind": "client", "name": "SampleTypeSpecClient", "isExactName": false, @@ -16354,7 +16267,7 @@ "doc": "This is a sample typespec project.", "methods": [ { - "$id": "1159", + "$id": "1153", "kind": "basic", "name": "sayHi", "isExactName": false, @@ -16365,19 +16278,19 @@ ], "doc": "Return hi", "operation": { - "$id": "1160", + "$id": "1154", "name": "sayHi", "isExactName": false, "doc": "Return hi", "accessibility": "public", "parameters": [ { - "$id": "1161", + "$id": "1155", "kind": "header", "name": "headParameter", "serializedName": "head-parameter", "type": { - "$id": "1162", + "$id": "1156", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16392,12 +16305,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sayHi.headParameter", "methodParameterSegments": [ { - "$id": "1163", + "$id": "1157", "kind": "method", "name": "headParameter", "serializedName": "head-parameter", "type": { - "$id": "1164", + "$id": "1158", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16417,12 +16330,12 @@ "isExactName": false }, { - "$id": "1165", + "$id": "1159", "kind": "query", "name": "queryParameter", "serializedName": "queryParameter", "type": { - "$id": "1166", + "$id": "1160", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16437,12 +16350,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1167", + "$id": "1161", "kind": "method", "name": "queryParameter", "serializedName": "queryParameter", "type": { - "$id": "1168", + "$id": "1162", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16462,12 +16375,12 @@ "isExactName": false }, { - "$id": "1169", + "$id": "1163", "kind": "query", "name": "optionalQuery", "serializedName": "optionalQuery", "type": { - "$id": "1170", + "$id": "1164", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16482,12 +16395,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1171", + "$id": "1165", "kind": "method", "name": "optionalQuery", "serializedName": "optionalQuery", "type": { - "$id": "1172", + "$id": "1166", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16507,7 +16420,7 @@ "isExactName": false }, { - "$id": "1173", + "$id": "1167", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -16523,7 +16436,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sayHi.accept", "methodParameterSegments": [ { - "$id": "1174", + "$id": "1168", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -16550,7 +16463,7 @@ 200 ], "bodyType": { - "$ref": "478" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -16576,21 +16489,21 @@ }, "parameters": [ { - "$ref": "1163" + "$ref": "1157" }, { - "$ref": "1167" + "$ref": "1161" }, { - "$ref": "1171" + "$ref": "1165" }, { - "$ref": "1174" + "$ref": "1168" } ], "response": { "type": { - "$ref": "478" + "$ref": "474" } }, "isOverride": false, @@ -16599,7 +16512,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sayHi" }, { - "$id": "1175", + "$id": "1169", "kind": "basic", "name": "helloAgain", "isExactName": false, @@ -16610,19 +16523,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "1176", + "$id": "1170", "name": "helloAgain", "isExactName": false, "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "1177", + "$id": "1171", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "1178", + "$id": "1172", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16637,12 +16550,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.p1", "methodParameterSegments": [ { - "$id": "1179", + "$id": "1173", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "1180", + "$id": "1174", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16662,7 +16575,7 @@ "isExactName": false }, { - "$id": "1181", + "$id": "1175", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -16678,7 +16591,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.contentType", "methodParameterSegments": [ { - "$id": "1182", + "$id": "1176", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -16699,12 +16612,12 @@ "isExactName": false }, { - "$id": "1183", + "$id": "1177", "kind": "path", "name": "p2", "serializedName": "p2", "type": { - "$id": "1184", + "$id": "1178", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16722,12 +16635,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.p2", "methodParameterSegments": [ { - "$id": "1185", + "$id": "1179", "kind": "method", "name": "p2", "serializedName": "p2", "type": { - "$id": "1186", + "$id": "1180", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16747,7 +16660,7 @@ "isExactName": false }, { - "$id": "1187", + "$id": "1181", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -16763,7 +16676,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.accept", "methodParameterSegments": [ { - "$id": "1188", + "$id": "1182", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -16784,12 +16697,12 @@ "isExactName": false }, { - "$id": "1189", + "$id": "1183", "kind": "body", "name": "action", "serializedName": "action", "type": { - "$ref": "513" + "$ref": "509" }, "isApiVersion": false, "contentTypes": [ @@ -16803,12 +16716,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.action", "methodParameterSegments": [ { - "$id": "1190", + "$id": "1184", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$ref": "513" + "$ref": "509" }, "location": "Body", "isApiVersion": false, @@ -16831,7 +16744,7 @@ 200 ], "bodyType": { - "$ref": "513" + "$ref": "509" }, "headers": [], "isErrorResponse": false, @@ -16860,24 +16773,24 @@ }, "parameters": [ { - "$ref": "1179" + "$ref": "1173" }, { - "$ref": "1190" + "$ref": "1184" }, { - "$ref": "1182" + "$ref": "1176" }, { - "$ref": "1185" + "$ref": "1179" }, { - "$ref": "1188" + "$ref": "1182" } ], "response": { "type": { - "$ref": "513" + "$ref": "509" } }, "isOverride": false, @@ -16886,7 +16799,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain" }, { - "$id": "1191", + "$id": "1185", "kind": "basic", "name": "noContentType", "isExactName": false, @@ -16897,19 +16810,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "1192", + "$id": "1186", "name": "noContentType", "isExactName": false, "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "1193", + "$id": "1187", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "1194", + "$id": "1188", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16924,12 +16837,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.p1", "methodParameterSegments": [ { - "$id": "1195", + "$id": "1189", "kind": "method", "name": "info", "serializedName": "info", "type": { - "$ref": "563" + "$ref": "559" }, "location": "", "isApiVersion": false, @@ -16942,13 +16855,13 @@ "isExactName": false }, { - "$id": "1196", + "$id": "1190", "kind": "method", "name": "p1", "serializedName": "p1", "doc": "header parameter", "type": { - "$ref": "565" + "$ref": "561" }, "location": "", "isApiVersion": false, @@ -16964,12 +16877,12 @@ "isExactName": false }, { - "$id": "1197", + "$id": "1191", "kind": "path", "name": "p2", "serializedName": "p2", "type": { - "$id": "1198", + "$id": "1192", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16987,16 +16900,16 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.p2", "methodParameterSegments": [ { - "$ref": "1195" + "$ref": "1189" }, { - "$id": "1199", + "$id": "1193", "kind": "method", "name": "p2", "serializedName": "p2", "doc": "path parameter", "type": { - "$ref": "568" + "$ref": "564" }, "location": "", "isApiVersion": false, @@ -17012,7 +16925,7 @@ "isExactName": false }, { - "$id": "1200", + "$id": "1194", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -17029,7 +16942,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.contentType", "methodParameterSegments": [ { - "$id": "1201", + "$id": "1195", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -17051,7 +16964,7 @@ "isExactName": false }, { - "$id": "1202", + "$id": "1196", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17067,7 +16980,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.accept", "methodParameterSegments": [ { - "$id": "1203", + "$id": "1197", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17088,12 +17001,12 @@ "isExactName": false }, { - "$id": "1204", + "$id": "1198", "kind": "body", "name": "action", "serializedName": "action", "type": { - "$ref": "513" + "$ref": "509" }, "isApiVersion": false, "contentTypes": [ @@ -17107,16 +17020,16 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.action", "methodParameterSegments": [ { - "$ref": "1195" + "$ref": "1189" }, { - "$id": "1205", + "$id": "1199", "kind": "method", "name": "action", "serializedName": "action", "doc": "body parameter", "type": { - "$ref": "513" + "$ref": "509" }, "location": "", "isApiVersion": false, @@ -17143,7 +17056,7 @@ 200 ], "bodyType": { - "$ref": "513" + "$ref": "509" }, "headers": [], "isErrorResponse": false, @@ -17172,18 +17085,18 @@ }, "parameters": [ { - "$ref": "1195" + "$ref": "1189" }, { - "$ref": "1201" + "$ref": "1195" }, { - "$ref": "1203" + "$ref": "1197" } ], "response": { "type": { - "$ref": "513" + "$ref": "509" } }, "isOverride": true, @@ -17192,7 +17105,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType" }, { - "$id": "1206", + "$id": "1200", "kind": "basic", "name": "helloDemo2", "isExactName": false, @@ -17203,14 +17116,14 @@ ], "doc": "Return hi in demo2", "operation": { - "$id": "1207", + "$id": "1201", "name": "helloDemo2", "isExactName": false, "doc": "Return hi in demo2", "accessibility": "public", "parameters": [ { - "$id": "1208", + "$id": "1202", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17226,7 +17139,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloDemo2.accept", "methodParameterSegments": [ { - "$id": "1209", + "$id": "1203", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17253,7 +17166,7 @@ 200 ], "bodyType": { - "$ref": "478" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -17283,12 +17196,12 @@ }, "parameters": [ { - "$ref": "1209" + "$ref": "1203" } ], "response": { "type": { - "$ref": "478" + "$ref": "474" } }, "isOverride": false, @@ -17297,7 +17210,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloDemo2" }, { - "$id": "1210", + "$id": "1204", "kind": "basic", "name": "createLiteral", "isExactName": false, @@ -17308,14 +17221,14 @@ ], "doc": "Create with literal value", "operation": { - "$id": "1211", + "$id": "1205", "name": "createLiteral", "isExactName": false, "doc": "Create with literal value", "accessibility": "public", "parameters": [ { - "$id": "1212", + "$id": "1206", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -17332,7 +17245,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral.contentType", "methodParameterSegments": [ { - "$id": "1213", + "$id": "1207", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -17354,7 +17267,7 @@ "isExactName": false }, { - "$id": "1214", + "$id": "1208", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17370,7 +17283,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral.accept", "methodParameterSegments": [ { - "$id": "1215", + "$id": "1209", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17391,12 +17304,12 @@ "isExactName": false }, { - "$id": "1216", + "$id": "1210", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "478" + "$ref": "474" }, "isApiVersion": false, "contentTypes": [ @@ -17410,12 +17323,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral.body", "methodParameterSegments": [ { - "$id": "1217", + "$id": "1211", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "478" + "$ref": "474" }, "location": "Body", "isApiVersion": false, @@ -17442,7 +17355,7 @@ 200 ], "bodyType": { - "$ref": "478" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -17471,18 +17384,18 @@ }, "parameters": [ { - "$ref": "1217" + "$ref": "1211" }, { - "$ref": "1213" + "$ref": "1207" }, { - "$ref": "1215" + "$ref": "1209" } ], "response": { "type": { - "$ref": "478" + "$ref": "474" } }, "isOverride": false, @@ -17491,7 +17404,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral" }, { - "$id": "1218", + "$id": "1212", "kind": "basic", "name": "helloLiteral", "isExactName": false, @@ -17502,14 +17415,14 @@ ], "doc": "Send literal parameters", "operation": { - "$id": "1219", + "$id": "1213", "name": "helloLiteral", "isExactName": false, "doc": "Send literal parameters", "accessibility": "public", "parameters": [ { - "$id": "1220", + "$id": "1214", "kind": "header", "name": "p1", "serializedName": "p1", @@ -17525,7 +17438,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral.p1", "methodParameterSegments": [ { - "$id": "1221", + "$id": "1215", "kind": "method", "name": "p1", "serializedName": "p1", @@ -17546,7 +17459,7 @@ "isExactName": false }, { - "$id": "1222", + "$id": "1216", "kind": "path", "name": "p2", "serializedName": "p2", @@ -17565,7 +17478,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral.p2", "methodParameterSegments": [ { - "$id": "1223", + "$id": "1217", "kind": "method", "name": "p2", "serializedName": "p2", @@ -17586,7 +17499,7 @@ "isExactName": false }, { - "$id": "1224", + "$id": "1218", "kind": "query", "name": "p3", "serializedName": "p3", @@ -17602,7 +17515,7 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1225", + "$id": "1219", "kind": "method", "name": "p3", "serializedName": "p3", @@ -17623,7 +17536,7 @@ "isExactName": false }, { - "$id": "1226", + "$id": "1220", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17639,7 +17552,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral.accept", "methodParameterSegments": [ { - "$id": "1227", + "$id": "1221", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17666,7 +17579,7 @@ 200 ], "bodyType": { - "$ref": "478" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -17692,21 +17605,21 @@ }, "parameters": [ { - "$ref": "1221" + "$ref": "1215" }, { - "$ref": "1223" + "$ref": "1217" }, { - "$ref": "1225" + "$ref": "1219" }, { - "$ref": "1227" + "$ref": "1221" } ], "response": { "type": { - "$ref": "478" + "$ref": "474" } }, "isOverride": false, @@ -17715,7 +17628,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral" }, { - "$id": "1228", + "$id": "1222", "kind": "basic", "name": "topAction", "isExactName": false, @@ -17726,24 +17639,24 @@ ], "doc": "top level method", "operation": { - "$id": "1229", + "$id": "1223", "name": "topAction", "isExactName": false, "doc": "top level method", "accessibility": "public", "parameters": [ { - "$id": "1230", + "$id": "1224", "kind": "path", "name": "action", "serializedName": "action", "type": { - "$id": "1231", + "$id": "1225", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "1232", + "$id": "1226", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17764,17 +17677,17 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction.action", "methodParameterSegments": [ { - "$id": "1233", + "$id": "1227", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$id": "1234", + "$id": "1228", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "1235", + "$id": "1229", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17797,7 +17710,7 @@ "isExactName": false }, { - "$id": "1236", + "$id": "1230", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17813,7 +17726,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction.accept", "methodParameterSegments": [ { - "$id": "1237", + "$id": "1231", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17840,7 +17753,7 @@ 200 ], "bodyType": { - "$ref": "478" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -17866,15 +17779,15 @@ }, "parameters": [ { - "$ref": "1233" + "$ref": "1227" }, { - "$ref": "1237" + "$ref": "1231" } ], "response": { "type": { - "$ref": "478" + "$ref": "474" } }, "isOverride": false, @@ -17883,7 +17796,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction" }, { - "$id": "1238", + "$id": "1232", "kind": "basic", "name": "topAction2", "isExactName": false, @@ -17894,14 +17807,14 @@ ], "doc": "top level method2", "operation": { - "$id": "1239", + "$id": "1233", "name": "topAction2", "isExactName": false, "doc": "top level method2", "accessibility": "public", "parameters": [ { - "$id": "1240", + "$id": "1234", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17917,7 +17830,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction2.accept", "methodParameterSegments": [ { - "$id": "1241", + "$id": "1235", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17944,7 +17857,7 @@ 200 ], "bodyType": { - "$ref": "478" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -17970,12 +17883,12 @@ }, "parameters": [ { - "$ref": "1241" + "$ref": "1235" } ], "response": { "type": { - "$ref": "478" + "$ref": "474" } }, "isOverride": false, @@ -17984,7 +17897,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction2" }, { - "$id": "1242", + "$id": "1236", "kind": "basic", "name": "patchAction", "isExactName": false, @@ -17995,14 +17908,14 @@ ], "doc": "top level patch", "operation": { - "$id": "1243", + "$id": "1237", "name": "patchAction", "isExactName": false, "doc": "top level patch", "accessibility": "public", "parameters": [ { - "$id": "1244", + "$id": "1238", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -18019,7 +17932,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction.contentType", "methodParameterSegments": [ { - "$id": "1245", + "$id": "1239", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -18041,7 +17954,7 @@ "isExactName": false }, { - "$id": "1246", + "$id": "1240", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -18057,7 +17970,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction.accept", "methodParameterSegments": [ { - "$id": "1247", + "$id": "1241", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -18078,12 +17991,12 @@ "isExactName": false }, { - "$id": "1248", + "$id": "1242", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "478" + "$ref": "474" }, "isApiVersion": false, "contentTypes": [ @@ -18097,12 +18010,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction.body", "methodParameterSegments": [ { - "$id": "1249", + "$id": "1243", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "478" + "$ref": "474" }, "location": "Body", "isApiVersion": false, @@ -18129,7 +18042,7 @@ 200 ], "bodyType": { - "$ref": "478" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -18158,18 +18071,18 @@ }, "parameters": [ { - "$ref": "1249" + "$ref": "1243" }, { - "$ref": "1245" + "$ref": "1239" }, { - "$ref": "1247" + "$ref": "1241" } ], "response": { "type": { - "$ref": "478" + "$ref": "474" } }, "isOverride": false, @@ -18178,7 +18091,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction" }, { - "$id": "1250", + "$id": "1244", "kind": "basic", "name": "anonymousBody", "isExactName": false, @@ -18189,14 +18102,14 @@ ], "doc": "body parameter without body decorator", "operation": { - "$id": "1251", + "$id": "1245", "name": "anonymousBody", "isExactName": false, "doc": "body parameter without body decorator", "accessibility": "public", "parameters": [ { - "$id": "1252", + "$id": "1246", "kind": "query", "name": "requiredQueryParam", "serializedName": "requiredQueryParam", @@ -18212,7 +18125,7 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1253", + "$id": "1247", "kind": "method", "name": "requiredQueryParam", "serializedName": "requiredQueryParam", @@ -18233,7 +18146,7 @@ "isExactName": false }, { - "$id": "1254", + "$id": "1248", "kind": "header", "name": "requiredHeader", "serializedName": "required-header", @@ -18249,7 +18162,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.requiredHeader", "methodParameterSegments": [ { - "$id": "1255", + "$id": "1249", "kind": "method", "name": "requiredHeader", "serializedName": "required-header", @@ -18270,7 +18183,7 @@ "isExactName": false }, { - "$id": "1256", + "$id": "1250", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -18287,7 +18200,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.contentType", "methodParameterSegments": [ { - "$id": "1257", + "$id": "1251", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -18309,7 +18222,7 @@ "isExactName": false }, { - "$id": "1258", + "$id": "1252", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -18325,7 +18238,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.accept", "methodParameterSegments": [ { - "$id": "1259", + "$id": "1253", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -18346,12 +18259,12 @@ "isExactName": false }, { - "$id": "1260", + "$id": "1254", "kind": "body", "name": "thing", "serializedName": "thing", "type": { - "$ref": "478" + "$ref": "474" }, "isApiVersion": false, "contentTypes": [ @@ -18365,13 +18278,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.body", "methodParameterSegments": [ { - "$id": "1261", + "$id": "1255", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the Thing", "type": { - "$id": "1262", + "$id": "1256", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18402,7 +18315,7 @@ 200 ], "bodyType": { - "$ref": "478" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -18431,16 +18344,16 @@ }, "parameters": [ { - "$ref": "1261" + "$ref": "1255" }, { - "$id": "1263", + "$id": "1257", "kind": "method", "name": "requiredUnion", "serializedName": "requiredUnion", "doc": "required Union", "type": { - "$ref": "482" + "$ref": "478" }, "location": "Body", "isApiVersion": false, @@ -18453,7 +18366,7 @@ "isExactName": false }, { - "$id": "1264", + "$id": "1258", "kind": "method", "name": "requiredLiteralString", "serializedName": "requiredLiteralString", @@ -18472,13 +18385,13 @@ "isExactName": false }, { - "$id": "1265", + "$id": "1259", "kind": "method", "name": "requiredNullableString", "serializedName": "requiredNullableString", "doc": "required nullable string", "type": { - "$ref": "489" + "$ref": "485" }, "location": "Body", "isApiVersion": false, @@ -18491,13 +18404,13 @@ "isExactName": false }, { - "$id": "1266", + "$id": "1260", "kind": "method", "name": "optionalNullableString", "serializedName": "optionalNullableString", "doc": "required optional string", "type": { - "$ref": "492" + "$ref": "488" }, "location": "Body", "isApiVersion": false, @@ -18510,7 +18423,7 @@ "isExactName": false }, { - "$id": "1267", + "$id": "1261", "kind": "method", "name": "requiredLiteralInt", "serializedName": "requiredLiteralInt", @@ -18529,7 +18442,7 @@ "isExactName": false }, { - "$id": "1268", + "$id": "1262", "kind": "method", "name": "requiredLiteralFloat", "serializedName": "requiredLiteralFloat", @@ -18548,7 +18461,7 @@ "isExactName": false }, { - "$id": "1269", + "$id": "1263", "kind": "method", "name": "requiredLiteralBool", "serializedName": "requiredLiteralBool", @@ -18567,19 +18480,19 @@ "isExactName": false }, { - "$id": "1270", + "$id": "1264", "kind": "method", "name": "optionalLiteralString", "serializedName": "optionalLiteralString", "doc": "optional literal string", "type": { - "$id": "1271", + "$id": "1265", "kind": "enum", "name": "ThingOptionalLiteralString", "apiVersions": [], "crossLanguageDefinitionId": "", "valueType": { - "$id": "1272", + "$id": "1266", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18587,12 +18500,12 @@ }, "values": [ { - "$id": "1273", + "$id": "1267", "kind": "enumvalue", "name": "reject", "value": "reject", "valueType": { - "$id": "1274", + "$id": "1268", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -18600,7 +18513,7 @@ "crossLanguageDefinitionId": "TypeSpec.string" }, "enumType": { - "$ref": "1271" + "$ref": "1265" }, "decorators": [], "isExactName": false @@ -18624,13 +18537,13 @@ "isExactName": false }, { - "$id": "1275", + "$id": "1269", "kind": "method", "name": "requiredNullableLiteralString", "serializedName": "requiredNullableLiteralString", "doc": "required nullable literal string", "type": { - "$ref": "499" + "$ref": "495" }, "location": "Body", "isApiVersion": false, @@ -18643,19 +18556,19 @@ "isExactName": false }, { - "$id": "1276", + "$id": "1270", "kind": "method", "name": "optionalLiteralInt", "serializedName": "optionalLiteralInt", "doc": "optional literal int", "type": { - "$id": "1277", + "$id": "1271", "kind": "enum", "name": "ThingOptionalLiteralInt", "apiVersions": [], "crossLanguageDefinitionId": "", "valueType": { - "$id": "1278", + "$id": "1272", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -18663,12 +18576,12 @@ }, "values": [ { - "$id": "1279", + "$id": "1273", "kind": "enumvalue", "name": "456", "value": 456, "valueType": { - "$id": "1280", + "$id": "1274", "kind": "int32", "decorators": [], "doc": "A 32-bit integer. (`-2,147,483,648` to `2,147,483,647`)", @@ -18676,7 +18589,7 @@ "crossLanguageDefinitionId": "TypeSpec.int32" }, "enumType": { - "$ref": "1277" + "$ref": "1271" }, "decorators": [], "isExactName": false @@ -18700,19 +18613,19 @@ "isExactName": false }, { - "$id": "1281", + "$id": "1275", "kind": "method", "name": "optionalLiteralFloat", "serializedName": "optionalLiteralFloat", "doc": "optional literal float", "type": { - "$id": "1282", + "$id": "1276", "kind": "enum", "name": "ThingOptionalLiteralFloat", "apiVersions": [], "crossLanguageDefinitionId": "", "valueType": { - "$id": "1283", + "$id": "1277", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18720,12 +18633,12 @@ }, "values": [ { - "$id": "1284", + "$id": "1278", "kind": "enumvalue", "name": "4.56", "value": 4.56, "valueType": { - "$id": "1285", + "$id": "1279", "kind": "float32", "decorators": [], "doc": "A 32 bit floating point number. (`±1.5 x 10^−45` to `±3.4 x 10^38`)", @@ -18733,7 +18646,7 @@ "crossLanguageDefinitionId": "TypeSpec.float32" }, "enumType": { - "$ref": "1282" + "$ref": "1276" }, "decorators": [], "isExactName": false @@ -18757,7 +18670,7 @@ "isExactName": false }, { - "$id": "1286", + "$id": "1280", "kind": "method", "name": "optionalLiteralBool", "serializedName": "optionalLiteralBool", @@ -18776,13 +18689,13 @@ "isExactName": false }, { - "$id": "1287", + "$id": "1281", "kind": "method", "name": "requiredBadDescription", "serializedName": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "1288", + "$id": "1282", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18799,13 +18712,13 @@ "isExactName": false }, { - "$id": "1289", + "$id": "1283", "kind": "method", "name": "optionalNullableList", "serializedName": "optionalNullableList", "doc": "optional nullable collection", "type": { - "$ref": "506" + "$ref": "502" }, "location": "Body", "isApiVersion": false, @@ -18818,13 +18731,13 @@ "isExactName": false }, { - "$id": "1290", + "$id": "1284", "kind": "method", "name": "requiredNullableList", "serializedName": "requiredNullableList", "doc": "required nullable collection", "type": { - "$ref": "510" + "$ref": "506" }, "location": "Body", "isApiVersion": false, @@ -18837,13 +18750,13 @@ "isExactName": false }, { - "$id": "1291", + "$id": "1285", "kind": "method", "name": "propertyWithSpecialDocs", "serializedName": "propertyWithSpecialDocs", "doc": "This tests:\n- Simple bullet point. This bullet point is going to be very long to test how text wrapping is handled in bullet points within documentation comments. It should properly indent the wrapped lines.\n- Another bullet point with **bold text**. This bullet point is also intentionally long to see how the formatting is preserved when the text wraps onto multiple lines in the generated documentation.\n- Third bullet point with *italic text*. Similar to the previous points, this one is extended to ensure that the wrapping and formatting are correctly applied in the output.\n- Complex bullet point with **bold** and *italic* combined. This bullet point combines both bold and italic formatting and is long enough to test the wrapping behavior in such cases.\n- **Bold bullet point**: A bullet point that is entirely bolded. This point is also made lengthy to observe how the bold formatting is maintained across wrapped lines.\n- *Italic bullet point*: A bullet point that is entirely italicized. This final point is extended to verify that italic formatting is correctly applied even when the text spans multiple lines.", "type": { - "$id": "1292", + "$id": "1286", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18860,21 +18773,21 @@ "isExactName": false }, { - "$ref": "1253" + "$ref": "1247" }, { - "$ref": "1255" + "$ref": "1249" }, { - "$ref": "1257" + "$ref": "1251" }, { - "$ref": "1259" + "$ref": "1253" } ], "response": { "type": { - "$ref": "478" + "$ref": "474" } }, "isOverride": false, @@ -18883,7 +18796,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody" }, { - "$id": "1293", + "$id": "1287", "kind": "basic", "name": "friendlyModel", "isExactName": false, @@ -18894,14 +18807,14 @@ ], "doc": "Model can have its friendly name", "operation": { - "$id": "1294", + "$id": "1288", "name": "friendlyModel", "isExactName": false, "doc": "Model can have its friendly name", "accessibility": "public", "parameters": [ { - "$id": "1295", + "$id": "1289", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -18918,7 +18831,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel.contentType", "methodParameterSegments": [ { - "$id": "1296", + "$id": "1290", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -18940,7 +18853,7 @@ "isExactName": false }, { - "$id": "1297", + "$id": "1291", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -18956,7 +18869,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel.accept", "methodParameterSegments": [ { - "$id": "1298", + "$id": "1292", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -18977,12 +18890,12 @@ "isExactName": false }, { - "$id": "1299", + "$id": "1293", "kind": "body", "name": "friend", "serializedName": "friend", "type": { - "$ref": "569" + "$ref": "565" }, "isApiVersion": false, "contentTypes": [ @@ -18996,13 +18909,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel.body", "methodParameterSegments": [ { - "$id": "1300", + "$id": "1294", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "1301", + "$id": "1295", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19033,7 +18946,7 @@ 200 ], "bodyType": { - "$ref": "569" + "$ref": "565" }, "headers": [], "isErrorResponse": false, @@ -19062,18 +18975,18 @@ }, "parameters": [ { - "$ref": "1300" + "$ref": "1294" }, { - "$ref": "1296" + "$ref": "1290" }, { - "$ref": "1298" + "$ref": "1292" } ], "response": { "type": { - "$ref": "569" + "$ref": "565" } }, "isOverride": false, @@ -19082,7 +18995,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel" }, { - "$id": "1302", + "$id": "1296", "kind": "basic", "name": "addTimeHeader", "isExactName": false, @@ -19092,23 +19005,23 @@ "2024-08-16-preview" ], "operation": { - "$id": "1303", + "$id": "1297", "name": "addTimeHeader", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1304", + "$id": "1298", "kind": "header", "name": "repeatabilityFirstSent", "serializedName": "Repeatability-First-Sent", "type": { - "$id": "1305", + "$id": "1299", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "1306", + "$id": "1300", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19126,17 +19039,17 @@ "crossLanguageDefinitionId": "SampleTypeSpec.addTimeHeader.repeatabilityFirstSent", "methodParameterSegments": [ { - "$id": "1307", + "$id": "1301", "kind": "method", "name": "repeatabilityFirstSent", "serializedName": "Repeatability-First-Sent", "type": { - "$id": "1308", + "$id": "1302", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "1309", + "$id": "1303", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19181,7 +19094,7 @@ }, "parameters": [ { - "$ref": "1307" + "$ref": "1301" } ], "response": {}, @@ -19191,7 +19104,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.addTimeHeader" }, { - "$id": "1310", + "$id": "1304", "kind": "basic", "name": "projectedNameModel", "isExactName": false, @@ -19202,14 +19115,14 @@ ], "doc": "Model can have its projected name", "operation": { - "$id": "1311", + "$id": "1305", "name": "projectedNameModel", "isExactName": false, "doc": "Model can have its projected name", "accessibility": "public", "parameters": [ { - "$id": "1312", + "$id": "1306", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -19226,7 +19139,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel.contentType", "methodParameterSegments": [ { - "$id": "1313", + "$id": "1307", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -19248,7 +19161,7 @@ "isExactName": false }, { - "$id": "1314", + "$id": "1308", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19264,7 +19177,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel.accept", "methodParameterSegments": [ { - "$id": "1315", + "$id": "1309", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19285,12 +19198,12 @@ "isExactName": false }, { - "$id": "1316", + "$id": "1310", "kind": "body", "name": "renamedModel", "serializedName": "renamedModel", "type": { - "$ref": "572" + "$ref": "568" }, "isApiVersion": false, "contentTypes": [ @@ -19304,13 +19217,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel.body", "methodParameterSegments": [ { - "$id": "1317", + "$id": "1311", "kind": "method", "name": "otherName", "serializedName": "otherName", "doc": "name of the ModelWithClientName", "type": { - "$id": "1318", + "$id": "1312", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19341,7 +19254,7 @@ 200 ], "bodyType": { - "$ref": "572" + "$ref": "568" }, "headers": [], "isErrorResponse": false, @@ -19370,18 +19283,18 @@ }, "parameters": [ { - "$ref": "1317" + "$ref": "1311" }, { - "$ref": "1313" + "$ref": "1307" }, { - "$ref": "1315" + "$ref": "1309" } ], "response": { "type": { - "$ref": "572" + "$ref": "568" } }, "isOverride": false, @@ -19390,7 +19303,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel" }, { - "$id": "1319", + "$id": "1313", "kind": "basic", "name": "returnsAnonymousModel", "isExactName": false, @@ -19401,14 +19314,14 @@ ], "doc": "return anonymous model", "operation": { - "$id": "1320", + "$id": "1314", "name": "returnsAnonymousModel", "isExactName": false, "doc": "return anonymous model", "accessibility": "public", "parameters": [ { - "$id": "1321", + "$id": "1315", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19424,7 +19337,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.returnsAnonymousModel.accept", "methodParameterSegments": [ { - "$id": "1322", + "$id": "1316", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19451,7 +19364,7 @@ 200 ], "bodyType": { - "$ref": "575" + "$ref": "571" }, "headers": [], "isErrorResponse": false, @@ -19477,12 +19390,12 @@ }, "parameters": [ { - "$ref": "1322" + "$ref": "1316" } ], "response": { "type": { - "$ref": "575" + "$ref": "571" } }, "isOverride": false, @@ -19491,7 +19404,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.returnsAnonymousModel" }, { - "$id": "1323", + "$id": "1317", "kind": "basic", "name": "getUnknownValue", "isExactName": false, @@ -19502,14 +19415,14 @@ ], "doc": "get extensible enum", "operation": { - "$id": "1324", + "$id": "1318", "name": "getUnknownValue", "isExactName": false, "doc": "get extensible enum", "accessibility": "public", "parameters": [ { - "$id": "1325", + "$id": "1319", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19525,7 +19438,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getUnknownValue.accept", "methodParameterSegments": [ { - "$id": "1326", + "$id": "1320", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19574,7 +19487,7 @@ }, "parameters": [ { - "$ref": "1326" + "$ref": "1320" } ], "response": { @@ -19588,7 +19501,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getUnknownValue" }, { - "$id": "1327", + "$id": "1321", "kind": "basic", "name": "internalProtocol", "isExactName": false, @@ -19599,14 +19512,14 @@ ], "doc": "When set protocol false and convenient true, then the protocol method should be internal", "operation": { - "$id": "1328", + "$id": "1322", "name": "internalProtocol", "isExactName": false, "doc": "When set protocol false and convenient true, then the protocol method should be internal", "accessibility": "public", "parameters": [ { - "$id": "1329", + "$id": "1323", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -19623,7 +19536,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol.contentType", "methodParameterSegments": [ { - "$id": "1330", + "$id": "1324", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -19645,7 +19558,7 @@ "isExactName": false }, { - "$id": "1331", + "$id": "1325", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19661,7 +19574,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol.accept", "methodParameterSegments": [ { - "$id": "1332", + "$id": "1326", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19682,12 +19595,12 @@ "isExactName": false }, { - "$id": "1333", + "$id": "1327", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "478" + "$ref": "474" }, "isApiVersion": false, "contentTypes": [ @@ -19701,12 +19614,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol.body", "methodParameterSegments": [ { - "$id": "1334", + "$id": "1328", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "478" + "$ref": "474" }, "location": "Body", "isApiVersion": false, @@ -19733,7 +19646,7 @@ 200 ], "bodyType": { - "$ref": "478" + "$ref": "474" }, "headers": [], "isErrorResponse": false, @@ -19762,18 +19675,18 @@ }, "parameters": [ { - "$ref": "1334" + "$ref": "1328" }, { - "$ref": "1330" + "$ref": "1324" }, { - "$ref": "1332" + "$ref": "1326" } ], "response": { "type": { - "$ref": "478" + "$ref": "474" } }, "isOverride": false, @@ -19782,7 +19695,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol" }, { - "$id": "1335", + "$id": "1329", "kind": "basic", "name": "stillConvenient", "isExactName": false, @@ -19793,7 +19706,7 @@ ], "doc": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "operation": { - "$id": "1336", + "$id": "1330", "name": "stillConvenient", "isExactName": false, "doc": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", @@ -19827,7 +19740,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.stillConvenient" }, { - "$id": "1337", + "$id": "1331", "kind": "basic", "name": "headAsBoolean", "isExactName": false, @@ -19838,19 +19751,19 @@ ], "doc": "Check whether a resource exists: return true for success, false for 404, and throw for unexpected responses.", "operation": { - "$id": "1338", + "$id": "1332", "name": "headAsBoolean", "isExactName": false, "doc": "Check whether a resource exists: return true for success, false for 404, and throw for unexpected responses.", "accessibility": "public", "parameters": [ { - "$id": "1339", + "$id": "1333", "kind": "path", "name": "id", "serializedName": "id", "type": { - "$id": "1340", + "$id": "1334", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19868,12 +19781,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.headAsBoolean.id", "methodParameterSegments": [ { - "$id": "1341", + "$id": "1335", "kind": "method", "name": "id", "serializedName": "id", "type": { - "$id": "1342", + "$id": "1336", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19924,12 +19837,12 @@ }, "parameters": [ { - "$ref": "1341" + "$ref": "1335" } ], "response": { "type": { - "$id": "1343", + "$id": "1337", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -19942,7 +19855,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.headAsBoolean" }, { - "$id": "1344", + "$id": "1338", "kind": "basic", "name": "WithApiVersion", "isExactName": false, @@ -19953,19 +19866,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "1345", + "$id": "1339", "name": "WithApiVersion", "isExactName": false, "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "1346", + "$id": "1340", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "1347", + "$id": "1341", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19980,12 +19893,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.WithApiVersion.p1", "methodParameterSegments": [ { - "$id": "1348", + "$id": "1342", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "1349", + "$id": "1343", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20005,12 +19918,12 @@ "isExactName": false }, { - "$id": "1350", + "$id": "1344", "kind": "query", "name": "apiVersion", "serializedName": "apiVersion", "type": { - "$id": "1351", + "$id": "1345", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20020,7 +19933,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1352", + "$id": "1346", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -20034,12 +19947,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1353", + "$id": "1347", "kind": "method", "name": "apiVersion", "serializedName": "apiVersion", "type": { - "$id": "1354", + "$id": "1348", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20049,7 +19962,7 @@ "isApiVersion": true, "defaultValue": { "type": { - "$id": "1355", + "$id": "1349", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -20090,7 +20003,7 @@ }, "parameters": [ { - "$ref": "1348" + "$ref": "1342" } ], "response": {}, @@ -20100,7 +20013,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.WithApiVersion" }, { - "$id": "1356", + "$id": "1350", "kind": "paging", "name": "ListWithNextLink", "isExactName": false, @@ -20111,14 +20024,14 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "1357", + "$id": "1351", "name": "ListWithNextLink", "isExactName": false, "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "1358", + "$id": "1352", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -20134,7 +20047,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithNextLink.accept", "methodParameterSegments": [ { - "$id": "1359", + "$id": "1353", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -20161,7 +20074,7 @@ 200 ], "bodyType": { - "$ref": "576" + "$ref": "572" }, "headers": [], "isErrorResponse": false, @@ -20187,12 +20100,12 @@ }, "parameters": [ { - "$ref": "1359" + "$ref": "1353" } ], "response": { "type": { - "$ref": "578" + "$ref": "574" }, "resultSegments": [ "things" @@ -20217,7 +20130,7 @@ } }, { - "$id": "1360", + "$id": "1354", "kind": "paging", "name": "ListWithStringNextLink", "isExactName": false, @@ -20228,14 +20141,14 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "1361", + "$id": "1355", "name": "ListWithStringNextLink", "isExactName": false, "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "1362", + "$id": "1356", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -20251,7 +20164,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithStringNextLink.accept", "methodParameterSegments": [ { - "$id": "1363", + "$id": "1357", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -20278,7 +20191,7 @@ 200 ], "bodyType": { - "$ref": "581" + "$ref": "577" }, "headers": [], "isErrorResponse": false, @@ -20304,12 +20217,12 @@ }, "parameters": [ { - "$ref": "1363" + "$ref": "1357" } ], "response": { "type": { - "$ref": "578" + "$ref": "574" }, "resultSegments": [ "things" @@ -20334,7 +20247,7 @@ } }, { - "$id": "1364", + "$id": "1358", "kind": "paging", "name": "ListWithContinuationToken", "isExactName": false, @@ -20345,19 +20258,19 @@ ], "doc": "List things with continuation token", "operation": { - "$id": "1365", + "$id": "1359", "name": "ListWithContinuationToken", "isExactName": false, "doc": "List things with continuation token", "accessibility": "public", "parameters": [ { - "$id": "1366", + "$id": "1360", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "1367", + "$id": "1361", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20372,12 +20285,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1368", + "$id": "1362", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "1369", + "$id": "1363", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20398,7 +20311,7 @@ "isContinuationToken": true }, { - "$id": "1370", + "$id": "1364", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -20414,7 +20327,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithContinuationToken.accept", "methodParameterSegments": [ { - "$id": "1371", + "$id": "1365", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -20441,7 +20354,7 @@ 200 ], "bodyType": { - "$ref": "585" + "$ref": "581" }, "headers": [], "isErrorResponse": false, @@ -20467,15 +20380,15 @@ }, "parameters": [ { - "$ref": "1368" + "$ref": "1362" }, { - "$ref": "1371" + "$ref": "1365" } ], "response": { "type": { - "$ref": "578" + "$ref": "574" }, "resultSegments": [ "things" @@ -20491,7 +20404,7 @@ ], "continuationToken": { "parameter": { - "$ref": "1366" + "$ref": "1360" }, "responseSegments": [ "nextToken" @@ -20502,7 +20415,7 @@ } }, { - "$id": "1372", + "$id": "1366", "kind": "paging", "name": "ListWithContinuationTokenHeaderResponse", "isExactName": false, @@ -20513,19 +20426,19 @@ ], "doc": "List things with continuation token header response", "operation": { - "$id": "1373", + "$id": "1367", "name": "ListWithContinuationTokenHeaderResponse", "isExactName": false, "doc": "List things with continuation token header response", "accessibility": "public", "parameters": [ { - "$id": "1374", + "$id": "1368", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "1375", + "$id": "1369", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20540,12 +20453,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1376", + "$id": "1370", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "1377", + "$id": "1371", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20566,7 +20479,7 @@ "isContinuationToken": true }, { - "$id": "1378", + "$id": "1372", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -20582,7 +20495,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithContinuationTokenHeaderResponse.accept", "methodParameterSegments": [ { - "$id": "1379", + "$id": "1373", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -20609,14 +20522,14 @@ 200 ], "bodyType": { - "$ref": "589" + "$ref": "585" }, "headers": [ { "name": "nextToken", "nameInResponse": "next-token", "type": { - "$id": "1380", + "$id": "1374", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20647,15 +20560,15 @@ }, "parameters": [ { - "$ref": "1376" + "$ref": "1370" }, { - "$ref": "1379" + "$ref": "1373" } ], "response": { "type": { - "$ref": "578" + "$ref": "574" }, "resultSegments": [ "things" @@ -20671,7 +20584,7 @@ ], "continuationToken": { "parameter": { - "$ref": "1374" + "$ref": "1368" }, "responseSegments": [ "next-token" @@ -20682,7 +20595,7 @@ } }, { - "$id": "1381", + "$id": "1375", "kind": "paging", "name": "ListWithPaging", "isExactName": false, @@ -20693,14 +20606,14 @@ ], "doc": "List things with paging", "operation": { - "$id": "1382", + "$id": "1376", "name": "ListWithPaging", "isExactName": false, "doc": "List things with paging", "accessibility": "public", "parameters": [ { - "$id": "1383", + "$id": "1377", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -20716,7 +20629,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithPaging.accept", "methodParameterSegments": [ { - "$id": "1384", + "$id": "1378", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -20743,7 +20656,7 @@ 200 ], "bodyType": { - "$ref": "591" + "$ref": "587" }, "headers": [], "isErrorResponse": false, @@ -20769,12 +20682,12 @@ }, "parameters": [ { - "$ref": "1384" + "$ref": "1378" } ], "response": { "type": { - "$ref": "578" + "$ref": "574" }, "resultSegments": [ "items" @@ -20792,7 +20705,7 @@ } }, { - "$id": "1385", + "$id": "1379", "kind": "basic", "name": "EmbeddedParameters", "isExactName": false, @@ -20803,20 +20716,20 @@ ], "doc": "An operation with embedded parameters within the body", "operation": { - "$id": "1386", + "$id": "1380", "name": "EmbeddedParameters", "isExactName": false, "doc": "An operation with embedded parameters within the body", "accessibility": "public", "parameters": [ { - "$id": "1387", + "$id": "1381", "kind": "header", "name": "requiredHeader", "serializedName": "required-header", "doc": "required header parameter", "type": { - "$id": "1388", + "$id": "1382", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20831,12 +20744,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ModelWithEmbeddedNonBodyParameters.requiredHeader", "methodParameterSegments": [ { - "$id": "1389", + "$id": "1383", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "593" + "$ref": "589" }, "location": "Body", "isApiVersion": false, @@ -20849,13 +20762,13 @@ "isExactName": false }, { - "$id": "1390", + "$id": "1384", "kind": "method", "name": "requiredHeader", "serializedName": "requiredHeader", "doc": "required header parameter", "type": { - "$ref": "597" + "$ref": "593" }, "location": "", "isApiVersion": false, @@ -20871,13 +20784,13 @@ "isExactName": false }, { - "$id": "1391", + "$id": "1385", "kind": "header", "name": "optionalHeader", "serializedName": "optional-header", "doc": "optional header parameter", "type": { - "$id": "1392", + "$id": "1386", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20892,16 +20805,16 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ModelWithEmbeddedNonBodyParameters.optionalHeader", "methodParameterSegments": [ { - "$ref": "1389" + "$ref": "1383" }, { - "$id": "1393", + "$id": "1387", "kind": "method", "name": "optionalHeader", "serializedName": "optionalHeader", "doc": "optional header parameter", "type": { - "$ref": "599" + "$ref": "595" }, "location": "", "isApiVersion": false, @@ -20917,13 +20830,13 @@ "isExactName": false }, { - "$id": "1394", + "$id": "1388", "kind": "query", "name": "requiredQuery", "serializedName": "requiredQuery", "doc": "required query parameter", "type": { - "$id": "1395", + "$id": "1389", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20938,16 +20851,16 @@ "readOnly": false, "methodParameterSegments": [ { - "$ref": "1389" + "$ref": "1383" }, { - "$id": "1396", + "$id": "1390", "kind": "method", "name": "requiredQuery", "serializedName": "requiredQuery", "doc": "required query parameter", "type": { - "$ref": "601" + "$ref": "597" }, "location": "", "isApiVersion": false, @@ -20963,13 +20876,13 @@ "isExactName": false }, { - "$id": "1397", + "$id": "1391", "kind": "query", "name": "optionalQuery", "serializedName": "optionalQuery", "doc": "optional query parameter", "type": { - "$id": "1398", + "$id": "1392", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20984,16 +20897,16 @@ "readOnly": false, "methodParameterSegments": [ { - "$ref": "1389" + "$ref": "1383" }, { - "$id": "1399", + "$id": "1393", "kind": "method", "name": "optionalQuery", "serializedName": "optionalQuery", "doc": "optional query parameter", "type": { - "$ref": "603" + "$ref": "599" }, "location": "", "isApiVersion": false, @@ -21009,7 +20922,7 @@ "isExactName": false }, { - "$id": "1400", + "$id": "1394", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -21026,7 +20939,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.EmbeddedParameters.contentType", "methodParameterSegments": [ { - "$id": "1401", + "$id": "1395", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -21048,12 +20961,12 @@ "isExactName": false }, { - "$id": "1402", + "$id": "1396", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "593" + "$ref": "589" }, "isApiVersion": false, "contentTypes": [ @@ -21067,7 +20980,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.EmbeddedParameters.body", "methodParameterSegments": [ { - "$ref": "1389" + "$ref": "1383" } ], "isExactName": false, @@ -21103,10 +21016,10 @@ }, "parameters": [ { - "$ref": "1389" + "$ref": "1383" }, { - "$ref": "1401" + "$ref": "1395" } ], "response": {}, @@ -21116,7 +21029,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.EmbeddedParameters" }, { - "$id": "1403", + "$id": "1397", "kind": "basic", "name": "DynamicModelOperation", "isExactName": false, @@ -21127,14 +21040,14 @@ ], "doc": "An operation with a dynamic model", "operation": { - "$id": "1404", + "$id": "1398", "name": "DynamicModelOperation", "isExactName": false, "doc": "An operation with a dynamic model", "accessibility": "public", "parameters": [ { - "$id": "1405", + "$id": "1399", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -21151,7 +21064,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DynamicModelOperation.contentType", "methodParameterSegments": [ { - "$id": "1406", + "$id": "1400", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -21173,12 +21086,12 @@ "isExactName": false }, { - "$id": "1407", + "$id": "1401", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "604" + "$ref": "600" }, "isApiVersion": false, "contentTypes": [ @@ -21192,12 +21105,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DynamicModelOperation.body", "methodParameterSegments": [ { - "$id": "1408", + "$id": "1402", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "604" + "$ref": "600" }, "location": "Body", "isApiVersion": false, @@ -21249,10 +21162,10 @@ }, "parameters": [ { - "$ref": "1408" + "$ref": "1402" }, { - "$ref": "1406" + "$ref": "1400" } ], "response": {}, @@ -21262,7 +21175,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DynamicModelOperation" }, { - "$id": "1409", + "$id": "1403", "kind": "basic", "name": "GetXmlAdvancedModel", "isExactName": false, @@ -21273,14 +21186,14 @@ ], "doc": "Get an advanced XML model with various property types", "operation": { - "$id": "1410", + "$id": "1404", "name": "GetXmlAdvancedModel", "isExactName": false, "doc": "Get an advanced XML model with various property types", "accessibility": "public", "parameters": [ { - "$id": "1411", + "$id": "1405", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -21296,7 +21209,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.GetXmlAdvancedModel.accept", "methodParameterSegments": [ { - "$id": "1412", + "$id": "1406", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -21323,7 +21236,7 @@ 200 ], "bodyType": { - "$ref": "642" + "$ref": "638" }, "headers": [ { @@ -21357,12 +21270,12 @@ }, "parameters": [ { - "$ref": "1412" + "$ref": "1406" } ], "response": { "type": { - "$ref": "642" + "$ref": "638" } }, "isOverride": false, @@ -21371,7 +21284,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.GetXmlAdvancedModel" }, { - "$id": "1413", + "$id": "1407", "kind": "basic", "name": "UpdateXmlAdvancedModel", "isExactName": false, @@ -21382,14 +21295,14 @@ ], "doc": "Update an advanced XML model with various property types", "operation": { - "$id": "1414", + "$id": "1408", "name": "UpdateXmlAdvancedModel", "isExactName": false, "doc": "Update an advanced XML model with various property types", "accessibility": "public", "parameters": [ { - "$id": "1415", + "$id": "1409", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -21405,7 +21318,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UpdateXmlAdvancedModel.contentType", "methodParameterSegments": [ { - "$id": "1416", + "$id": "1410", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -21426,7 +21339,7 @@ "isExactName": false }, { - "$id": "1417", + "$id": "1411", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -21442,7 +21355,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UpdateXmlAdvancedModel.accept", "methodParameterSegments": [ { - "$id": "1418", + "$id": "1412", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -21463,12 +21376,12 @@ "isExactName": false }, { - "$id": "1419", + "$id": "1413", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "642" + "$ref": "638" }, "isApiVersion": false, "contentTypes": [ @@ -21482,12 +21395,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UpdateXmlAdvancedModel.body", "methodParameterSegments": [ { - "$id": "1420", + "$id": "1414", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "642" + "$ref": "638" }, "location": "Body", "isApiVersion": false, @@ -21514,7 +21427,7 @@ 200 ], "bodyType": { - "$ref": "642" + "$ref": "638" }, "headers": [ { @@ -21551,18 +21464,18 @@ }, "parameters": [ { - "$ref": "1420" + "$ref": "1414" }, { - "$ref": "1416" + "$ref": "1410" }, { - "$ref": "1418" + "$ref": "1412" } ], "response": { "type": { - "$ref": "642" + "$ref": "638" } }, "isOverride": false, @@ -21571,7 +21484,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UpdateXmlAdvancedModel" }, { - "$id": "1421", + "$id": "1415", "kind": "basic", "name": "uploadCat", "isExactName": false, @@ -21581,13 +21494,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1422", + "$id": "1416", "name": "uploadCat", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1423", + "$id": "1417", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -21603,7 +21516,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.uploadCat.contentType", "methodParameterSegments": [ { - "$id": "1424", + "$id": "1418", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -21624,12 +21537,12 @@ "isExactName": false }, { - "$id": "1425", + "$id": "1419", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "738" + "$ref": "734" }, "isApiVersion": false, "contentTypes": [ @@ -21643,12 +21556,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.uploadCat.body", "methodParameterSegments": [ { - "$id": "1426", + "$id": "1420", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "738" + "$ref": "734" }, "location": "Body", "isApiVersion": false, @@ -21690,10 +21603,10 @@ }, "parameters": [ { - "$ref": "1424" + "$ref": "1418" }, { - "$ref": "1426" + "$ref": "1420" } ], "response": {}, @@ -21703,7 +21616,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.uploadCat" }, { - "$id": "1427", + "$id": "1421", "kind": "basic", "name": "sendJsonLines", "isExactName": false, @@ -21713,13 +21626,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1428", + "$id": "1422", "name": "sendJsonLines", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1429", + "$id": "1423", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -21735,16 +21648,16 @@ "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.contentType", "methodParameterSegments": [ { - "$id": "1430", + "$id": "1424", "kind": "method", "name": "stream", "serializedName": "stream", "type": { - "$id": "1431", + "$id": "1425", "kind": "streaming", "name": "JsonlStreamStreamingItem", "valueType": { - "$ref": "783" + "$ref": "779" }, "streamKind": "jsonl", "contentTypes": [ @@ -21763,7 +21676,7 @@ "isExactName": false }, { - "$id": "1432", + "$id": "1426", "kind": "method", "name": "contentType", "serializedName": "contentType", @@ -21784,16 +21697,16 @@ "isExactName": false }, { - "$id": "1433", + "$id": "1427", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$id": "1434", + "$id": "1428", "kind": "streaming", "name": "JsonlStreamStreamingItem", "valueType": { - "$ref": "783" + "$ref": "779" }, "streamKind": "jsonl", "contentTypes": [ @@ -21813,15 +21726,15 @@ "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.body", "methodParameterSegments": [ { - "$ref": "1430" + "$ref": "1424" }, { - "$id": "1435", + "$id": "1429", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1157" + "$ref": "1151" }, "location": "", "isApiVersion": false, @@ -21867,7 +21780,7 @@ }, "parameters": [ { - "$ref": "1430" + "$ref": "1424" } ], "response": {}, @@ -21877,7 +21790,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sendJsonLines" }, { - "$id": "1436", + "$id": "1430", "kind": "basic", "name": "receiveJsonLines", "isExactName": false, @@ -21887,13 +21800,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1437", + "$id": "1431", "name": "receiveJsonLines", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1438", + "$id": "1432", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -21909,7 +21822,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveJsonLines.accept", "methodParameterSegments": [ { - "$id": "1439", + "$id": "1433", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -21936,11 +21849,11 @@ 200 ], "bodyType": { - "$id": "1440", + "$id": "1434", "kind": "streaming", "name": "JsonlStreamStreamingItem", "valueType": { - "$ref": "783" + "$ref": "779" }, "streamKind": "jsonl", "contentTypes": [ @@ -21980,16 +21893,16 @@ }, "parameters": [ { - "$ref": "1439" + "$ref": "1433" } ], "response": { "type": { - "$id": "1441", + "$id": "1435", "kind": "streaming", "name": "JsonlStreamStreamingItem", "valueType": { - "$ref": "783" + "$ref": "779" }, "streamKind": "jsonl", "contentTypes": [ @@ -22004,7 +21917,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveJsonLines" }, { - "$id": "1442", + "$id": "1436", "kind": "basic", "name": "receiveSse", "isExactName": false, @@ -22014,13 +21927,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1443", + "$id": "1437", "name": "receiveSse", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1444", + "$id": "1438", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -22036,7 +21949,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveSse.accept", "methodParameterSegments": [ { - "$id": "1445", + "$id": "1439", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -22063,16 +21976,16 @@ 200 ], "bodyType": { - "$id": "1446", + "$id": "1440", "kind": "streaming", "name": "SSEStreamSampleEvents", "valueType": { - "$id": "1447", + "$id": "1441", "kind": "union", "name": "SampleEvents", "variantTypes": [ { - "$ref": "783" + "$ref": "779" }, { "$ref": "238" @@ -22117,16 +22030,16 @@ }, "parameters": [ { - "$ref": "1445" + "$ref": "1439" } ], "response": { "type": { - "$id": "1448", + "$id": "1442", "kind": "streaming", "name": "SSEStreamSampleEvents", "valueType": { - "$ref": "1447" + "$ref": "1441" }, "streamKind": "sse", "contentTypes": [ @@ -22142,7 +22055,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveSse" }, { - "$id": "1449", + "$id": "1443", "kind": "basic", "name": "receiveResponseEvents", "isExactName": false, @@ -22152,13 +22065,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1450", + "$id": "1444", "name": "receiveResponseEvents", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1451", + "$id": "1445", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -22174,7 +22087,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveResponseEvents.accept", "methodParameterSegments": [ { - "$id": "1452", + "$id": "1446", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -22201,33 +22114,33 @@ 200 ], "bodyType": { - "$id": "1453", + "$id": "1447", "kind": "streaming", "name": "SSEStreamResponseStreamEvents", "valueType": { - "$id": "1454", + "$id": "1448", "kind": "union", "name": "ResponseStreamEvents", "variantTypes": [ { - "$ref": "786" + "$ref": "782" }, { - "$ref": "792" + "$ref": "788" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "787" + "$ref": "783" }, "discriminatedSubtypes": { "response.created": { - "$ref": "786" + "$ref": "782" }, "response.output_text.delta": { - "$ref": "792" + "$ref": "788" } } }, @@ -22265,16 +22178,16 @@ }, "parameters": [ { - "$ref": "1452" + "$ref": "1446" } ], "response": { "type": { - "$id": "1455", + "$id": "1449", "kind": "streaming", "name": "SSEStreamResponseStreamEvents", "valueType": { - "$ref": "1454" + "$ref": "1448" }, "streamKind": "sse", "contentTypes": [ @@ -22289,7 +22202,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveResponseEvents" }, { - "$id": "1456", + "$id": "1450", "kind": "basic", "name": "receiveExperimentalJsonLines", "isExactName": false, @@ -22299,13 +22212,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1457", + "$id": "1451", "name": "receiveExperimentalJsonLines", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1458", + "$id": "1452", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -22321,7 +22234,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveExperimentalJsonLines.accept", "methodParameterSegments": [ { - "$id": "1459", + "$id": "1453", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -22348,11 +22261,11 @@ 200 ], "bodyType": { - "$id": "1460", + "$id": "1454", "kind": "streaming", "name": "JsonlStreamPreviewDetails", "valueType": { - "$ref": "795" + "$ref": "791" }, "streamKind": "jsonl", "contentTypes": [ @@ -22392,16 +22305,16 @@ }, "parameters": [ { - "$ref": "1459" + "$ref": "1453" } ], "response": { "type": { - "$id": "1461", + "$id": "1455", "kind": "streaming", "name": "JsonlStreamPreviewDetails", "valueType": { - "$ref": "795" + "$ref": "791" }, "streamKind": "jsonl", "contentTypes": [ @@ -22416,7 +22329,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.receiveExperimentalJsonLines" }, { - "$id": "1462", + "$id": "1456", "kind": "basic", "name": "getAcronymParameters", "isExactName": false, @@ -22427,19 +22340,19 @@ ], "doc": "Send acronym-named path, query, and header parameters.", "operation": { - "$id": "1463", + "$id": "1457", "name": "getAcronymParameters", "isExactName": false, "doc": "Send acronym-named path, query, and header parameters.", "accessibility": "public", "parameters": [ { - "$id": "1464", + "$id": "1458", "kind": "path", "name": "targetDbName", "serializedName": "targetDbName", "type": { - "$id": "1465", + "$id": "1459", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22457,12 +22370,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getAcronymParameters.targetDbName", "methodParameterSegments": [ { - "$id": "1466", + "$id": "1460", "kind": "method", "name": "targetDbName", "serializedName": "targetDbName", "type": { - "$id": "1467", + "$id": "1461", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22482,12 +22395,12 @@ "isExactName": false }, { - "$id": "1468", + "$id": "1462", "kind": "query", "name": "sourceIpAddress", "serializedName": "sourceIpAddress", "type": { - "$id": "1469", + "$id": "1463", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22502,12 +22415,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1470", + "$id": "1464", "kind": "method", "name": "sourceIpAddress", "serializedName": "sourceIpAddress", "type": { - "$id": "1471", + "$id": "1465", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22527,12 +22440,12 @@ "isExactName": false }, { - "$id": "1472", + "$id": "1466", "kind": "header", "name": "guestOsType", "serializedName": "X-Guest-OS-Type", "type": { - "$id": "1473", + "$id": "1467", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22547,12 +22460,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getAcronymParameters.guestOsType", "methodParameterSegments": [ { - "$id": "1474", + "$id": "1468", "kind": "method", "name": "guestOsType", "serializedName": "X-Guest-OS-Type", "type": { - "$id": "1475", + "$id": "1469", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22594,13 +22507,13 @@ }, "parameters": [ { - "$ref": "1466" + "$ref": "1460" }, { - "$ref": "1470" + "$ref": "1464" }, { - "$ref": "1474" + "$ref": "1468" } ], "response": {}, @@ -22610,7 +22523,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getAcronymParameters" }, { - "$id": "1476", + "$id": "1470", "kind": "basic", "name": "setAcronymAddresses", "isExactName": false, @@ -22621,19 +22534,19 @@ ], "doc": "Send parameters with leading IP version acronyms.", "operation": { - "$id": "1477", + "$id": "1471", "name": "setAcronymAddresses", "isExactName": false, "doc": "Send parameters with leading IP version acronyms.", "accessibility": "public", "parameters": [ { - "$id": "1478", + "$id": "1472", "kind": "query", "name": "ipV4Address", "serializedName": "ipV4Address", "type": { - "$id": "1479", + "$id": "1473", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22648,12 +22561,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1480", + "$id": "1474", "kind": "method", "name": "ipV4Address", "serializedName": "ipV4Address", "type": { - "$id": "1481", + "$id": "1475", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22673,12 +22586,12 @@ "isExactName": false }, { - "$id": "1482", + "$id": "1476", "kind": "query", "name": "ipV6Address", "serializedName": "ipV6Address", "type": { - "$id": "1483", + "$id": "1477", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22693,12 +22606,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "1484", + "$id": "1478", "kind": "method", "name": "ipV6Address", "serializedName": "ipV6Address", "type": { - "$id": "1485", + "$id": "1479", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22740,10 +22653,10 @@ }, "parameters": [ { - "$ref": "1480" + "$ref": "1474" }, { - "$ref": "1484" + "$ref": "1478" } ], "response": {}, @@ -22755,12 +22668,12 @@ ], "parameters": [ { - "$id": "1486", + "$id": "1480", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1487", + "$id": "1481", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -22776,7 +22689,7 @@ "isExactName": false }, { - "$ref": "1353" + "$ref": "1347" } ], "initializedBy": 1, @@ -22788,14 +22701,14 @@ ], "children": [ { - "$id": "1488", + "$id": "1482", "kind": "client", "name": "ExperimentalSamples", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1489", + "$id": "1483", "kind": "basic", "name": "read", "isExactName": false, @@ -22805,13 +22718,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1490", + "$id": "1484", "name": "read", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1491", + "$id": "1485", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -22827,7 +22740,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ExperimentalSamples.read.accept", "methodParameterSegments": [ { - "$id": "1492", + "$id": "1486", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -22854,7 +22767,7 @@ 200 ], "bodyType": { - "$ref": "797" + "$ref": "793" }, "headers": [], "isErrorResponse": false, @@ -22880,12 +22793,12 @@ }, "parameters": [ { - "$ref": "1492" + "$ref": "1486" } ], "response": { "type": { - "$ref": "797" + "$ref": "793" } }, "isOverride": false, @@ -22894,7 +22807,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ExperimentalSamples.read" }, { - "$id": "1493", + "$id": "1487", "kind": "paging", "name": "list", "isExactName": false, @@ -22904,13 +22817,13 @@ "2024-08-16-preview" ], "operation": { - "$id": "1494", + "$id": "1488", "name": "list", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1495", + "$id": "1489", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -22926,7 +22839,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ExperimentalSamples.list.accept", "methodParameterSegments": [ { - "$id": "1496", + "$id": "1490", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -22953,7 +22866,7 @@ 200 ], "bodyType": { - "$ref": "800" + "$ref": "796" }, "headers": [], "isErrorResponse": false, @@ -22979,12 +22892,12 @@ }, "parameters": [ { - "$ref": "1496" + "$ref": "1490" } ], "response": { "type": { - "$ref": "802" + "$ref": "798" }, "resultSegments": [ "items" @@ -23004,12 +22917,12 @@ ], "parameters": [ { - "$id": "1497", + "$id": "1491", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1498", + "$id": "1492", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -23033,7 +22946,7 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1158" + "$ref": "1152" }, "isMultiServiceClient": false, "experimental": { @@ -23042,14 +22955,14 @@ } }, { - "$id": "1499", + "$id": "1493", "kind": "client", "name": "AnimalOperations", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1500", + "$id": "1494", "kind": "basic", "name": "updatePetAsAnimal", "isExactName": false, @@ -23060,14 +22973,14 @@ ], "doc": "Update a pet as an animal", "operation": { - "$id": "1501", + "$id": "1495", "name": "updatePetAsAnimal", "isExactName": false, "doc": "Update a pet as an animal", "accessibility": "public", "parameters": [ { - "$id": "1502", + "$id": "1496", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -23084,7 +22997,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal.contentType", "methodParameterSegments": [ { - "$id": "1503", + "$id": "1497", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -23106,7 +23019,7 @@ "isExactName": false }, { - "$id": "1504", + "$id": "1498", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -23122,7 +23035,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal.accept", "methodParameterSegments": [ { - "$id": "1505", + "$id": "1499", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -23143,12 +23056,12 @@ "isExactName": false }, { - "$id": "1506", + "$id": "1500", "kind": "body", "name": "animal", "serializedName": "animal", "type": { - "$ref": "803" + "$ref": "799" }, "isApiVersion": false, "contentTypes": [ @@ -23162,12 +23075,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal.animal", "methodParameterSegments": [ { - "$id": "1507", + "$id": "1501", "kind": "method", "name": "animal", "serializedName": "animal", "type": { - "$ref": "803" + "$ref": "799" }, "location": "Body", "isApiVersion": false, @@ -23194,7 +23107,7 @@ 200 ], "bodyType": { - "$ref": "803" + "$ref": "799" }, "headers": [], "isErrorResponse": false, @@ -23223,18 +23136,18 @@ }, "parameters": [ { - "$ref": "1507" + "$ref": "1501" }, { - "$ref": "1503" + "$ref": "1497" }, { - "$ref": "1505" + "$ref": "1499" } ], "response": { "type": { - "$ref": "803" + "$ref": "799" } }, "isOverride": false, @@ -23243,7 +23156,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal" }, { - "$id": "1508", + "$id": "1502", "kind": "basic", "name": "updateDogAsAnimal", "isExactName": false, @@ -23254,14 +23167,14 @@ ], "doc": "Update a dog as an animal", "operation": { - "$id": "1509", + "$id": "1503", "name": "updateDogAsAnimal", "isExactName": false, "doc": "Update a dog as an animal", "accessibility": "public", "parameters": [ { - "$id": "1510", + "$id": "1504", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -23278,7 +23191,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updateDogAsAnimal.contentType", "methodParameterSegments": [ { - "$id": "1511", + "$id": "1505", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -23300,7 +23213,7 @@ "isExactName": false }, { - "$id": "1512", + "$id": "1506", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -23316,7 +23229,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updateDogAsAnimal.accept", "methodParameterSegments": [ { - "$id": "1513", + "$id": "1507", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -23337,12 +23250,12 @@ "isExactName": false }, { - "$id": "1514", + "$id": "1508", "kind": "body", "name": "animal", "serializedName": "animal", "type": { - "$ref": "803" + "$ref": "799" }, "isApiVersion": false, "contentTypes": [ @@ -23356,12 +23269,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updateDogAsAnimal.animal", "methodParameterSegments": [ { - "$id": "1515", + "$id": "1509", "kind": "method", "name": "animal", "serializedName": "animal", "type": { - "$ref": "803" + "$ref": "799" }, "location": "Body", "isApiVersion": false, @@ -23388,7 +23301,7 @@ 200 ], "bodyType": { - "$ref": "803" + "$ref": "799" }, "headers": [], "isErrorResponse": false, @@ -23417,18 +23330,18 @@ }, "parameters": [ { - "$ref": "1515" + "$ref": "1509" }, { - "$ref": "1511" + "$ref": "1505" }, { - "$ref": "1513" + "$ref": "1507" } ], "response": { "type": { - "$ref": "803" + "$ref": "799" } }, "isOverride": false, @@ -23439,12 +23352,12 @@ ], "parameters": [ { - "$id": "1516", + "$id": "1510", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1517", + "$id": "1511", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -23468,19 +23381,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1158" + "$ref": "1152" }, "isMultiServiceClient": false }, { - "$id": "1518", + "$id": "1512", "kind": "client", "name": "PetOperations", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1519", + "$id": "1513", "kind": "basic", "name": "updatePetAsPet", "isExactName": false, @@ -23491,14 +23404,14 @@ ], "doc": "Update a pet as a pet", "operation": { - "$id": "1520", + "$id": "1514", "name": "updatePetAsPet", "isExactName": false, "doc": "Update a pet as a pet", "accessibility": "public", "parameters": [ { - "$id": "1521", + "$id": "1515", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -23515,7 +23428,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet.contentType", "methodParameterSegments": [ { - "$id": "1522", + "$id": "1516", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -23537,7 +23450,7 @@ "isExactName": false }, { - "$id": "1523", + "$id": "1517", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -23553,7 +23466,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet.accept", "methodParameterSegments": [ { - "$id": "1524", + "$id": "1518", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -23574,12 +23487,12 @@ "isExactName": false }, { - "$id": "1525", + "$id": "1519", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "808" + "$ref": "804" }, "isApiVersion": false, "contentTypes": [ @@ -23593,12 +23506,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet.pet", "methodParameterSegments": [ { - "$id": "1526", + "$id": "1520", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "808" + "$ref": "804" }, "location": "Body", "isApiVersion": false, @@ -23625,7 +23538,7 @@ 200 ], "bodyType": { - "$ref": "808" + "$ref": "804" }, "headers": [], "isErrorResponse": false, @@ -23654,18 +23567,18 @@ }, "parameters": [ { - "$ref": "1526" + "$ref": "1520" }, { - "$ref": "1522" + "$ref": "1516" }, { - "$ref": "1524" + "$ref": "1518" } ], "response": { "type": { - "$ref": "808" + "$ref": "804" } }, "isOverride": false, @@ -23674,7 +23587,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet" }, { - "$id": "1527", + "$id": "1521", "kind": "basic", "name": "updateDogAsPet", "isExactName": false, @@ -23685,14 +23598,14 @@ ], "doc": "Update a dog as a pet", "operation": { - "$id": "1528", + "$id": "1522", "name": "updateDogAsPet", "isExactName": false, "doc": "Update a dog as a pet", "accessibility": "public", "parameters": [ { - "$id": "1529", + "$id": "1523", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -23709,7 +23622,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updateDogAsPet.contentType", "methodParameterSegments": [ { - "$id": "1530", + "$id": "1524", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -23731,7 +23644,7 @@ "isExactName": false }, { - "$id": "1531", + "$id": "1525", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -23747,7 +23660,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updateDogAsPet.accept", "methodParameterSegments": [ { - "$id": "1532", + "$id": "1526", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -23768,12 +23681,12 @@ "isExactName": false }, { - "$id": "1533", + "$id": "1527", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "808" + "$ref": "804" }, "isApiVersion": false, "contentTypes": [ @@ -23787,12 +23700,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updateDogAsPet.pet", "methodParameterSegments": [ { - "$id": "1534", + "$id": "1528", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "808" + "$ref": "804" }, "location": "Body", "isApiVersion": false, @@ -23819,7 +23732,7 @@ 200 ], "bodyType": { - "$ref": "808" + "$ref": "804" }, "headers": [], "isErrorResponse": false, @@ -23848,18 +23761,18 @@ }, "parameters": [ { - "$ref": "1534" + "$ref": "1528" }, { - "$ref": "1530" + "$ref": "1524" }, { - "$ref": "1532" + "$ref": "1526" } ], "response": { "type": { - "$ref": "808" + "$ref": "804" } }, "isOverride": false, @@ -23870,12 +23783,12 @@ ], "parameters": [ { - "$id": "1535", + "$id": "1529", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1536", + "$id": "1530", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -23899,19 +23812,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1158" + "$ref": "1152" }, "isMultiServiceClient": false }, { - "$id": "1537", + "$id": "1531", "kind": "client", "name": "DogOperations", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1538", + "$id": "1532", "kind": "basic", "name": "updateDogAsDog", "isExactName": false, @@ -23922,14 +23835,14 @@ ], "doc": "Update a dog as a dog", "operation": { - "$id": "1539", + "$id": "1533", "name": "updateDogAsDog", "isExactName": false, "doc": "Update a dog as a dog", "accessibility": "public", "parameters": [ { - "$id": "1540", + "$id": "1534", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -23946,7 +23859,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DogOperations.updateDogAsDog.contentType", "methodParameterSegments": [ { - "$id": "1541", + "$id": "1535", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -23968,7 +23881,7 @@ "isExactName": false }, { - "$id": "1542", + "$id": "1536", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -23984,7 +23897,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DogOperations.updateDogAsDog.accept", "methodParameterSegments": [ { - "$id": "1543", + "$id": "1537", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -24005,12 +23918,12 @@ "isExactName": false }, { - "$id": "1544", + "$id": "1538", "kind": "body", "name": "dog", "serializedName": "dog", "type": { - "$ref": "812" + "$ref": "808" }, "isApiVersion": false, "contentTypes": [ @@ -24024,12 +23937,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DogOperations.updateDogAsDog.dog", "methodParameterSegments": [ { - "$id": "1545", + "$id": "1539", "kind": "method", "name": "dog", "serializedName": "dog", "type": { - "$ref": "812" + "$ref": "808" }, "location": "Body", "isApiVersion": false, @@ -24056,7 +23969,7 @@ 200 ], "bodyType": { - "$ref": "812" + "$ref": "808" }, "headers": [], "isErrorResponse": false, @@ -24085,18 +23998,18 @@ }, "parameters": [ { - "$ref": "1545" + "$ref": "1539" }, { - "$ref": "1541" + "$ref": "1535" }, { - "$ref": "1543" + "$ref": "1537" } ], "response": { "type": { - "$ref": "812" + "$ref": "808" } }, "isOverride": false, @@ -24107,12 +24020,12 @@ ], "parameters": [ { - "$id": "1546", + "$id": "1540", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1547", + "$id": "1541", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -24136,19 +24049,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1158" + "$ref": "1152" }, "isMultiServiceClient": false }, { - "$id": "1548", + "$id": "1542", "kind": "client", "name": "PlantOperations", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1549", + "$id": "1543", "kind": "basic", "name": "getTree", "isExactName": false, @@ -24159,14 +24072,14 @@ ], "doc": "Get a tree as a plant", "operation": { - "$id": "1550", + "$id": "1544", "name": "getTree", "isExactName": false, "doc": "Get a tree as a plant", "accessibility": "public", "parameters": [ { - "$id": "1551", + "$id": "1545", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -24182,7 +24095,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTree.accept", "methodParameterSegments": [ { - "$id": "1552", + "$id": "1546", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -24209,7 +24122,7 @@ 200 ], "bodyType": { - "$ref": "816" + "$ref": "812" }, "headers": [ { @@ -24243,12 +24156,12 @@ }, "parameters": [ { - "$ref": "1552" + "$ref": "1546" } ], "response": { "type": { - "$ref": "816" + "$ref": "812" } }, "isOverride": false, @@ -24257,7 +24170,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTree" }, { - "$id": "1553", + "$id": "1547", "kind": "basic", "name": "getTreeAsJson", "isExactName": false, @@ -24268,14 +24181,14 @@ ], "doc": "Get a tree as a plant", "operation": { - "$id": "1554", + "$id": "1548", "name": "getTreeAsJson", "isExactName": false, "doc": "Get a tree as a plant", "accessibility": "public", "parameters": [ { - "$id": "1555", + "$id": "1549", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -24291,7 +24204,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeAsJson.accept", "methodParameterSegments": [ { - "$id": "1556", + "$id": "1550", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -24318,7 +24231,7 @@ 200 ], "bodyType": { - "$ref": "816" + "$ref": "812" }, "headers": [ { @@ -24352,12 +24265,12 @@ }, "parameters": [ { - "$ref": "1556" + "$ref": "1550" } ], "response": { "type": { - "$ref": "816" + "$ref": "812" } }, "isOverride": false, @@ -24366,7 +24279,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeAsJson" }, { - "$id": "1557", + "$id": "1551", "kind": "basic", "name": "updateTree", "isExactName": false, @@ -24377,14 +24290,14 @@ ], "doc": "Update a tree as a plant", "operation": { - "$id": "1558", + "$id": "1552", "name": "updateTree", "isExactName": false, "doc": "Update a tree as a plant", "accessibility": "public", "parameters": [ { - "$id": "1559", + "$id": "1553", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -24400,7 +24313,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTree.contentType", "methodParameterSegments": [ { - "$id": "1560", + "$id": "1554", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -24421,7 +24334,7 @@ "isExactName": false }, { - "$id": "1561", + "$id": "1555", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -24437,7 +24350,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTree.accept", "methodParameterSegments": [ { - "$id": "1562", + "$id": "1556", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -24458,12 +24371,12 @@ "isExactName": false }, { - "$id": "1563", + "$id": "1557", "kind": "body", "name": "tree", "serializedName": "tree", "type": { - "$ref": "816" + "$ref": "812" }, "isApiVersion": false, "contentTypes": [ @@ -24477,12 +24390,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTree.tree", "methodParameterSegments": [ { - "$id": "1564", + "$id": "1558", "kind": "method", "name": "tree", "serializedName": "tree", "type": { - "$ref": "816" + "$ref": "812" }, "location": "Body", "isApiVersion": false, @@ -24509,7 +24422,7 @@ 200 ], "bodyType": { - "$ref": "816" + "$ref": "812" }, "headers": [ { @@ -24546,18 +24459,18 @@ }, "parameters": [ { - "$ref": "1564" + "$ref": "1558" }, { - "$ref": "1560" + "$ref": "1554" }, { - "$ref": "1562" + "$ref": "1556" } ], "response": { "type": { - "$ref": "816" + "$ref": "812" } }, "isOverride": false, @@ -24566,7 +24479,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTree" }, { - "$id": "1565", + "$id": "1559", "kind": "basic", "name": "updateTreeAsJson", "isExactName": false, @@ -24577,14 +24490,14 @@ ], "doc": "Update a tree as a plant", "operation": { - "$id": "1566", + "$id": "1560", "name": "updateTreeAsJson", "isExactName": false, "doc": "Update a tree as a plant", "accessibility": "public", "parameters": [ { - "$id": "1567", + "$id": "1561", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -24600,7 +24513,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson.contentType", "methodParameterSegments": [ { - "$id": "1568", + "$id": "1562", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -24621,7 +24534,7 @@ "isExactName": false }, { - "$id": "1569", + "$id": "1563", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -24637,7 +24550,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson.accept", "methodParameterSegments": [ { - "$id": "1570", + "$id": "1564", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -24658,12 +24571,12 @@ "isExactName": false }, { - "$id": "1571", + "$id": "1565", "kind": "body", "name": "tree", "serializedName": "tree", "type": { - "$ref": "816" + "$ref": "812" }, "isApiVersion": false, "contentTypes": [ @@ -24677,12 +24590,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson.tree", "methodParameterSegments": [ { - "$id": "1572", + "$id": "1566", "kind": "method", "name": "tree", "serializedName": "tree", "type": { - "$ref": "816" + "$ref": "812" }, "location": "Body", "isApiVersion": false, @@ -24709,7 +24622,7 @@ 200 ], "bodyType": { - "$ref": "816" + "$ref": "812" }, "headers": [ { @@ -24746,143 +24659,34 @@ }, "parameters": [ { - "$ref": "1572" + "$ref": "1566" }, { - "$ref": "1568" + "$ref": "1562" }, { - "$ref": "1570" + "$ref": "1564" } ], "response": { "type": { - "$ref": "816" + "$ref": "812" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson" - }, - { - "$id": "1573", - "kind": "basic", - "name": "getTreeContainer", - "isExactName": false, - "accessibility": "public", - "apiVersions": [ - "2024-07-16-preview", - "2024-08-16-preview" - ], - "doc": "Get an XML-only container that nests a tree, which also supports JSON", - "operation": { - "$id": "1574", - "name": "getTreeContainer", - "isExactName": false, - "doc": "Get an XML-only container that nests a tree, which also supports JSON", - "accessibility": "public", - "parameters": [ - { - "$id": "1575", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "298" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeContainer.accept", - "methodParameterSegments": [ - { - "$id": "1576", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "298" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeContainer.accept", - "readOnly": false, - "access": "public", - "decorators": [], - "isExactName": false - } - ], - "isExactName": false - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "832" - }, - "headers": [ - { - "name": "contentType", - "nameInResponse": "content-type", - "type": { - "$ref": "300" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/xml" - ], - "serializationOptions": { - "xml": { - "name": "" - } - } - } - ], - "httpMethod": "GET", - "uri": "{sampleTypeSpecUrl}", - "path": "/plants/tree/container", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeContainer", - "decorators": [], - "namespace": "SampleTypeSpec" - }, - "parameters": [ - { - "$ref": "1576" - } - ], - "response": { - "type": { - "$ref": "832" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeContainer" } ], "parameters": [ { - "$id": "1577", + "$id": "1567", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1578", + "$id": "1568", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -24906,19 +24710,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1158" + "$ref": "1152" }, "isMultiServiceClient": false }, { - "$id": "1579", + "$id": "1569", "kind": "client", "name": "Metrics", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1580", + "$id": "1570", "kind": "basic", "name": "getWidgetMetrics", "isExactName": false, @@ -24929,19 +24733,19 @@ ], "doc": "Get Widget metrics for given day of week", "operation": { - "$id": "1581", + "$id": "1571", "name": "getWidgetMetrics", "isExactName": false, "doc": "Get Widget metrics for given day of week", "accessibility": "public", "parameters": [ { - "$id": "1582", + "$id": "1572", "kind": "path", "name": "metricsNamespace", "serializedName": "metricsNamespace", "type": { - "$id": "1583", + "$id": "1573", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24959,12 +24763,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Metrics.getWidgetMetrics.metricsNamespace", "methodParameterSegments": [ { - "$id": "1584", + "$id": "1574", "kind": "method", "name": "metricsNamespace", "serializedName": "metricsNamespace", "type": { - "$id": "1585", + "$id": "1575", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24984,7 +24788,7 @@ "isExactName": false }, { - "$id": "1586", + "$id": "1576", "kind": "path", "name": "day", "serializedName": "day", @@ -25003,7 +24807,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Metrics.getWidgetMetrics.day", "methodParameterSegments": [ { - "$id": "1587", + "$id": "1577", "kind": "method", "name": "day", "serializedName": "day", @@ -25024,12 +24828,12 @@ "isExactName": false }, { - "$id": "1588", + "$id": "1578", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "302" + "$ref": "298" }, "isApiVersion": false, "optional": false, @@ -25040,12 +24844,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Metrics.getWidgetMetrics.accept", "methodParameterSegments": [ { - "$id": "1589", + "$id": "1579", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "302" + "$ref": "298" }, "location": "Header", "isApiVersion": false, @@ -25067,7 +24871,7 @@ 200 ], "bodyType": { - "$ref": "834" + "$ref": "828" }, "headers": [], "isErrorResponse": false, @@ -25093,15 +24897,15 @@ }, "parameters": [ { - "$ref": "1587" + "$ref": "1577" }, { - "$ref": "1589" + "$ref": "1579" } ], "response": { "type": { - "$ref": "834" + "$ref": "828" } }, "isOverride": false, @@ -25112,12 +24916,12 @@ ], "parameters": [ { - "$id": "1590", + "$id": "1580", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1591", + "$id": "1581", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -25133,7 +24937,7 @@ "isExactName": false }, { - "$ref": "1584" + "$ref": "1574" } ], "initializedBy": 3, @@ -25144,19 +24948,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1158" + "$ref": "1152" }, "isMultiServiceClient": false }, { - "$id": "1592", + "$id": "1582", "kind": "client", "name": "Notebooks", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1593", + "$id": "1583", "kind": "basic", "name": "getNotebook", "isExactName": false, @@ -25167,19 +24971,19 @@ ], "doc": "Get a notebook by name", "operation": { - "$id": "1594", + "$id": "1584", "name": "getNotebook", "isExactName": false, "doc": "Get a notebook by name", "accessibility": "public", "parameters": [ { - "$id": "1595", + "$id": "1585", "kind": "path", "name": "notebookName", "serializedName": "notebookName", "type": { - "$id": "1596", + "$id": "1586", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25197,12 +25001,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Notebooks.getNotebook.notebookName", "methodParameterSegments": [ { - "$id": "1597", + "$id": "1587", "kind": "method", "name": "notebook", "serializedName": "notebook", "type": { - "$id": "1598", + "$id": "1588", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25223,12 +25027,12 @@ "isExactName": false }, { - "$id": "1599", + "$id": "1589", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "304" + "$ref": "300" }, "isApiVersion": false, "optional": false, @@ -25239,12 +25043,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Notebooks.getNotebook.accept", "methodParameterSegments": [ { - "$id": "1600", + "$id": "1590", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "304" + "$ref": "300" }, "location": "Header", "isApiVersion": false, @@ -25266,7 +25070,7 @@ 200 ], "bodyType": { - "$ref": "839" + "$ref": "833" }, "headers": [], "isErrorResponse": false, @@ -25292,12 +25096,12 @@ }, "parameters": [ { - "$ref": "1600" + "$ref": "1590" } ], "response": { "type": { - "$ref": "839" + "$ref": "833" } }, "isOverride": false, @@ -25308,12 +25112,12 @@ ], "parameters": [ { - "$id": "1601", + "$id": "1591", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1602", + "$id": "1592", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -25329,7 +25133,7 @@ "isExactName": false }, { - "$ref": "1597" + "$ref": "1587" } ], "initializedBy": 3, @@ -25340,19 +25144,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1158" + "$ref": "1152" }, "isMultiServiceClient": false }, { - "$id": "1603", + "$id": "1593", "kind": "client", "name": "UnionExtends", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1604", + "$id": "1594", "kind": "basic", "name": "echo", "isExactName": false, @@ -25362,19 +25166,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1605", + "$id": "1595", "name": "echo", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1606", + "$id": "1596", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "306" + "$ref": "302" }, "isApiVersion": false, "optional": false, @@ -25385,13 +25189,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echo.contentType", "methodParameterSegments": [ { - "$id": "1607", + "$id": "1597", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "306" + "$ref": "302" }, "location": "Header", "isApiVersion": false, @@ -25407,12 +25211,12 @@ "isExactName": false }, { - "$id": "1608", + "$id": "1598", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "308" + "$ref": "304" }, "isApiVersion": false, "optional": false, @@ -25423,12 +25227,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echo.accept", "methodParameterSegments": [ { - "$id": "1609", + "$id": "1599", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "308" + "$ref": "304" }, "location": "Header", "isApiVersion": false, @@ -25444,12 +25248,12 @@ "isExactName": false }, { - "$id": "1610", + "$id": "1600", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "861" + "$ref": "855" }, "isApiVersion": false, "contentTypes": [ @@ -25463,12 +25267,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echo.pet", "methodParameterSegments": [ { - "$id": "1611", + "$id": "1601", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "861" + "$ref": "855" }, "location": "Body", "isApiVersion": false, @@ -25495,7 +25299,7 @@ 200 ], "bodyType": { - "$ref": "861" + "$ref": "855" }, "headers": [], "isErrorResponse": false, @@ -25524,18 +25328,18 @@ }, "parameters": [ { - "$ref": "1611" + "$ref": "1601" }, { - "$ref": "1607" + "$ref": "1597" }, { - "$ref": "1609" + "$ref": "1599" } ], "response": { "type": { - "$ref": "861" + "$ref": "855" } }, "isOverride": false, @@ -25544,7 +25348,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echo" }, { - "$id": "1612", + "$id": "1602", "kind": "basic", "name": "readXmlUnion", "isExactName": false, @@ -25554,18 +25358,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1613", + "$id": "1603", "name": "readXmlUnion", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1614", + "$id": "1604", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "310" + "$ref": "306" }, "isApiVersion": false, "optional": false, @@ -25576,12 +25380,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.readXmlUnion.contentType", "methodParameterSegments": [ { - "$id": "1615", + "$id": "1605", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "310" + "$ref": "306" }, "location": "Header", "isApiVersion": false, @@ -25597,12 +25401,12 @@ "isExactName": false }, { - "$id": "1616", + "$id": "1606", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "314" + "$ref": "310" }, "isApiVersion": false, "optional": false, @@ -25613,12 +25417,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.readXmlUnion.accept", "methodParameterSegments": [ { - "$id": "1617", + "$id": "1607", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "314" + "$ref": "310" }, "location": "Header", "isApiVersion": false, @@ -25634,30 +25438,30 @@ "isExactName": false }, { - "$id": "1618", + "$id": "1608", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1619", + "$id": "1609", "kind": "union", "name": "XmlUnionPets", "variantTypes": [ { - "$ref": "853" + "$ref": "847" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "854" + "$ref": "848" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "853" + "$ref": "847" } } }, @@ -25673,12 +25477,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.readXmlUnion.pet", "methodParameterSegments": [ { - "$id": "1620", + "$id": "1610", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1619" + "$ref": "1609" }, "location": "Body", "isApiVersion": false, @@ -25705,14 +25509,14 @@ 200 ], "bodyType": { - "$ref": "1619" + "$ref": "1609" }, "headers": [ { "name": "contentType", "nameInResponse": "content-type", "type": { - "$ref": "316" + "$ref": "312" } } ], @@ -25742,18 +25546,18 @@ }, "parameters": [ { - "$ref": "1620" + "$ref": "1610" }, { - "$ref": "1615" + "$ref": "1605" }, { - "$ref": "1617" + "$ref": "1607" } ], "response": { "type": { - "$ref": "1619" + "$ref": "1609" } }, "isOverride": false, @@ -25762,7 +25566,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.readXmlUnion" }, { - "$id": "1621", + "$id": "1611", "kind": "basic", "name": "echoContainer", "isExactName": false, @@ -25772,19 +25576,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1622", + "$id": "1612", "name": "echoContainer", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1623", + "$id": "1613", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "318" + "$ref": "314" }, "isApiVersion": false, "optional": false, @@ -25795,13 +25599,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoContainer.contentType", "methodParameterSegments": [ { - "$id": "1624", + "$id": "1614", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "318" + "$ref": "314" }, "location": "Header", "isApiVersion": false, @@ -25817,12 +25621,12 @@ "isExactName": false }, { - "$id": "1625", + "$id": "1615", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "320" + "$ref": "316" }, "isApiVersion": false, "optional": false, @@ -25833,12 +25637,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoContainer.accept", "methodParameterSegments": [ { - "$id": "1626", + "$id": "1616", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "320" + "$ref": "316" }, "location": "Header", "isApiVersion": false, @@ -25854,12 +25658,12 @@ "isExactName": false }, { - "$id": "1627", + "$id": "1617", "kind": "body", "name": "container", "serializedName": "container", "type": { - "$ref": "859" + "$ref": "853" }, "isApiVersion": false, "contentTypes": [ @@ -25873,12 +25677,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoContainer.container", "methodParameterSegments": [ { - "$id": "1628", + "$id": "1618", "kind": "method", "name": "container", "serializedName": "container", "type": { - "$ref": "859" + "$ref": "853" }, "location": "Body", "isApiVersion": false, @@ -25905,7 +25709,7 @@ 200 ], "bodyType": { - "$ref": "859" + "$ref": "853" }, "headers": [], "isErrorResponse": false, @@ -25934,18 +25738,18 @@ }, "parameters": [ { - "$ref": "1628" + "$ref": "1618" }, { - "$ref": "1624" + "$ref": "1614" }, { - "$ref": "1626" + "$ref": "1616" } ], "response": { "type": { - "$ref": "859" + "$ref": "853" } }, "isOverride": false, @@ -25954,7 +25758,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoContainer" }, { - "$id": "1629", + "$id": "1619", "kind": "basic", "name": "echoRawContainer", "isExactName": false, @@ -25964,19 +25768,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1630", + "$id": "1620", "name": "echoRawContainer", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1631", + "$id": "1621", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "322" + "$ref": "318" }, "isApiVersion": false, "optional": false, @@ -25987,13 +25791,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRawContainer.contentType", "methodParameterSegments": [ { - "$id": "1632", + "$id": "1622", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "322" + "$ref": "318" }, "location": "Header", "isApiVersion": false, @@ -26009,12 +25813,12 @@ "isExactName": false }, { - "$id": "1633", + "$id": "1623", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "324" + "$ref": "320" }, "isApiVersion": false, "optional": false, @@ -26025,12 +25829,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRawContainer.accept", "methodParameterSegments": [ { - "$id": "1634", + "$id": "1624", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "324" + "$ref": "320" }, "location": "Header", "isApiVersion": false, @@ -26046,12 +25850,12 @@ "isExactName": false }, { - "$id": "1635", + "$id": "1625", "kind": "body", "name": "container", "serializedName": "container", "type": { - "$ref": "871" + "$ref": "865" }, "isApiVersion": false, "contentTypes": [ @@ -26065,12 +25869,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRawContainer.container", "methodParameterSegments": [ { - "$id": "1636", + "$id": "1626", "kind": "method", "name": "container", "serializedName": "container", "type": { - "$ref": "871" + "$ref": "865" }, "location": "Body", "isApiVersion": false, @@ -26097,7 +25901,7 @@ 200 ], "bodyType": { - "$ref": "871" + "$ref": "865" }, "headers": [], "isErrorResponse": false, @@ -26126,18 +25930,18 @@ }, "parameters": [ { - "$ref": "1636" + "$ref": "1626" }, { - "$ref": "1632" + "$ref": "1622" }, { - "$ref": "1634" + "$ref": "1624" } ], "response": { "type": { - "$ref": "871" + "$ref": "865" } }, "isOverride": false, @@ -26146,7 +25950,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRawContainer" }, { - "$id": "1637", + "$id": "1627", "kind": "basic", "name": "echoNestedOuter", "isExactName": false, @@ -26156,19 +25960,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1638", + "$id": "1628", "name": "echoNestedOuter", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1639", + "$id": "1629", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "326" + "$ref": "322" }, "isApiVersion": false, "optional": false, @@ -26179,13 +25983,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedOuter.contentType", "methodParameterSegments": [ { - "$id": "1640", + "$id": "1630", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "326" + "$ref": "322" }, "location": "Header", "isApiVersion": false, @@ -26201,12 +26005,12 @@ "isExactName": false }, { - "$id": "1641", + "$id": "1631", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "328" + "$ref": "324" }, "isApiVersion": false, "optional": false, @@ -26217,12 +26021,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedOuter.accept", "methodParameterSegments": [ { - "$id": "1642", + "$id": "1632", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "328" + "$ref": "324" }, "location": "Header", "isApiVersion": false, @@ -26238,30 +26042,30 @@ "isExactName": false }, { - "$id": "1643", + "$id": "1633", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1644", + "$id": "1634", "kind": "union", "name": "CollisionPets", "variantTypes": [ { - "$ref": "879" + "$ref": "873" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "880" + "$ref": "874" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "mammal": { - "$ref": "879" + "$ref": "873" } } }, @@ -26277,12 +26081,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedOuter.pet", "methodParameterSegments": [ { - "$id": "1645", + "$id": "1635", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1644" + "$ref": "1634" }, "location": "Body", "isApiVersion": false, @@ -26309,7 +26113,7 @@ 200 ], "bodyType": { - "$ref": "1644" + "$ref": "1634" }, "headers": [], "isErrorResponse": false, @@ -26338,18 +26142,18 @@ }, "parameters": [ { - "$ref": "1645" + "$ref": "1635" }, { - "$ref": "1640" + "$ref": "1630" }, { - "$ref": "1642" + "$ref": "1632" } ], "response": { "type": { - "$ref": "1644" + "$ref": "1634" } }, "isOverride": false, @@ -26358,7 +26162,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedOuter" }, { - "$id": "1646", + "$id": "1636", "kind": "basic", "name": "echoNestedInner", "isExactName": false, @@ -26368,19 +26172,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1647", + "$id": "1637", "name": "echoNestedInner", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1648", + "$id": "1638", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "330" + "$ref": "326" }, "isApiVersion": false, "optional": false, @@ -26391,13 +26195,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedInner.contentType", "methodParameterSegments": [ { - "$id": "1649", + "$id": "1639", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "330" + "$ref": "326" }, "location": "Header", "isApiVersion": false, @@ -26413,12 +26217,12 @@ "isExactName": false }, { - "$id": "1650", + "$id": "1640", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "332" + "$ref": "328" }, "isApiVersion": false, "optional": false, @@ -26429,12 +26233,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedInner.accept", "methodParameterSegments": [ { - "$id": "1651", + "$id": "1641", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "332" + "$ref": "328" }, "location": "Header", "isApiVersion": false, @@ -26450,30 +26254,30 @@ "isExactName": false }, { - "$id": "1652", + "$id": "1642", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1653", + "$id": "1643", "kind": "union", "name": "NestedPets", "variantTypes": [ { - "$ref": "883" + "$ref": "877" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "879" + "$ref": "873" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "883" + "$ref": "877" } } }, @@ -26489,12 +26293,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedInner.pet", "methodParameterSegments": [ { - "$id": "1654", + "$id": "1644", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1653" + "$ref": "1643" }, "location": "Body", "isApiVersion": false, @@ -26521,7 +26325,7 @@ 200 ], "bodyType": { - "$ref": "1653" + "$ref": "1643" }, "headers": [], "isErrorResponse": false, @@ -26550,18 +26354,18 @@ }, "parameters": [ { - "$ref": "1654" + "$ref": "1644" }, { - "$ref": "1649" + "$ref": "1639" }, { - "$ref": "1651" + "$ref": "1641" } ], "response": { "type": { - "$ref": "1653" + "$ref": "1643" } }, "isOverride": false, @@ -26570,7 +26374,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedInner" }, { - "$id": "1655", + "$id": "1645", "kind": "basic", "name": "echoNestedSameName", "isExactName": false, @@ -26580,19 +26384,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1656", + "$id": "1646", "name": "echoNestedSameName", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1657", + "$id": "1647", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "334" + "$ref": "330" }, "isApiVersion": false, "optional": false, @@ -26603,13 +26407,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedSameName.contentType", "methodParameterSegments": [ { - "$id": "1658", + "$id": "1648", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "334" + "$ref": "330" }, "location": "Header", "isApiVersion": false, @@ -26625,12 +26429,12 @@ "isExactName": false }, { - "$id": "1659", + "$id": "1649", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "336" + "$ref": "332" }, "isApiVersion": false, "optional": false, @@ -26641,12 +26445,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedSameName.accept", "methodParameterSegments": [ { - "$id": "1660", + "$id": "1650", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "336" + "$ref": "332" }, "location": "Header", "isApiVersion": false, @@ -26662,30 +26466,30 @@ "isExactName": false }, { - "$id": "1661", + "$id": "1651", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1662", + "$id": "1652", "kind": "union", "name": "CollisionPets", "variantTypes": [ { - "$ref": "883" + "$ref": "877" } ], "namespace": "SampleTypeSpec.NestedUnions", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "879" + "$ref": "873" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "883" + "$ref": "877" } } }, @@ -26701,12 +26505,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedSameName.pet", "methodParameterSegments": [ { - "$id": "1663", + "$id": "1653", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1662" + "$ref": "1652" }, "location": "Body", "isApiVersion": false, @@ -26733,7 +26537,7 @@ 200 ], "bodyType": { - "$ref": "1662" + "$ref": "1652" }, "headers": [], "isErrorResponse": false, @@ -26762,18 +26566,18 @@ }, "parameters": [ { - "$ref": "1663" + "$ref": "1653" }, { - "$ref": "1658" + "$ref": "1648" }, { - "$ref": "1660" + "$ref": "1650" } ], "response": { "type": { - "$ref": "1662" + "$ref": "1652" } }, "isOverride": false, @@ -26782,7 +26586,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoNestedSameName" }, { - "$id": "1664", + "$id": "1654", "kind": "basic", "name": "echoXmlPets", "isExactName": false, @@ -26792,19 +26596,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1665", + "$id": "1655", "name": "echoXmlPets", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1666", + "$id": "1656", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "338" + "$ref": "334" }, "isApiVersion": false, "optional": false, @@ -26815,13 +26619,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlPets.contentType", "methodParameterSegments": [ { - "$id": "1667", + "$id": "1657", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "338" + "$ref": "334" }, "location": "Header", "isApiVersion": false, @@ -26837,12 +26641,12 @@ "isExactName": false }, { - "$id": "1668", + "$id": "1658", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "340" + "$ref": "336" }, "isApiVersion": false, "optional": false, @@ -26853,12 +26657,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlPets.accept", "methodParameterSegments": [ { - "$id": "1669", + "$id": "1659", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "340" + "$ref": "336" }, "location": "Header", "isApiVersion": false, @@ -26874,12 +26678,12 @@ "isExactName": false }, { - "$id": "1670", + "$id": "1660", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1619" + "$ref": "1609" }, "isApiVersion": false, "contentTypes": [ @@ -26893,12 +26697,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlPets.pet", "methodParameterSegments": [ { - "$id": "1671", + "$id": "1661", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1619" + "$ref": "1609" }, "location": "Body", "isApiVersion": false, @@ -26925,7 +26729,7 @@ 200 ], "bodyType": { - "$ref": "1619" + "$ref": "1609" }, "headers": [], "isErrorResponse": false, @@ -26954,18 +26758,18 @@ }, "parameters": [ { - "$ref": "1671" + "$ref": "1661" }, { - "$ref": "1667" + "$ref": "1657" }, { - "$ref": "1669" + "$ref": "1659" } ], "response": { "type": { - "$ref": "1619" + "$ref": "1609" } }, "isOverride": false, @@ -26974,7 +26778,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlPets" }, { - "$id": "1672", + "$id": "1662", "kind": "basic", "name": "echoXmlBase", "isExactName": false, @@ -26984,18 +26788,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1673", + "$id": "1663", "name": "echoXmlBase", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1674", + "$id": "1664", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "342" + "$ref": "338" }, "isApiVersion": false, "optional": false, @@ -27006,12 +26810,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlBase.contentType", "methodParameterSegments": [ { - "$id": "1675", + "$id": "1665", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "342" + "$ref": "338" }, "location": "Header", "isApiVersion": false, @@ -27027,12 +26831,12 @@ "isExactName": false }, { - "$id": "1676", + "$id": "1666", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "346" + "$ref": "342" }, "isApiVersion": false, "optional": false, @@ -27043,12 +26847,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlBase.accept", "methodParameterSegments": [ { - "$id": "1677", + "$id": "1667", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "346" + "$ref": "342" }, "location": "Header", "isApiVersion": false, @@ -27064,12 +26868,12 @@ "isExactName": false }, { - "$id": "1678", + "$id": "1668", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "854" + "$ref": "848" }, "isApiVersion": false, "contentTypes": [ @@ -27083,12 +26887,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlBase.pet", "methodParameterSegments": [ { - "$id": "1679", + "$id": "1669", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "854" + "$ref": "848" }, "location": "Body", "isApiVersion": false, @@ -27115,14 +26919,14 @@ 200 ], "bodyType": { - "$ref": "854" + "$ref": "848" }, "headers": [ { "name": "contentType", "nameInResponse": "content-type", "type": { - "$ref": "348" + "$ref": "344" } } ], @@ -27152,18 +26956,18 @@ }, "parameters": [ { - "$ref": "1679" + "$ref": "1669" }, { - "$ref": "1675" + "$ref": "1665" }, { - "$ref": "1677" + "$ref": "1667" } ], "response": { "type": { - "$ref": "854" + "$ref": "848" } }, "isOverride": false, @@ -27172,7 +26976,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoXmlBase" }, { - "$id": "1680", + "$id": "1670", "kind": "basic", "name": "echoMappedUnion", "isExactName": false, @@ -27182,19 +26986,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1681", + "$id": "1671", "name": "echoMappedUnion", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1682", + "$id": "1672", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "350" + "$ref": "346" }, "isApiVersion": false, "optional": false, @@ -27205,13 +27009,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedUnion.contentType", "methodParameterSegments": [ { - "$id": "1683", + "$id": "1673", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "350" + "$ref": "346" }, "location": "Header", "isApiVersion": false, @@ -27227,12 +27031,12 @@ "isExactName": false }, { - "$id": "1684", + "$id": "1674", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "352" + "$ref": "348" }, "isApiVersion": false, "optional": false, @@ -27243,12 +27047,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedUnion.accept", "methodParameterSegments": [ { - "$id": "1685", + "$id": "1675", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "352" + "$ref": "348" }, "location": "Header", "isApiVersion": false, @@ -27264,17 +27068,17 @@ "isExactName": false }, { - "$id": "1686", + "$id": "1676", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1687", + "$id": "1677", "kind": "union", "name": "MappedUnionPets", "variantTypes": [ { - "$ref": "886" + "$ref": "880" } ], "namespace": "SampleTypeSpec", @@ -27284,13 +27088,13 @@ }, "isExactName": false, "baseModel": { - "$ref": "887" + "$ref": "881" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "886" + "$ref": "880" } } }, @@ -27306,12 +27110,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedUnion.pet", "methodParameterSegments": [ { - "$id": "1688", + "$id": "1678", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1687" + "$ref": "1677" }, "location": "Body", "isApiVersion": false, @@ -27338,7 +27142,7 @@ 200 ], "bodyType": { - "$ref": "1687" + "$ref": "1677" }, "headers": [], "isErrorResponse": false, @@ -27367,18 +27171,18 @@ }, "parameters": [ { - "$ref": "1688" + "$ref": "1678" }, { - "$ref": "1683" + "$ref": "1673" }, { - "$ref": "1685" + "$ref": "1675" } ], "response": { "type": { - "$ref": "1687" + "$ref": "1677" } }, "isOverride": false, @@ -27387,7 +27191,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedUnion" }, { - "$id": "1689", + "$id": "1679", "kind": "basic", "name": "echoMappedBase", "isExactName": false, @@ -27397,19 +27201,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1690", + "$id": "1680", "name": "echoMappedBase", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1691", + "$id": "1681", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "354" + "$ref": "350" }, "isApiVersion": false, "optional": false, @@ -27420,13 +27224,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedBase.contentType", "methodParameterSegments": [ { - "$id": "1692", + "$id": "1682", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "354" + "$ref": "350" }, "location": "Header", "isApiVersion": false, @@ -27442,12 +27246,12 @@ "isExactName": false }, { - "$id": "1693", + "$id": "1683", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "356" + "$ref": "352" }, "isApiVersion": false, "optional": false, @@ -27458,12 +27262,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedBase.accept", "methodParameterSegments": [ { - "$id": "1694", + "$id": "1684", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "356" + "$ref": "352" }, "location": "Header", "isApiVersion": false, @@ -27479,30 +27283,30 @@ "isExactName": false }, { - "$id": "1695", + "$id": "1685", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1696", + "$id": "1686", "kind": "union", "name": "ExternalBasePets", "variantTypes": [ { - "$ref": "890" + "$ref": "884" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "891" + "$ref": "885" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "890" + "$ref": "884" } } }, @@ -27518,12 +27322,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedBase.pet", "methodParameterSegments": [ { - "$id": "1697", + "$id": "1687", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1696" + "$ref": "1686" }, "location": "Body", "isApiVersion": false, @@ -27550,7 +27354,7 @@ 200 ], "bodyType": { - "$ref": "1696" + "$ref": "1686" }, "headers": [], "isErrorResponse": false, @@ -27579,18 +27383,18 @@ }, "parameters": [ { - "$ref": "1697" + "$ref": "1687" }, { - "$ref": "1692" + "$ref": "1682" }, { - "$ref": "1694" + "$ref": "1684" } ], "response": { "type": { - "$ref": "1696" + "$ref": "1686" } }, "isOverride": false, @@ -27599,7 +27403,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedBase" }, { - "$id": "1698", + "$id": "1688", "kind": "basic", "name": "echoMappedVariant", "isExactName": false, @@ -27609,19 +27413,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1699", + "$id": "1689", "name": "echoMappedVariant", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1700", + "$id": "1690", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "358" + "$ref": "354" }, "isApiVersion": false, "optional": false, @@ -27632,13 +27436,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedVariant.contentType", "methodParameterSegments": [ { - "$id": "1701", + "$id": "1691", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "358" + "$ref": "354" }, "location": "Header", "isApiVersion": false, @@ -27654,12 +27458,12 @@ "isExactName": false }, { - "$id": "1702", + "$id": "1692", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "360" + "$ref": "356" }, "isApiVersion": false, "optional": false, @@ -27670,12 +27474,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedVariant.accept", "methodParameterSegments": [ { - "$id": "1703", + "$id": "1693", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "360" + "$ref": "356" }, "location": "Header", "isApiVersion": false, @@ -27691,30 +27495,30 @@ "isExactName": false }, { - "$id": "1704", + "$id": "1694", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1705", + "$id": "1695", "kind": "union", "name": "ExternalVariantPets", "variantTypes": [ { - "$ref": "894" + "$ref": "888" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "895" + "$ref": "889" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "894" + "$ref": "888" } } }, @@ -27730,12 +27534,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedVariant.pet", "methodParameterSegments": [ { - "$id": "1706", + "$id": "1696", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1705" + "$ref": "1695" }, "location": "Body", "isApiVersion": false, @@ -27762,7 +27566,7 @@ 200 ], "bodyType": { - "$ref": "1705" + "$ref": "1695" }, "headers": [], "isErrorResponse": false, @@ -27791,18 +27595,18 @@ }, "parameters": [ { - "$ref": "1706" + "$ref": "1696" }, { - "$ref": "1701" + "$ref": "1691" }, { - "$ref": "1703" + "$ref": "1693" } ], "response": { "type": { - "$ref": "1705" + "$ref": "1695" } }, "isOverride": false, @@ -27811,7 +27615,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedVariant" }, { - "$id": "1707", + "$id": "1697", "kind": "basic", "name": "echoDirectBase", "isExactName": false, @@ -27821,19 +27625,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1708", + "$id": "1698", "name": "echoDirectBase", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1709", + "$id": "1699", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "362" + "$ref": "358" }, "isApiVersion": false, "optional": false, @@ -27844,13 +27648,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectBase.contentType", "methodParameterSegments": [ { - "$id": "1710", + "$id": "1700", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "362" + "$ref": "358" }, "location": "Header", "isApiVersion": false, @@ -27866,12 +27670,12 @@ "isExactName": false }, { - "$id": "1711", + "$id": "1701", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "364" + "$ref": "360" }, "isApiVersion": false, "optional": false, @@ -27882,12 +27686,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectBase.accept", "methodParameterSegments": [ { - "$id": "1712", + "$id": "1702", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "364" + "$ref": "360" }, "location": "Header", "isApiVersion": false, @@ -27903,12 +27707,12 @@ "isExactName": false }, { - "$id": "1713", + "$id": "1703", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "898" + "$ref": "892" }, "isApiVersion": false, "contentTypes": [ @@ -27922,12 +27726,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectBase.pet", "methodParameterSegments": [ { - "$id": "1714", + "$id": "1704", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "898" + "$ref": "892" }, "location": "Body", "isApiVersion": false, @@ -27954,7 +27758,7 @@ 200 ], "bodyType": { - "$ref": "898" + "$ref": "892" }, "headers": [], "isErrorResponse": false, @@ -27983,18 +27787,18 @@ }, "parameters": [ { - "$ref": "1714" + "$ref": "1704" }, { - "$ref": "1710" + "$ref": "1700" }, { - "$ref": "1712" + "$ref": "1702" } ], "response": { "type": { - "$ref": "898" + "$ref": "892" } }, "isOverride": false, @@ -28003,7 +27807,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectBase" }, { - "$id": "1715", + "$id": "1705", "kind": "basic", "name": "echoDirectUnion", "isExactName": false, @@ -28013,19 +27817,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1716", + "$id": "1706", "name": "echoDirectUnion", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1717", + "$id": "1707", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "366" + "$ref": "362" }, "isApiVersion": false, "optional": false, @@ -28036,13 +27840,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectUnion.contentType", "methodParameterSegments": [ { - "$id": "1718", + "$id": "1708", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "366" + "$ref": "362" }, "location": "Header", "isApiVersion": false, @@ -28058,12 +27862,12 @@ "isExactName": false }, { - "$id": "1719", + "$id": "1709", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "368" + "$ref": "364" }, "isApiVersion": false, "optional": false, @@ -28074,12 +27878,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectUnion.accept", "methodParameterSegments": [ { - "$id": "1720", + "$id": "1710", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "368" + "$ref": "364" }, "location": "Header", "isApiVersion": false, @@ -28095,30 +27899,30 @@ "isExactName": false }, { - "$id": "1721", + "$id": "1711", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1722", + "$id": "1712", "kind": "union", "name": "DirectPets", "variantTypes": [ { - "$ref": "905" + "$ref": "899" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "898" + "$ref": "892" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "905" + "$ref": "899" } } }, @@ -28134,12 +27938,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectUnion.pet", "methodParameterSegments": [ { - "$id": "1723", + "$id": "1713", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1722" + "$ref": "1712" }, "location": "Body", "isApiVersion": false, @@ -28166,7 +27970,7 @@ 200 ], "bodyType": { - "$ref": "1722" + "$ref": "1712" }, "headers": [], "isErrorResponse": false, @@ -28195,18 +27999,18 @@ }, "parameters": [ { - "$ref": "1723" + "$ref": "1713" }, { - "$ref": "1718" + "$ref": "1708" }, { - "$ref": "1720" + "$ref": "1710" } ], "response": { "type": { - "$ref": "1722" + "$ref": "1712" } }, "isOverride": false, @@ -28215,7 +28019,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectUnion" }, { - "$id": "1724", + "$id": "1714", "kind": "basic", "name": "echoDirectContainer", "isExactName": false, @@ -28225,19 +28029,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1725", + "$id": "1715", "name": "echoDirectContainer", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1726", + "$id": "1716", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "370" + "$ref": "366" }, "isApiVersion": false, "optional": false, @@ -28248,13 +28052,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectContainer.contentType", "methodParameterSegments": [ { - "$id": "1727", + "$id": "1717", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "370" + "$ref": "366" }, "location": "Header", "isApiVersion": false, @@ -28270,12 +28074,12 @@ "isExactName": false }, { - "$id": "1728", + "$id": "1718", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "372" + "$ref": "368" }, "isApiVersion": false, "optional": false, @@ -28286,12 +28090,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectContainer.accept", "methodParameterSegments": [ { - "$id": "1729", + "$id": "1719", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "372" + "$ref": "368" }, "location": "Header", "isApiVersion": false, @@ -28307,12 +28111,12 @@ "isExactName": false }, { - "$id": "1730", + "$id": "1720", "kind": "body", "name": "container", "serializedName": "container", "type": { - "$ref": "908" + "$ref": "902" }, "isApiVersion": false, "contentTypes": [ @@ -28326,12 +28130,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectContainer.container", "methodParameterSegments": [ { - "$id": "1731", + "$id": "1721", "kind": "method", "name": "container", "serializedName": "container", "type": { - "$ref": "908" + "$ref": "902" }, "location": "Body", "isApiVersion": false, @@ -28358,7 +28162,7 @@ 200 ], "bodyType": { - "$ref": "908" + "$ref": "902" }, "headers": [], "isErrorResponse": false, @@ -28387,18 +28191,18 @@ }, "parameters": [ { - "$ref": "1731" + "$ref": "1721" }, { - "$ref": "1727" + "$ref": "1717" }, { - "$ref": "1729" + "$ref": "1719" } ], "response": { "type": { - "$ref": "908" + "$ref": "902" } }, "isOverride": false, @@ -28407,7 +28211,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDirectContainer" }, { - "$id": "1732", + "$id": "1722", "kind": "basic", "name": "echoDynamicContainer", "isExactName": false, @@ -28417,19 +28221,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1733", + "$id": "1723", "name": "echoDynamicContainer", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1734", + "$id": "1724", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "374" + "$ref": "370" }, "isApiVersion": false, "optional": false, @@ -28440,13 +28244,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDynamicContainer.contentType", "methodParameterSegments": [ { - "$id": "1735", + "$id": "1725", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "374" + "$ref": "370" }, "location": "Header", "isApiVersion": false, @@ -28462,12 +28266,12 @@ "isExactName": false }, { - "$id": "1736", + "$id": "1726", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "376" + "$ref": "372" }, "isApiVersion": false, "optional": false, @@ -28478,12 +28282,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDynamicContainer.accept", "methodParameterSegments": [ { - "$id": "1737", + "$id": "1727", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "376" + "$ref": "372" }, "location": "Header", "isApiVersion": false, @@ -28499,12 +28303,12 @@ "isExactName": false }, { - "$id": "1738", + "$id": "1728", "kind": "body", "name": "container", "serializedName": "container", "type": { - "$ref": "910" + "$ref": "904" }, "isApiVersion": false, "contentTypes": [ @@ -28518,12 +28322,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDynamicContainer.container", "methodParameterSegments": [ { - "$id": "1739", + "$id": "1729", "kind": "method", "name": "container", "serializedName": "container", "type": { - "$ref": "910" + "$ref": "904" }, "location": "Body", "isApiVersion": false, @@ -28550,7 +28354,7 @@ 200 ], "bodyType": { - "$ref": "910" + "$ref": "904" }, "headers": [], "isErrorResponse": false, @@ -28579,18 +28383,18 @@ }, "parameters": [ { - "$ref": "1739" + "$ref": "1729" }, { - "$ref": "1735" + "$ref": "1725" }, { - "$ref": "1737" + "$ref": "1727" } ], "response": { "type": { - "$ref": "910" + "$ref": "904" } }, "isOverride": false, @@ -28599,7 +28403,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDynamicContainer" }, { - "$id": "1740", + "$id": "1730", "kind": "basic", "name": "echoDescendantMembers", "isExactName": false, @@ -28609,19 +28413,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1741", + "$id": "1731", "name": "echoDescendantMembers", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1742", + "$id": "1732", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "378" + "$ref": "374" }, "isApiVersion": false, "optional": false, @@ -28632,13 +28436,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantMembers.contentType", "methodParameterSegments": [ { - "$id": "1743", + "$id": "1733", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "378" + "$ref": "374" }, "location": "Header", "isApiVersion": false, @@ -28654,12 +28458,12 @@ "isExactName": false }, { - "$id": "1744", + "$id": "1734", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "380" + "$ref": "376" }, "isApiVersion": false, "optional": false, @@ -28670,12 +28474,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantMembers.accept", "methodParameterSegments": [ { - "$id": "1745", + "$id": "1735", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "380" + "$ref": "376" }, "location": "Header", "isApiVersion": false, @@ -28691,30 +28495,30 @@ "isExactName": false }, { - "$id": "1746", + "$id": "1736", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1747", + "$id": "1737", "kind": "union", "name": "DescendantPets", "variantTypes": [ { - "$ref": "927" + "$ref": "921" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "928" + "$ref": "922" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "927" + "$ref": "921" } } }, @@ -28730,12 +28534,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantMembers.pet", "methodParameterSegments": [ { - "$id": "1748", + "$id": "1738", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1747" + "$ref": "1737" }, "location": "Body", "isApiVersion": false, @@ -28762,7 +28566,7 @@ 200 ], "bodyType": { - "$ref": "1747" + "$ref": "1737" }, "headers": [], "isErrorResponse": false, @@ -28791,18 +28595,18 @@ }, "parameters": [ { - "$ref": "1748" + "$ref": "1738" }, { - "$ref": "1743" + "$ref": "1733" }, { - "$ref": "1745" + "$ref": "1735" } ], "response": { "type": { - "$ref": "1747" + "$ref": "1737" } }, "isOverride": false, @@ -28811,7 +28615,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantMembers" }, { - "$id": "1749", + "$id": "1739", "kind": "basic", "name": "echoMappedIntermediate", "isExactName": false, @@ -28821,19 +28625,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1750", + "$id": "1740", "name": "echoMappedIntermediate", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1751", + "$id": "1741", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "382" + "$ref": "378" }, "isApiVersion": false, "optional": false, @@ -28844,13 +28648,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedIntermediate.contentType", "methodParameterSegments": [ { - "$id": "1752", + "$id": "1742", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "382" + "$ref": "378" }, "location": "Header", "isApiVersion": false, @@ -28866,12 +28670,12 @@ "isExactName": false }, { - "$id": "1753", + "$id": "1743", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "384" + "$ref": "380" }, "isApiVersion": false, "optional": false, @@ -28882,12 +28686,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedIntermediate.accept", "methodParameterSegments": [ { - "$id": "1754", + "$id": "1744", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "384" + "$ref": "380" }, "location": "Header", "isApiVersion": false, @@ -28903,30 +28707,30 @@ "isExactName": false }, { - "$id": "1755", + "$id": "1745", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1756", + "$id": "1746", "kind": "union", "name": "IntermediatePets", "variantTypes": [ { - "$ref": "935" + "$ref": "929" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "937" + "$ref": "931" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "935" + "$ref": "929" } } }, @@ -28942,12 +28746,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedIntermediate.pet", "methodParameterSegments": [ { - "$id": "1757", + "$id": "1747", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1756" + "$ref": "1746" }, "location": "Body", "isApiVersion": false, @@ -28974,7 +28778,7 @@ 200 ], "bodyType": { - "$ref": "1756" + "$ref": "1746" }, "headers": [], "isErrorResponse": false, @@ -29003,18 +28807,18 @@ }, "parameters": [ { - "$ref": "1757" + "$ref": "1747" }, { - "$ref": "1752" + "$ref": "1742" }, { - "$ref": "1754" + "$ref": "1744" } ], "response": { "type": { - "$ref": "1756" + "$ref": "1746" } }, "isOverride": false, @@ -29023,7 +28827,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoMappedIntermediate" }, { - "$id": "1758", + "$id": "1748", "kind": "basic", "name": "echoSerializeClassName", "isExactName": false, @@ -29033,19 +28837,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1759", + "$id": "1749", "name": "echoSerializeClassName", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1760", + "$id": "1750", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "386" + "$ref": "382" }, "isApiVersion": false, "optional": false, @@ -29056,13 +28860,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoSerializeClassName.contentType", "methodParameterSegments": [ { - "$id": "1761", + "$id": "1751", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "386" + "$ref": "382" }, "location": "Header", "isApiVersion": false, @@ -29078,12 +28882,12 @@ "isExactName": false }, { - "$id": "1762", + "$id": "1752", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "388" + "$ref": "384" }, "isApiVersion": false, "optional": false, @@ -29094,12 +28898,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoSerializeClassName.accept", "methodParameterSegments": [ { - "$id": "1763", + "$id": "1753", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "388" + "$ref": "384" }, "location": "Header", "isApiVersion": false, @@ -29115,30 +28919,30 @@ "isExactName": false }, { - "$id": "1764", + "$id": "1754", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1765", + "$id": "1755", "kind": "union", "name": "Pets", "variantTypes": [ { - "$ref": "940" + "$ref": "934" } ], "namespace": "SampleTypeSpec.SerializeClassNames", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "941" + "$ref": "935" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "940" + "$ref": "934" } } }, @@ -29154,12 +28958,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoSerializeClassName.pet", "methodParameterSegments": [ { - "$id": "1766", + "$id": "1756", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1765" + "$ref": "1755" }, "location": "Body", "isApiVersion": false, @@ -29186,7 +28990,7 @@ 200 ], "bodyType": { - "$ref": "1765" + "$ref": "1755" }, "headers": [], "isErrorResponse": false, @@ -29215,18 +29019,18 @@ }, "parameters": [ { - "$ref": "1766" + "$ref": "1756" }, { - "$ref": "1761" + "$ref": "1751" }, { - "$ref": "1763" + "$ref": "1753" } ], "response": { "type": { - "$ref": "1765" + "$ref": "1755" } }, "isOverride": false, @@ -29235,7 +29039,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoSerializeClassName" }, { - "$id": "1767", + "$id": "1757", "kind": "basic", "name": "echoDeserializeClassName", "isExactName": false, @@ -29245,19 +29049,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1768", + "$id": "1758", "name": "echoDeserializeClassName", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1769", + "$id": "1759", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "390" + "$ref": "386" }, "isApiVersion": false, "optional": false, @@ -29268,13 +29072,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDeserializeClassName.contentType", "methodParameterSegments": [ { - "$id": "1770", + "$id": "1760", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "390" + "$ref": "386" }, "location": "Header", "isApiVersion": false, @@ -29290,12 +29094,12 @@ "isExactName": false }, { - "$id": "1771", + "$id": "1761", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "392" + "$ref": "388" }, "isApiVersion": false, "optional": false, @@ -29306,12 +29110,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDeserializeClassName.accept", "methodParameterSegments": [ { - "$id": "1772", + "$id": "1762", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "392" + "$ref": "388" }, "location": "Header", "isApiVersion": false, @@ -29327,30 +29131,30 @@ "isExactName": false }, { - "$id": "1773", + "$id": "1763", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1774", + "$id": "1764", "kind": "union", "name": "Pets", "variantTypes": [ { - "$ref": "944" + "$ref": "938" } ], "namespace": "SampleTypeSpec.DeserializeClassNames", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "945" + "$ref": "939" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "944" + "$ref": "938" } } }, @@ -29366,12 +29170,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDeserializeClassName.pet", "methodParameterSegments": [ { - "$id": "1775", + "$id": "1765", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1774" + "$ref": "1764" }, "location": "Body", "isApiVersion": false, @@ -29398,7 +29202,7 @@ 200 ], "bodyType": { - "$ref": "1774" + "$ref": "1764" }, "headers": [], "isErrorResponse": false, @@ -29427,18 +29231,18 @@ }, "parameters": [ { - "$ref": "1775" + "$ref": "1765" }, { - "$ref": "1770" + "$ref": "1760" }, { - "$ref": "1772" + "$ref": "1762" } ], "response": { "type": { - "$ref": "1774" + "$ref": "1764" } }, "isOverride": false, @@ -29447,7 +29251,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDeserializeClassName" }, { - "$id": "1776", + "$id": "1766", "kind": "basic", "name": "echoCustomBase", "isExactName": false, @@ -29457,19 +29261,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1777", + "$id": "1767", "name": "echoCustomBase", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1778", + "$id": "1768", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "394" + "$ref": "390" }, "isApiVersion": false, "optional": false, @@ -29480,13 +29284,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomBase.contentType", "methodParameterSegments": [ { - "$id": "1779", + "$id": "1769", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "394" + "$ref": "390" }, "location": "Header", "isApiVersion": false, @@ -29502,12 +29306,12 @@ "isExactName": false }, { - "$id": "1780", + "$id": "1770", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "396" + "$ref": "392" }, "isApiVersion": false, "optional": false, @@ -29518,12 +29322,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomBase.accept", "methodParameterSegments": [ { - "$id": "1781", + "$id": "1771", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "396" + "$ref": "392" }, "location": "Header", "isApiVersion": false, @@ -29539,12 +29343,12 @@ "isExactName": false }, { - "$id": "1782", + "$id": "1772", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "954" + "$ref": "948" }, "isApiVersion": false, "contentTypes": [ @@ -29558,12 +29362,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomBase.pet", "methodParameterSegments": [ { - "$id": "1783", + "$id": "1773", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "954" + "$ref": "948" }, "location": "Body", "isApiVersion": false, @@ -29590,7 +29394,7 @@ 200 ], "bodyType": { - "$ref": "954" + "$ref": "948" }, "headers": [], "isErrorResponse": false, @@ -29619,18 +29423,18 @@ }, "parameters": [ { - "$ref": "1783" + "$ref": "1773" }, { - "$ref": "1779" + "$ref": "1769" }, { - "$ref": "1781" + "$ref": "1771" } ], "response": { "type": { - "$ref": "954" + "$ref": "948" } }, "isOverride": false, @@ -29639,7 +29443,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomBase" }, { - "$id": "1784", + "$id": "1774", "kind": "basic", "name": "echoCustomContainer", "isExactName": false, @@ -29649,19 +29453,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1785", + "$id": "1775", "name": "echoCustomContainer", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1786", + "$id": "1776", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "398" + "$ref": "394" }, "isApiVersion": false, "optional": false, @@ -29672,13 +29476,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomContainer.contentType", "methodParameterSegments": [ { - "$id": "1787", + "$id": "1777", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "398" + "$ref": "394" }, "location": "Header", "isApiVersion": false, @@ -29694,12 +29498,12 @@ "isExactName": false }, { - "$id": "1788", + "$id": "1778", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "400" + "$ref": "396" }, "isApiVersion": false, "optional": false, @@ -29710,12 +29514,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomContainer.accept", "methodParameterSegments": [ { - "$id": "1789", + "$id": "1779", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "400" + "$ref": "396" }, "location": "Header", "isApiVersion": false, @@ -29731,12 +29535,12 @@ "isExactName": false }, { - "$id": "1790", + "$id": "1780", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "949" + "$ref": "943" }, "isApiVersion": false, "contentTypes": [ @@ -29750,12 +29554,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomContainer.pet", "methodParameterSegments": [ { - "$id": "1791", + "$id": "1781", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "949" + "$ref": "943" }, "location": "Body", "isApiVersion": false, @@ -29782,7 +29586,7 @@ 200 ], "bodyType": { - "$ref": "949" + "$ref": "943" }, "headers": [], "isErrorResponse": false, @@ -29811,18 +29615,18 @@ }, "parameters": [ { - "$ref": "1791" + "$ref": "1781" }, { - "$ref": "1787" + "$ref": "1777" }, { - "$ref": "1789" + "$ref": "1779" } ], "response": { "type": { - "$ref": "949" + "$ref": "943" } }, "isOverride": false, @@ -29831,7 +29635,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomContainer" }, { - "$id": "1792", + "$id": "1782", "kind": "basic", "name": "echoCustomIntermediate", "isExactName": false, @@ -29841,19 +29645,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1793", + "$id": "1783", "name": "echoCustomIntermediate", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1794", + "$id": "1784", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "402" + "$ref": "398" }, "isApiVersion": false, "optional": false, @@ -29864,13 +29668,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomIntermediate.contentType", "methodParameterSegments": [ { - "$id": "1795", + "$id": "1785", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "402" + "$ref": "398" }, "location": "Header", "isApiVersion": false, @@ -29886,12 +29690,12 @@ "isExactName": false }, { - "$id": "1796", + "$id": "1786", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "404" + "$ref": "400" }, "isApiVersion": false, "optional": false, @@ -29902,12 +29706,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomIntermediate.accept", "methodParameterSegments": [ { - "$id": "1797", + "$id": "1787", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "404" + "$ref": "400" }, "location": "Header", "isApiVersion": false, @@ -29923,30 +29727,30 @@ "isExactName": false }, { - "$id": "1798", + "$id": "1788", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1799", + "$id": "1789", "kind": "union", "name": "CustomIntermediatePets", "variantTypes": [ { - "$ref": "957" + "$ref": "951" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "959" + "$ref": "953" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "cat": { - "$ref": "957" + "$ref": "951" } } }, @@ -29962,12 +29766,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomIntermediate.pet", "methodParameterSegments": [ { - "$id": "1800", + "$id": "1790", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1799" + "$ref": "1789" }, "location": "Body", "isApiVersion": false, @@ -29994,7 +29798,7 @@ 200 ], "bodyType": { - "$ref": "1799" + "$ref": "1789" }, "headers": [], "isErrorResponse": false, @@ -30023,18 +29827,18 @@ }, "parameters": [ { - "$ref": "1800" + "$ref": "1790" }, { - "$ref": "1795" + "$ref": "1785" }, { - "$ref": "1797" + "$ref": "1787" } ], "response": { "type": { - "$ref": "1799" + "$ref": "1789" } }, "isOverride": false, @@ -30043,7 +29847,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoCustomIntermediate" }, { - "$id": "1801", + "$id": "1791", "kind": "basic", "name": "echoRebasedVariants", "isExactName": false, @@ -30053,19 +29857,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1802", + "$id": "1792", "name": "echoRebasedVariants", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1803", + "$id": "1793", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "406" + "$ref": "402" }, "isApiVersion": false, "optional": false, @@ -30076,13 +29880,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedVariants.contentType", "methodParameterSegments": [ { - "$id": "1804", + "$id": "1794", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "406" + "$ref": "402" }, "location": "Header", "isApiVersion": false, @@ -30098,12 +29902,12 @@ "isExactName": false }, { - "$id": "1805", + "$id": "1795", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "408" + "$ref": "404" }, "isApiVersion": false, "optional": false, @@ -30114,12 +29918,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedVariants.accept", "methodParameterSegments": [ { - "$id": "1806", + "$id": "1796", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "408" + "$ref": "404" }, "location": "Header", "isApiVersion": false, @@ -30135,36 +29939,36 @@ "isExactName": false }, { - "$id": "1807", + "$id": "1797", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1808", + "$id": "1798", "kind": "union", "name": "RebasedPets", "variantTypes": [ { - "$ref": "962" + "$ref": "956" }, { - "$ref": "966" + "$ref": "960" } ], "namespace": "SampleTypeSpec", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "963" + "$ref": "957" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "a": { - "$ref": "962" + "$ref": "956" }, "b": { - "$ref": "966" + "$ref": "960" } } }, @@ -30180,12 +29984,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedVariants.pet", "methodParameterSegments": [ { - "$id": "1809", + "$id": "1799", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1808" + "$ref": "1798" }, "location": "Body", "isApiVersion": false, @@ -30212,7 +30016,7 @@ 200 ], "bodyType": { - "$ref": "1808" + "$ref": "1798" }, "headers": [], "isErrorResponse": false, @@ -30241,18 +30045,18 @@ }, "parameters": [ { - "$ref": "1809" + "$ref": "1799" }, { - "$ref": "1804" + "$ref": "1794" }, { - "$ref": "1806" + "$ref": "1796" } ], "response": { "type": { - "$ref": "1808" + "$ref": "1798" } }, "isOverride": false, @@ -30261,7 +30065,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedVariants" }, { - "$id": "1810", + "$id": "1800", "kind": "basic", "name": "echoRebasedBase", "isExactName": false, @@ -30271,19 +30075,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1811", + "$id": "1801", "name": "echoRebasedBase", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1812", + "$id": "1802", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "410" + "$ref": "406" }, "isApiVersion": false, "optional": false, @@ -30294,13 +30098,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedBase.contentType", "methodParameterSegments": [ { - "$id": "1813", + "$id": "1803", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "410" + "$ref": "406" }, "location": "Header", "isApiVersion": false, @@ -30316,12 +30120,12 @@ "isExactName": false }, { - "$id": "1814", + "$id": "1804", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "412" + "$ref": "408" }, "isApiVersion": false, "optional": false, @@ -30332,12 +30136,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedBase.accept", "methodParameterSegments": [ { - "$id": "1815", + "$id": "1805", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "412" + "$ref": "408" }, "location": "Header", "isApiVersion": false, @@ -30353,30 +30157,30 @@ "isExactName": false }, { - "$id": "1816", + "$id": "1806", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1817", + "$id": "1807", "kind": "union", "name": "Pets", "variantTypes": [ { - "$ref": "967" + "$ref": "961" } ], "namespace": "SampleTypeSpec.RebasedBase", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "962" + "$ref": "956" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "a": { - "$ref": "967" + "$ref": "961" } } }, @@ -30392,12 +30196,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedBase.pet", "methodParameterSegments": [ { - "$id": "1818", + "$id": "1808", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1817" + "$ref": "1807" }, "location": "Body", "isApiVersion": false, @@ -30424,7 +30228,7 @@ 200 ], "bodyType": { - "$ref": "1817" + "$ref": "1807" }, "headers": [], "isErrorResponse": false, @@ -30453,18 +30257,18 @@ }, "parameters": [ { - "$ref": "1818" + "$ref": "1808" }, { - "$ref": "1813" + "$ref": "1803" }, { - "$ref": "1815" + "$ref": "1805" } ], "response": { "type": { - "$ref": "1817" + "$ref": "1807" } }, "isOverride": false, @@ -30473,7 +30277,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedBase" }, { - "$id": "1819", + "$id": "1809", "kind": "basic", "name": "echoRebasedDerived", "isExactName": false, @@ -30483,19 +30287,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1820", + "$id": "1810", "name": "echoRebasedDerived", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1821", + "$id": "1811", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "414" + "$ref": "410" }, "isApiVersion": false, "optional": false, @@ -30506,13 +30310,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedDerived.contentType", "methodParameterSegments": [ { - "$id": "1822", + "$id": "1812", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "414" + "$ref": "410" }, "location": "Header", "isApiVersion": false, @@ -30528,12 +30332,12 @@ "isExactName": false }, { - "$id": "1823", + "$id": "1813", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "416" + "$ref": "412" }, "isApiVersion": false, "optional": false, @@ -30544,12 +30348,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedDerived.accept", "methodParameterSegments": [ { - "$id": "1824", + "$id": "1814", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "416" + "$ref": "412" }, "location": "Header", "isApiVersion": false, @@ -30565,30 +30369,30 @@ "isExactName": false }, { - "$id": "1825", + "$id": "1815", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1826", + "$id": "1816", "kind": "union", "name": "Pets", "variantTypes": [ { - "$ref": "968" + "$ref": "962" } ], "namespace": "SampleTypeSpec.RebasedDerived", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "966" + "$ref": "960" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "b": { - "$ref": "968" + "$ref": "962" } } }, @@ -30604,12 +30408,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedDerived.pet", "methodParameterSegments": [ { - "$id": "1827", + "$id": "1817", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1826" + "$ref": "1816" }, "location": "Body", "isApiVersion": false, @@ -30636,7 +30440,7 @@ 200 ], "bodyType": { - "$ref": "1826" + "$ref": "1816" }, "headers": [], "isErrorResponse": false, @@ -30665,18 +30469,18 @@ }, "parameters": [ { - "$ref": "1827" + "$ref": "1817" }, { - "$ref": "1822" + "$ref": "1812" }, { - "$ref": "1824" + "$ref": "1814" } ], "response": { "type": { - "$ref": "1826" + "$ref": "1816" } }, "isOverride": false, @@ -30685,7 +30489,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoRebasedDerived" }, { - "$id": "1828", + "$id": "1818", "kind": "basic", "name": "echoDescendantDeserializer", "isExactName": false, @@ -30695,19 +30499,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1829", + "$id": "1819", "name": "echoDescendantDeserializer", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1830", + "$id": "1820", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "418" + "$ref": "414" }, "isApiVersion": false, "optional": false, @@ -30718,13 +30522,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantDeserializer.contentType", "methodParameterSegments": [ { - "$id": "1831", + "$id": "1821", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "418" + "$ref": "414" }, "location": "Header", "isApiVersion": false, @@ -30740,12 +30544,12 @@ "isExactName": false }, { - "$id": "1832", + "$id": "1822", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "420" + "$ref": "416" }, "isApiVersion": false, "optional": false, @@ -30756,12 +30560,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantDeserializer.accept", "methodParameterSegments": [ { - "$id": "1833", + "$id": "1823", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "420" + "$ref": "416" }, "location": "Header", "isApiVersion": false, @@ -30777,30 +30581,30 @@ "isExactName": false }, { - "$id": "1834", + "$id": "1824", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$id": "1835", + "$id": "1825", "kind": "union", "name": "Pets", "variantTypes": [ { - "$ref": "969" + "$ref": "963" } ], "namespace": "SampleTypeSpec.DescendantDeserializer", "decorators": [], "isExactName": false, "baseModel": { - "$ref": "970" + "$ref": "964" }, "discriminatorPropertyName": "kind", "envelopePropertyName": "value", "discriminatedSubtypes": { "pet": { - "$ref": "969" + "$ref": "963" } } }, @@ -30816,12 +30620,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantDeserializer.pet", "methodParameterSegments": [ { - "$id": "1836", + "$id": "1826", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "1835" + "$ref": "1825" }, "location": "Body", "isApiVersion": false, @@ -30848,7 +30652,7 @@ 200 ], "bodyType": { - "$ref": "1835" + "$ref": "1825" }, "headers": [], "isErrorResponse": false, @@ -30877,18 +30681,18 @@ }, "parameters": [ { - "$ref": "1836" + "$ref": "1826" }, { - "$ref": "1831" + "$ref": "1821" }, { - "$ref": "1833" + "$ref": "1823" } ], "response": { "type": { - "$ref": "1835" + "$ref": "1825" } }, "isOverride": false, @@ -30897,7 +30701,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoDescendantDeserializer" }, { - "$id": "1837", + "$id": "1827", "kind": "basic", "name": "sendPets", "isExactName": false, @@ -30907,18 +30711,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1838", + "$id": "1828", "name": "sendPets", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1839", + "$id": "1829", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "422" + "$ref": "418" }, "isApiVersion": false, "optional": false, @@ -30929,16 +30733,16 @@ "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.contentType", "methodParameterSegments": [ { - "$id": "1840", + "$id": "1830", "kind": "method", "name": "stream", "serializedName": "stream", "type": { - "$id": "1841", + "$id": "1831", "kind": "streaming", "name": "JsonlStreamUnionPets", "valueType": { - "$ref": "861" + "$ref": "855" }, "streamKind": "jsonl", "contentTypes": [ @@ -30957,12 +30761,12 @@ "isExactName": false }, { - "$id": "1842", + "$id": "1832", "kind": "method", "name": "contentType", "serializedName": "contentType", "type": { - "$ref": "424" + "$ref": "420" }, "location": "", "isApiVersion": false, @@ -30978,16 +30782,16 @@ "isExactName": false }, { - "$id": "1843", + "$id": "1833", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$id": "1844", + "$id": "1834", "kind": "streaming", "name": "JsonlStreamUnionPets", "valueType": { - "$ref": "861" + "$ref": "855" }, "streamKind": "jsonl", "contentTypes": [ @@ -31007,15 +30811,15 @@ "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.body", "methodParameterSegments": [ { - "$ref": "1840" + "$ref": "1830" }, { - "$id": "1845", + "$id": "1835", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$id": "1846", + "$id": "1836", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "", @@ -31065,7 +30869,7 @@ }, "parameters": [ { - "$ref": "1840" + "$ref": "1830" } ], "response": {}, @@ -31075,7 +30879,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.sendPets" }, { - "$id": "1847", + "$id": "1837", "kind": "basic", "name": "sendBytes", "isExactName": false, @@ -31085,18 +30889,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1848", + "$id": "1838", "name": "sendBytes", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1849", + "$id": "1839", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "426" + "$ref": "422" }, "isApiVersion": false, "optional": false, @@ -31107,16 +30911,16 @@ "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.contentType", "methodParameterSegments": [ { - "$id": "1850", + "$id": "1840", "kind": "method", "name": "stream", "serializedName": "stream", "type": { - "$id": "1851", + "$id": "1841", "kind": "streaming", "name": "JsonlStream", "valueType": { - "$id": "1852", + "$id": "1842", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -31140,12 +30944,12 @@ "isExactName": false }, { - "$id": "1853", + "$id": "1843", "kind": "method", "name": "contentType", "serializedName": "contentType", "type": { - "$ref": "428" + "$ref": "424" }, "location": "", "isApiVersion": false, @@ -31161,16 +30965,16 @@ "isExactName": false }, { - "$id": "1854", + "$id": "1844", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$id": "1855", + "$id": "1845", "kind": "streaming", "name": "JsonlStream", "valueType": { - "$ref": "1852" + "$ref": "1842" }, "streamKind": "jsonl", "contentTypes": [ @@ -31190,15 +30994,15 @@ "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.body", "methodParameterSegments": [ { - "$ref": "1850" + "$ref": "1840" }, { - "$id": "1856", + "$id": "1846", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$id": "1857", + "$id": "1847", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "", @@ -31248,7 +31052,7 @@ }, "parameters": [ { - "$ref": "1850" + "$ref": "1840" } ], "response": {}, @@ -31258,7 +31062,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.sendBytes" }, { - "$id": "1858", + "$id": "1848", "kind": "basic", "name": "receivePets", "isExactName": false, @@ -31268,18 +31072,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1859", + "$id": "1849", "name": "receivePets", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1860", + "$id": "1850", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "430" + "$ref": "426" }, "isApiVersion": false, "optional": false, @@ -31290,12 +31094,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.receivePets.accept", "methodParameterSegments": [ { - "$id": "1861", + "$id": "1851", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "430" + "$ref": "426" }, "location": "Header", "isApiVersion": false, @@ -31317,11 +31121,11 @@ 200 ], "bodyType": { - "$id": "1862", + "$id": "1852", "kind": "streaming", "name": "JsonlStreamUnionPets", "valueType": { - "$ref": "861" + "$ref": "855" }, "streamKind": "jsonl", "contentTypes": [ @@ -31334,7 +31138,7 @@ "name": "contentType", "nameInResponse": "content-type", "type": { - "$ref": "432" + "$ref": "428" } } ], @@ -31361,16 +31165,16 @@ }, "parameters": [ { - "$ref": "1861" + "$ref": "1851" } ], "response": { "type": { - "$id": "1863", + "$id": "1853", "kind": "streaming", "name": "JsonlStreamUnionPets", "valueType": { - "$ref": "861" + "$ref": "855" }, "streamKind": "jsonl", "contentTypes": [ @@ -31385,7 +31189,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.receivePets" }, { - "$id": "1864", + "$id": "1854", "kind": "basic", "name": "echoPets", "isExactName": false, @@ -31395,19 +31199,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1865", + "$id": "1855", "name": "echoPets", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1866", + "$id": "1856", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "434" + "$ref": "430" }, "isApiVersion": false, "optional": false, @@ -31418,13 +31222,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoPets.contentType", "methodParameterSegments": [ { - "$id": "1867", + "$id": "1857", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "434" + "$ref": "430" }, "location": "Header", "isApiVersion": false, @@ -31440,12 +31244,12 @@ "isExactName": false }, { - "$id": "1868", + "$id": "1858", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "436" + "$ref": "432" }, "isApiVersion": false, "optional": false, @@ -31456,12 +31260,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoPets.accept", "methodParameterSegments": [ { - "$id": "1869", + "$id": "1859", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "436" + "$ref": "432" }, "location": "Header", "isApiVersion": false, @@ -31477,12 +31281,12 @@ "isExactName": false }, { - "$id": "1870", + "$id": "1860", "kind": "body", "name": "pets", "serializedName": "pets", "type": { - "$ref": "865" + "$ref": "859" }, "isApiVersion": false, "contentTypes": [ @@ -31496,12 +31300,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoPets.pets", "methodParameterSegments": [ { - "$id": "1871", + "$id": "1861", "kind": "method", "name": "pets", "serializedName": "pets", "type": { - "$ref": "865" + "$ref": "859" }, "location": "Body", "isApiVersion": false, @@ -31528,7 +31332,7 @@ 200 ], "bodyType": { - "$ref": "865" + "$ref": "859" }, "headers": [], "isErrorResponse": false, @@ -31557,18 +31361,18 @@ }, "parameters": [ { - "$ref": "1871" + "$ref": "1861" }, { - "$ref": "1867" + "$ref": "1857" }, { - "$ref": "1869" + "$ref": "1859" } ], "response": { "type": { - "$ref": "865" + "$ref": "859" } }, "isOverride": false, @@ -31577,7 +31381,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoPets" }, { - "$id": "1872", + "$id": "1862", "kind": "basic", "name": "echoLookup", "isExactName": false, @@ -31587,19 +31391,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1873", + "$id": "1863", "name": "echoLookup", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1874", + "$id": "1864", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "438" + "$ref": "434" }, "isApiVersion": false, "optional": false, @@ -31610,13 +31414,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoLookup.contentType", "methodParameterSegments": [ { - "$id": "1875", + "$id": "1865", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "438" + "$ref": "434" }, "location": "Header", "isApiVersion": false, @@ -31632,12 +31436,12 @@ "isExactName": false }, { - "$id": "1876", + "$id": "1866", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "440" + "$ref": "436" }, "isApiVersion": false, "optional": false, @@ -31648,12 +31452,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoLookup.accept", "methodParameterSegments": [ { - "$id": "1877", + "$id": "1867", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "440" + "$ref": "436" }, "location": "Header", "isApiVersion": false, @@ -31669,12 +31473,12 @@ "isExactName": false }, { - "$id": "1878", + "$id": "1868", "kind": "body", "name": "pets", "serializedName": "pets", "type": { - "$ref": "867" + "$ref": "861" }, "isApiVersion": false, "contentTypes": [ @@ -31688,12 +31492,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoLookup.pets", "methodParameterSegments": [ { - "$id": "1879", + "$id": "1869", "kind": "method", "name": "pets", "serializedName": "pets", "type": { - "$ref": "867" + "$ref": "861" }, "location": "Body", "isApiVersion": false, @@ -31720,7 +31524,7 @@ 200 ], "bodyType": { - "$ref": "867" + "$ref": "861" }, "headers": [], "isErrorResponse": false, @@ -31749,18 +31553,18 @@ }, "parameters": [ { - "$ref": "1879" + "$ref": "1869" }, { - "$ref": "1875" + "$ref": "1865" }, { - "$ref": "1877" + "$ref": "1867" } ], "response": { "type": { - "$ref": "867" + "$ref": "861" } }, "isOverride": false, @@ -31769,7 +31573,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.echoLookup" }, { - "$id": "1880", + "$id": "1870", "kind": "basic", "name": "getCat", "isExactName": false, @@ -31779,18 +31583,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1881", + "$id": "1871", "name": "getCat", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1882", + "$id": "1872", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "442" + "$ref": "438" }, "isApiVersion": false, "optional": false, @@ -31801,12 +31605,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UnionExtends.getCat.accept", "methodParameterSegments": [ { - "$id": "1883", + "$id": "1873", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "442" + "$ref": "438" }, "location": "Header", "isApiVersion": false, @@ -31828,7 +31632,7 @@ 200 ], "bodyType": { - "$ref": "844" + "$ref": "838" }, "headers": [], "isErrorResponse": false, @@ -31854,12 +31658,12 @@ }, "parameters": [ { - "$ref": "1883" + "$ref": "1873" } ], "response": { "type": { - "$ref": "844" + "$ref": "838" } }, "isOverride": false, @@ -31870,12 +31674,12 @@ ], "parameters": [ { - "$id": "1884", + "$id": "1874", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1885", + "$id": "1875", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -31899,19 +31703,19 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1158" + "$ref": "1152" }, "isMultiServiceClient": false }, { - "$id": "1886", + "$id": "1876", "kind": "client", "name": "ConstructorRequirements", "isExactName": false, "namespace": "SampleTypeSpec", "methods": [ { - "$id": "1887", + "$id": "1877", "kind": "basic", "name": "send", "isExactName": false, @@ -31921,19 +31725,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1888", + "$id": "1878", "name": "send", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1889", + "$id": "1879", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "444" + "$ref": "440" }, "isApiVersion": false, "optional": false, @@ -31944,13 +31748,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.send.contentType", "methodParameterSegments": [ { - "$id": "1890", + "$id": "1880", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "444" + "$ref": "440" }, "location": "Header", "isApiVersion": false, @@ -31966,12 +31770,12 @@ "isExactName": false }, { - "$id": "1891", + "$id": "1881", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "973" + "$ref": "967" }, "isApiVersion": false, "contentTypes": [ @@ -31985,12 +31789,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.send.body", "methodParameterSegments": [ { - "$id": "1892", + "$id": "1882", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "973" + "$ref": "967" }, "location": "Body", "isApiVersion": false, @@ -32036,10 +31840,10 @@ }, "parameters": [ { - "$ref": "1892" + "$ref": "1882" }, { - "$ref": "1890" + "$ref": "1880" } ], "response": {}, @@ -32049,7 +31853,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.send" }, { - "$id": "1893", + "$id": "1883", "kind": "basic", "name": "sendReadOnly", "isExactName": false, @@ -32059,19 +31863,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1894", + "$id": "1884", "name": "sendReadOnly", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1895", + "$id": "1885", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "446" + "$ref": "442" }, "isApiVersion": false, "optional": false, @@ -32082,13 +31886,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnly.contentType", "methodParameterSegments": [ { - "$id": "1896", + "$id": "1886", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "446" + "$ref": "442" }, "location": "Header", "isApiVersion": false, @@ -32104,12 +31908,12 @@ "isExactName": false }, { - "$id": "1897", + "$id": "1887", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "981" + "$ref": "975" }, "isApiVersion": false, "contentTypes": [ @@ -32123,12 +31927,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnly.body", "methodParameterSegments": [ { - "$id": "1898", + "$id": "1888", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "981" + "$ref": "975" }, "location": "Body", "isApiVersion": false, @@ -32174,10 +31978,10 @@ }, "parameters": [ { - "$ref": "1898" + "$ref": "1888" }, { - "$ref": "1896" + "$ref": "1886" } ], "response": {}, @@ -32187,7 +31991,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnly" }, { - "$id": "1899", + "$id": "1889", "kind": "basic", "name": "sendReadOnlyLeaf", "isExactName": false, @@ -32197,19 +32001,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1900", + "$id": "1890", "name": "sendReadOnlyLeaf", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1901", + "$id": "1891", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "448" + "$ref": "444" }, "isApiVersion": false, "optional": false, @@ -32220,13 +32024,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnlyLeaf.contentType", "methodParameterSegments": [ { - "$id": "1902", + "$id": "1892", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "448" + "$ref": "444" }, "location": "Header", "isApiVersion": false, @@ -32242,12 +32046,12 @@ "isExactName": false }, { - "$id": "1903", + "$id": "1893", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "987" + "$ref": "981" }, "isApiVersion": false, "contentTypes": [ @@ -32261,12 +32065,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnlyLeaf.body", "methodParameterSegments": [ { - "$id": "1904", + "$id": "1894", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "987" + "$ref": "981" }, "location": "Body", "isApiVersion": false, @@ -32312,10 +32116,10 @@ }, "parameters": [ { - "$ref": "1904" + "$ref": "1894" }, { - "$ref": "1902" + "$ref": "1892" } ], "response": {}, @@ -32325,7 +32129,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnlyLeaf" }, { - "$id": "1905", + "$id": "1895", "kind": "basic", "name": "sendXml", "isExactName": false, @@ -32335,18 +32139,18 @@ "2024-08-16-preview" ], "operation": { - "$id": "1906", + "$id": "1896", "name": "sendXml", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1907", + "$id": "1897", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "450" + "$ref": "446" }, "isApiVersion": false, "optional": false, @@ -32357,12 +32161,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendXml.contentType", "methodParameterSegments": [ { - "$id": "1908", + "$id": "1898", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "450" + "$ref": "446" }, "location": "Header", "isApiVersion": false, @@ -32378,12 +32182,12 @@ "isExactName": false }, { - "$id": "1909", + "$id": "1899", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "990" + "$ref": "984" }, "isApiVersion": false, "contentTypes": [ @@ -32397,12 +32201,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendXml.body", "methodParameterSegments": [ { - "$id": "1910", + "$id": "1900", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "990" + "$ref": "984" }, "location": "Body", "isApiVersion": false, @@ -32448,10 +32252,10 @@ }, "parameters": [ { - "$ref": "1910" + "$ref": "1900" }, { - "$ref": "1908" + "$ref": "1898" } ], "response": {}, @@ -32461,7 +32265,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendXml" }, { - "$id": "1911", + "$id": "1901", "kind": "basic", "name": "sendInheritedLeaf", "isExactName": false, @@ -32471,19 +32275,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1912", + "$id": "1902", "name": "sendInheritedLeaf", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1913", + "$id": "1903", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "454" + "$ref": "450" }, "isApiVersion": false, "optional": false, @@ -32494,13 +32298,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendInheritedLeaf.contentType", "methodParameterSegments": [ { - "$id": "1914", + "$id": "1904", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "454" + "$ref": "450" }, "location": "Header", "isApiVersion": false, @@ -32516,12 +32320,12 @@ "isExactName": false }, { - "$id": "1915", + "$id": "1905", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1001" + "$ref": "995" }, "isApiVersion": false, "contentTypes": [ @@ -32535,12 +32339,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendInheritedLeaf.body", "methodParameterSegments": [ { - "$id": "1916", + "$id": "1906", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1001" + "$ref": "995" }, "location": "Body", "isApiVersion": false, @@ -32586,10 +32390,10 @@ }, "parameters": [ { - "$ref": "1916" + "$ref": "1906" }, { - "$ref": "1914" + "$ref": "1904" } ], "response": {}, @@ -32599,7 +32403,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendInheritedLeaf" }, { - "$id": "1917", + "$id": "1907", "kind": "basic", "name": "sendRenamed", "isExactName": false, @@ -32609,19 +32413,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1918", + "$id": "1908", "name": "sendRenamed", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1919", + "$id": "1909", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "456" + "$ref": "452" }, "isApiVersion": false, "optional": false, @@ -32632,13 +32436,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamed.contentType", "methodParameterSegments": [ { - "$id": "1920", + "$id": "1910", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "456" + "$ref": "452" }, "location": "Header", "isApiVersion": false, @@ -32654,12 +32458,12 @@ "isExactName": false }, { - "$id": "1921", + "$id": "1911", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1002" + "$ref": "996" }, "isApiVersion": false, "contentTypes": [ @@ -32673,12 +32477,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamed.body", "methodParameterSegments": [ { - "$id": "1922", + "$id": "1912", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1002" + "$ref": "996" }, "location": "Body", "isApiVersion": false, @@ -32724,10 +32528,10 @@ }, "parameters": [ { - "$ref": "1922" + "$ref": "1912" }, { - "$ref": "1920" + "$ref": "1910" } ], "response": {}, @@ -32737,7 +32541,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamed" }, { - "$id": "1923", + "$id": "1913", "kind": "basic", "name": "sendRenamedLeaf", "isExactName": false, @@ -32747,19 +32551,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1924", + "$id": "1914", "name": "sendRenamedLeaf", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1925", + "$id": "1915", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "458" + "$ref": "454" }, "isApiVersion": false, "optional": false, @@ -32770,13 +32574,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLeaf.contentType", "methodParameterSegments": [ { - "$id": "1926", + "$id": "1916", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "458" + "$ref": "454" }, "location": "Header", "isApiVersion": false, @@ -32792,12 +32596,12 @@ "isExactName": false }, { - "$id": "1927", + "$id": "1917", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1010" + "$ref": "1004" }, "isApiVersion": false, "contentTypes": [ @@ -32811,12 +32615,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLeaf.body", "methodParameterSegments": [ { - "$id": "1928", + "$id": "1918", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1010" + "$ref": "1004" }, "location": "Body", "isApiVersion": false, @@ -32862,10 +32666,10 @@ }, "parameters": [ { - "$ref": "1928" + "$ref": "1918" }, { - "$ref": "1926" + "$ref": "1916" } ], "response": {}, @@ -32875,7 +32679,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLeaf" }, { - "$id": "1929", + "$id": "1919", "kind": "basic", "name": "sendWritableLeaf", "isExactName": false, @@ -32885,19 +32689,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1930", + "$id": "1920", "name": "sendWritableLeaf", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1931", + "$id": "1921", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "460" + "$ref": "456" }, "isApiVersion": false, "optional": false, @@ -32908,13 +32712,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendWritableLeaf.contentType", "methodParameterSegments": [ { - "$id": "1932", + "$id": "1922", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "460" + "$ref": "456" }, "location": "Header", "isApiVersion": false, @@ -32930,12 +32734,12 @@ "isExactName": false }, { - "$id": "1933", + "$id": "1923", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1011" + "$ref": "1005" }, "isApiVersion": false, "contentTypes": [ @@ -32949,12 +32753,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendWritableLeaf.body", "methodParameterSegments": [ { - "$id": "1934", + "$id": "1924", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1011" + "$ref": "1005" }, "location": "Body", "isApiVersion": false, @@ -33000,10 +32804,10 @@ }, "parameters": [ { - "$ref": "1934" + "$ref": "1924" }, { - "$ref": "1932" + "$ref": "1922" } ], "response": {}, @@ -33013,7 +32817,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendWritableLeaf" }, { - "$id": "1935", + "$id": "1925", "kind": "basic", "name": "sendReturnedName", "isExactName": false, @@ -33023,19 +32827,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1936", + "$id": "1926", "name": "sendReturnedName", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1937", + "$id": "1927", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "462" + "$ref": "458" }, "isApiVersion": false, "optional": false, @@ -33046,13 +32850,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReturnedName.contentType", "methodParameterSegments": [ { - "$id": "1938", + "$id": "1928", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "462" + "$ref": "458" }, "location": "Header", "isApiVersion": false, @@ -33068,12 +32872,12 @@ "isExactName": false }, { - "$id": "1939", + "$id": "1929", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1020" + "$ref": "1014" }, "isApiVersion": false, "contentTypes": [ @@ -33087,12 +32891,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReturnedName.body", "methodParameterSegments": [ { - "$id": "1940", + "$id": "1930", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1020" + "$ref": "1014" }, "location": "Body", "isApiVersion": false, @@ -33138,10 +32942,10 @@ }, "parameters": [ { - "$ref": "1940" + "$ref": "1930" }, { - "$ref": "1938" + "$ref": "1928" } ], "response": {}, @@ -33151,7 +32955,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReturnedName" }, { - "$id": "1941", + "$id": "1931", "kind": "basic", "name": "sendRequiredRenamed", "isExactName": false, @@ -33161,19 +32965,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1942", + "$id": "1932", "name": "sendRequiredRenamed", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1943", + "$id": "1933", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "464" + "$ref": "460" }, "isApiVersion": false, "optional": false, @@ -33184,13 +32988,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRequiredRenamed.contentType", "methodParameterSegments": [ { - "$id": "1944", + "$id": "1934", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "464" + "$ref": "460" }, "location": "Header", "isApiVersion": false, @@ -33206,12 +33010,12 @@ "isExactName": false }, { - "$id": "1945", + "$id": "1935", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1023" + "$ref": "1017" }, "isApiVersion": false, "contentTypes": [ @@ -33225,12 +33029,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRequiredRenamed.body", "methodParameterSegments": [ { - "$id": "1946", + "$id": "1936", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1023" + "$ref": "1017" }, "location": "Body", "isApiVersion": false, @@ -33276,10 +33080,10 @@ }, "parameters": [ { - "$ref": "1946" + "$ref": "1936" }, { - "$ref": "1944" + "$ref": "1934" } ], "response": {}, @@ -33289,7 +33093,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRequiredRenamed" }, { - "$id": "1947", + "$id": "1937", "kind": "basic", "name": "sendReadOnlyCollections", "isExactName": false, @@ -33299,19 +33103,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1948", + "$id": "1938", "name": "sendReadOnlyCollections", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1949", + "$id": "1939", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "466" + "$ref": "462" }, "isApiVersion": false, "optional": false, @@ -33322,13 +33126,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnlyCollections.contentType", "methodParameterSegments": [ { - "$id": "1950", + "$id": "1940", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "466" + "$ref": "462" }, "location": "Header", "isApiVersion": false, @@ -33344,12 +33148,12 @@ "isExactName": false }, { - "$id": "1951", + "$id": "1941", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1026" + "$ref": "1020" }, "isApiVersion": false, "contentTypes": [ @@ -33363,12 +33167,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnlyCollections.body", "methodParameterSegments": [ { - "$id": "1952", + "$id": "1942", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1026" + "$ref": "1020" }, "location": "Body", "isApiVersion": false, @@ -33414,10 +33218,10 @@ }, "parameters": [ { - "$ref": "1952" + "$ref": "1942" }, { - "$ref": "1950" + "$ref": "1940" } ], "response": {}, @@ -33427,7 +33231,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendReadOnlyCollections" }, { - "$id": "1953", + "$id": "1943", "kind": "basic", "name": "sendRequiredCollections", "isExactName": false, @@ -33437,19 +33241,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1954", + "$id": "1944", "name": "sendRequiredCollections", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1955", + "$id": "1945", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "468" + "$ref": "464" }, "isApiVersion": false, "optional": false, @@ -33460,13 +33264,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRequiredCollections.contentType", "methodParameterSegments": [ { - "$id": "1956", + "$id": "1946", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "468" + "$ref": "464" }, "location": "Header", "isApiVersion": false, @@ -33482,12 +33286,12 @@ "isExactName": false }, { - "$id": "1957", + "$id": "1947", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1032" + "$ref": "1026" }, "isApiVersion": false, "contentTypes": [ @@ -33501,12 +33305,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRequiredCollections.body", "methodParameterSegments": [ { - "$id": "1958", + "$id": "1948", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1032" + "$ref": "1026" }, "location": "Body", "isApiVersion": false, @@ -33552,10 +33356,10 @@ }, "parameters": [ { - "$ref": "1958" + "$ref": "1948" }, { - "$ref": "1956" + "$ref": "1946" } ], "response": {}, @@ -33565,7 +33369,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRequiredCollections" }, { - "$id": "1959", + "$id": "1949", "kind": "basic", "name": "sendRenamedLiteral", "isExactName": false, @@ -33575,19 +33379,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1960", + "$id": "1950", "name": "sendRenamedLiteral", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1961", + "$id": "1951", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "470" + "$ref": "466" }, "isApiVersion": false, "optional": false, @@ -33598,13 +33402,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLiteral.contentType", "methodParameterSegments": [ { - "$id": "1962", + "$id": "1952", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "470" + "$ref": "466" }, "location": "Header", "isApiVersion": false, @@ -33620,12 +33424,12 @@ "isExactName": false }, { - "$id": "1963", + "$id": "1953", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "472" + "$ref": "468" }, "isApiVersion": false, "optional": false, @@ -33636,12 +33440,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLiteral.accept", "methodParameterSegments": [ { - "$id": "1964", + "$id": "1954", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "472" + "$ref": "468" }, "location": "Header", "isApiVersion": false, @@ -33657,12 +33461,12 @@ "isExactName": false }, { - "$id": "1965", + "$id": "1955", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1035" + "$ref": "1029" }, "isApiVersion": false, "contentTypes": [ @@ -33676,12 +33480,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLiteral.body", "methodParameterSegments": [ { - "$id": "1966", + "$id": "1956", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1035" + "$ref": "1029" }, "location": "Body", "isApiVersion": false, @@ -33708,7 +33512,7 @@ 200 ], "bodyType": { - "$ref": "1035" + "$ref": "1029" }, "headers": [], "isErrorResponse": false, @@ -33737,18 +33541,18 @@ }, "parameters": [ { - "$ref": "1966" + "$ref": "1956" }, { - "$ref": "1962" + "$ref": "1952" }, { - "$ref": "1964" + "$ref": "1954" } ], "response": { "type": { - "$ref": "1035" + "$ref": "1029" } }, "isOverride": false, @@ -33757,7 +33561,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendRenamedLiteral" }, { - "$id": "1967", + "$id": "1957", "kind": "basic", "name": "sendClientNameCollision", "isExactName": false, @@ -33767,19 +33571,19 @@ "2024-08-16-preview" ], "operation": { - "$id": "1968", + "$id": "1958", "name": "sendClientNameCollision", "isExactName": false, "accessibility": "public", "parameters": [ { - "$id": "1969", + "$id": "1959", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "474" + "$ref": "470" }, "isApiVersion": false, "optional": false, @@ -33790,13 +33594,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendClientNameCollision.contentType", "methodParameterSegments": [ { - "$id": "1970", + "$id": "1960", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "474" + "$ref": "470" }, "location": "Header", "isApiVersion": false, @@ -33812,12 +33616,12 @@ "isExactName": false }, { - "$id": "1971", + "$id": "1961", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "476" + "$ref": "472" }, "isApiVersion": false, "optional": false, @@ -33828,12 +33632,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendClientNameCollision.accept", "methodParameterSegments": [ { - "$id": "1972", + "$id": "1962", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "476" + "$ref": "472" }, "location": "Header", "isApiVersion": false, @@ -33849,12 +33653,12 @@ "isExactName": false }, { - "$id": "1973", + "$id": "1963", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "1040" + "$ref": "1034" }, "isApiVersion": false, "contentTypes": [ @@ -33868,12 +33672,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ConstructorRequirements.sendClientNameCollision.body", "methodParameterSegments": [ { - "$id": "1974", + "$id": "1964", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "1040" + "$ref": "1034" }, "location": "Body", "isApiVersion": false, @@ -33900,7 +33704,7 @@ 200 ], "bodyType": { - "$ref": "1040" + "$ref": "1034" }, "headers": [], "isErrorResponse": false, @@ -33929,18 +33733,18 @@ }, "parameters": [ { - "$ref": "1974" + "$ref": "1964" }, { - "$ref": "1970" + "$ref": "1960" }, { - "$ref": "1972" + "$ref": "1962" } ], "response": { "type": { - "$ref": "1040" + "$ref": "1034" } }, "isOverride": false, @@ -33951,12 +33755,12 @@ ], "parameters": [ { - "$id": "1975", + "$id": "1965", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "1976", + "$id": "1966", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -33980,7 +33784,7 @@ "2024-08-16-preview" ], "parent": { - "$ref": "1158" + "$ref": "1152" }, "isMultiServiceClient": false } @@ -34007,67 +33811,67 @@ }, "unions": [ { - "$ref": "861" + "$ref": "855" }, { - "$ref": "870" + "$ref": "864" }, { - "$ref": "954" + "$ref": "948" }, { - "$ref": "1454" + "$ref": "1448" }, { - "$ref": "1619" + "$ref": "1609" }, { - "$ref": "1644" + "$ref": "1634" }, { - "$ref": "1653" + "$ref": "1643" }, { - "$ref": "1662" + "$ref": "1652" }, { - "$ref": "1687" + "$ref": "1677" }, { - "$ref": "1696" + "$ref": "1686" }, { - "$ref": "1705" + "$ref": "1695" }, { - "$ref": "1722" + "$ref": "1712" }, { - "$ref": "1747" + "$ref": "1737" }, { - "$ref": "1756" + "$ref": "1746" }, { - "$ref": "1765" + "$ref": "1755" }, { - "$ref": "1774" + "$ref": "1764" }, { - "$ref": "1799" + "$ref": "1789" }, { - "$ref": "1808" + "$ref": "1798" }, { - "$ref": "1817" + "$ref": "1807" }, { - "$ref": "1826" + "$ref": "1816" }, { - "$ref": "1835" + "$ref": "1825" } ] }