diff --git a/eng/packages/http-client-csharp/eng/scripts/Spector-Helper.psm1 b/eng/packages/http-client-csharp/eng/scripts/Spector-Helper.psm1 index 7c1d02dfc94c..8961d69ac172 100644 --- a/eng/packages/http-client-csharp/eng/scripts/Spector-Helper.psm1 +++ b/eng/packages/http-client-csharp/eng/scripts/Spector-Helper.psm1 @@ -2,7 +2,6 @@ $repoRoot = Resolve-Path (Join-Path $PSScriptRoot '..') $failingSpecs = @( Join-Path 'http' 'streaming' 'jsonl' - Join-Path 'http' 'payload' 'xml' Join-Path 'http' 'response' 'status-code-range' # Response namespace conflicts with Azure.Response # Azure scenarios not yet buildable Join-Path 'http' 'azure' 'client-generator-core' 'alternate-type' diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Azure.Generator.csproj b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Azure.Generator.csproj index bf39faf4a924..6a624a5024d5 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Azure.Generator.csproj +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Azure.Generator.csproj @@ -9,27 +9,27 @@ - + - - - - + + + + - - - - - - - + + + + + + + - + - - + + + $(MSBuildThisFileDirectory)..\..\..\..\..\..\sdk\core\Azure.Core\src\Shared\FixedDelayWithNoJitterStrategy.cs; + $(MSBuildThisFileDirectory)..\..\..\..\..\..\sdk\core\Azure.Core\src\Shared\IXmlSerializable.cs; + $(MSBuildThisFileDirectory)..\..\..\..\..\..\sdk\core\Azure.Core\src\Shared\XmlWriterContent.cs;"> Shared/Core Always - + \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureClientGenerator.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureClientGenerator.cs index d6bf827f9e9d..6c8edadb0986 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureClientGenerator.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureClientGenerator.cs @@ -94,5 +94,6 @@ protected override void Configure() AddVisitor(new SystemTextJsonConverterVisitor()); AddVisitor(new MultiPartFormDataVisitor()); AddVisitor(new InvokeDelimitedMethodVisitor()); + AddVisitor(new XmlSerializableVisitor()); } } \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/NewAzureProjectScaffolding.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/NewAzureProjectScaffolding.cs index 801d8d1c4c04..0fa2ebbb00d8 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/NewAzureProjectScaffolding.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/NewAzureProjectScaffolding.cs @@ -77,6 +77,12 @@ protected override string GetSourceProjectFileContent() "VoidValue.cs" ]; + private static readonly IReadOnlyList _xmlSerializationSharedFiles = + [ + "IXmlSerializable.cs", + "XmlWriterContent.cs", + ]; + private static void TraverseInput(InputClient rootClient, ref bool hasOperation, ref bool hasLongRunningOperation) { if (hasOperation && hasLongRunningOperation) @@ -179,6 +185,15 @@ protected override IReadOnlyList BuildCompileInclud compileIncludes.Add(new CSharpProjectCompileInclude(GetCompileInclude("TaskExtensions.cs"), SharedSourceLinkBase)); } + // Add IXmlSerializable if any model supports XML serialization + if (AzureClientGenerator.Instance.InputLibrary.HasXmlModelSerialization) + { + foreach (var file in _xmlSerializationSharedFiles) + { + compileIncludes.Add(new CSharpProjectCompileInclude(GetCompileInclude(file), SharedSourceLinkBase)); + } + } + return compileIncludes; } } diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json index 2e61964092c0..fedf33692634 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json @@ -300,6 +300,11 @@ "commandName": "Executable", "executablePath": "dotnet" }, + "http-payload-xml": { + "commandLineArgs": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.dll $(SolutionDir)/TestProjects/Spector/http/payload/xml -g AzureStubGenerator", + "commandName": "Executable", + "executablePath": "dotnet" + }, "http-resiliency-srv-driven-v1": { "commandLineArgs": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.dll $(SolutionDir)/TestProjects/Spector/http/resiliency/srv-driven/v1 -g AzureStubGenerator", "commandName": "Executable", diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Snippets/XmlWriterContentSnippets.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Snippets/XmlWriterContentSnippets.cs new file mode 100644 index 000000000000..1922146a43a9 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Snippets/XmlWriterContentSnippets.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Microsoft.TypeSpec.Generator.Snippets; +using System.Xml; + +namespace Azure.Generator.Snippets +{ + internal static class XmlWriterContentSnippets + { + public static ScopedApi XmlWriter(this ScopedApi content) + => content.Property(nameof(XmlWriterContent.XmlWriter)).As(); + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/XmlSerializableVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/XmlSerializableVisitor.cs new file mode 100644 index 000000000000..3a9680a9c68e --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/XmlSerializableVisitor.cs @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Generator.Snippets; +using System.Collections.Generic; +using System.Linq; +using System.Xml; +using Microsoft.TypeSpec.Generator.ClientModel; +using Microsoft.TypeSpec.Generator.ClientModel.Providers; +using Microsoft.TypeSpec.Generator.Expressions; +using Microsoft.TypeSpec.Generator.Input; +using Microsoft.TypeSpec.Generator.Primitives; +using Microsoft.TypeSpec.Generator.Providers; +using Microsoft.TypeSpec.Generator.Statements; +using static Microsoft.TypeSpec.Generator.Snippets.Snippet; + +namespace Azure.Generator.Visitors +{ + /// + /// Visitor that adds interface implementation to models that support XML serialization. + /// + /// + /// This visitor performs the following modifications: + /// + /// + /// + /// For models with usage, adds the interface + /// and implements the explicit void IXmlSerializable.Write(XmlWriter writer, string nameHint) method. + /// + /// + /// + /// + /// Updates the WriteObjectValue extension method in + /// to add a case for in the switch statement. + /// + /// + /// + /// + /// For models that ONLY support XML serialization (not JSON), updates the implicit RequestContent operator + /// to use . + /// + /// + /// + /// + internal class XmlSerializableVisitor : ScmLibraryVisitor + { + private const string WriteMethodName = "Write"; + private const string WriteObjectValueMethodName = "WriteObjectValue"; + private static readonly CSharpType IXmlSerializableType = typeof(IXmlSerializable); + private static readonly CSharpType RequestContentType = typeof(RequestContent); + private readonly Dictionary _xmlSerializationProviders = []; + + protected override ModelProvider? PreVisitModel(InputModelType model, ModelProvider? type) + { + if (model.Usage.HasFlag(InputModelTypeUsage.Xml) && type is not null) + { + foreach (var serializationProvider in type.SerializationProviders) + { + _xmlSerializationProviders.TryAdd(serializationProvider, model); + } + } + + return type; + } + + protected override TypeProvider? VisitType(TypeProvider type) + { + if (type is MrwSerializationTypeDefinition serializationProvider) + { + if (_xmlSerializationProviders.TryGetValue(serializationProvider, out var inputModel)) + { + AddIXmlSerializableImplementation(serializationProvider); + + string? xmlElementName = inputModel.SerializationOptions?.Xml?.Name; + if (inputModel.Usage.HasFlag(InputModelTypeUsage.Json)) + { + UpdateImplicitRequestContentOperatorForJsonAndXml(serializationProvider); + } + else if (xmlElementName is not null) + { + UpdateImplicitRequestContentOperatorForXmlOnly(serializationProvider, xmlElementName); + } + } + } + else if (type is ModelSerializationExtensionsDefinition modelSerializationExtensions) + { + UpdateWriteObjectValueMethod(modelSerializationExtensions); + } + + return type; + } + + private static void AddIXmlSerializableImplementation(TypeProvider serializationProvider) + { + var writerParameter = new ParameterProvider("writer", $"The XML writer.", typeof(XmlWriter)); + var nameHintParameter = new ParameterProvider("nameHint", $"An optional name hint.", new CSharpType(typeof(string))); + + var methodSignature = new MethodSignature( + WriteMethodName, + null, + MethodSignatureModifiers.None, + null, + null, + [writerParameter, nameHintParameter], + ExplicitInterface: IXmlSerializableType); + + var bodyExpression = This.Invoke( + WriteMethodName, + [writerParameter, Static().Property("WireOptions"), nameHintParameter]); + + var ixmlSerializableWriteMethod = new MethodProvider(methodSignature, bodyExpression, serializationProvider); + + // Update the serialization provider with the new interface and method + var updatedImplements = new List(serializationProvider.Implements) { IXmlSerializableType }; + serializationProvider.Update( + implements: updatedImplements, + methods: [.. serializationProvider.Methods, ixmlSerializableWriteMethod]); + } + + private static void UpdateWriteObjectValueMethod(ModelSerializationExtensionsDefinition type) + { + var writeObjectValueMethod = type.Methods + .FirstOrDefault(m => m.Signature.Name == WriteObjectValueMethodName && + m.Signature.Parameters.Count >= 2 && + m.Signature.Parameters[0].Type.Equals(typeof(XmlWriter))); + + if (writeObjectValueMethod is null) + { + return; + } + + var existingBody = writeObjectValueMethod.BodyStatements; + if (existingBody is null) + { + return; + } + + // Add nameHint parameter to the method signature + var nameHintParam = new ParameterProvider( + "nameHint", + $"An optional name hint.", + new CSharpType(typeof(string), + isNullable: true), + DefaultOf(new CSharpType(typeof(string), + isNullable: true))); + var updatedParams = new List(writeObjectValueMethod.Signature.Parameters) { nameHintParam }; + writeObjectValueMethod.Signature.Update(parameters: updatedParams); + + var writerParam = writeObjectValueMethod.Signature.Parameters[0]; + var caseMatch = new DeclarationExpression(IXmlSerializableType, "xmlSerializable", out var xmlSerializableVar); + var caseBody = new MethodBodyStatements( + [ + xmlSerializableVar.Invoke(WriteMethodName, [writerParam, nameHintParam]).Terminate(), + Break + ]); + var ixmlSerializableCase = new SwitchCaseStatement( + caseMatch, + caseBody); + + List newBodyStatements = []; + bool caseAdded = false; + + // Handle different body statement structures + IEnumerable statements = existingBody switch + { + MethodBodyStatements methodBodyStatements => methodBodyStatements.Statements, + _ => [existingBody] + }; + + foreach (var statement in statements) + { + if (statement is SwitchStatement switchStatement && !caseAdded) + { + var newCases = new List { ixmlSerializableCase }; + newCases.AddRange(switchStatement.Cases); + + var newSwitchStatement = new SwitchStatement(switchStatement.MatchExpression, [.. newCases]); + newBodyStatements.Add(newSwitchStatement); + caseAdded = true; + } + else + { + newBodyStatements.Add(statement); + } + } + + if (caseAdded) + { + writeObjectValueMethod.Update(bodyStatements: newBodyStatements); + } + } + + private static void UpdateImplicitRequestContentOperatorForXmlOnly(TypeProvider serializationProvider, string xmlElementName) + { + var implicitOperator = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Implicit) && + m.Signature.ReturnType?.Equals(RequestContentType) == true && + m.Signature.Parameters.Count == 1); + + if (implicitOperator is null) + { + return; + } + + var modelParameter = implicitOperator.Signature.Parameters[0]; + + // Build new method body: + // if (model == null) { return null; } + // var content = new XmlWriterContent(); + // content.XmlWriter.WriteObjectValue(model, ModelSerializationExtensions.WireOptions, "XmlElementName"); + // return content; + var newBody = new MethodBodyStatements( + [ + new IfStatement(modelParameter.Equal(Null)) + { + Return(Null) + }, + Declare("content", typeof(XmlWriterContent), New.Instance(typeof(XmlWriterContent)), out var contentVar), + contentVar.As().XmlWriter().Invoke( + WriteObjectValueMethodName, + [modelParameter, Static().Property("WireOptions"), Literal(xmlElementName)]).Terminate(), + Return(contentVar) + ]); + + implicitOperator.Update(bodyStatements: newBody); + } + + private static void UpdateImplicitRequestContentOperatorForJsonAndXml(TypeProvider serializationProvider) + { + // Find the implicit operator RequestContent method + var implicitOperator = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Implicit) && + m.Signature.ReturnType?.Equals(RequestContentType) == true && + m.Signature.Parameters.Count == 1); + + if (implicitOperator is null) + { + return; + } + + var modelParameter = implicitOperator.Signature.Parameters[0]; + var modelSerializationExtensions = Static(); + + var newBody = new MethodBodyStatements( + [ + new IfStatement(modelParameter.Equal(Null)) + { + Return(Null) + }, + Return(Static(RequestContentType).Invoke(nameof(RequestContent.Create), [modelParameter, modelSerializationExtensions.Property("WireOptions")])) + ]); + + implicitOperator.Update(bodyStatements: newBody); + } + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/XmlSerializableVisitorTests/JsonAndXmlModel_ImplicitOperatorUsesRequestContentCreate.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/XmlSerializableVisitorTests/JsonAndXmlModel_ImplicitOperatorUsesRequestContentCreate.cs new file mode 100644 index 000000000000..45529bcbf764 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/XmlSerializableVisitorTests/JsonAndXmlModel_ImplicitOperatorUsesRequestContentCreate.cs @@ -0,0 +1,5 @@ +if ((dualFormatModel == null)) +{ + return null; +} +return global::Azure.Core.RequestContent.Create(dualFormatModel, global::Samples.ModelSerializationExtensions.WireOptions); diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/XmlSerializableVisitorTests/WriteMethodHasCorrectBody.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/XmlSerializableVisitorTests/WriteMethodHasCorrectBody.cs new file mode 100644 index 000000000000..609a75e1d1a7 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/XmlSerializableVisitorTests/WriteMethodHasCorrectBody.cs @@ -0,0 +1 @@ +this.Write(writer, global::Samples.ModelSerializationExtensions.WireOptions, nameHint) \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/XmlSerializableVisitorTests/XmlOnlyModel_ImplicitOperatorUsesXmlWriterContent.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/XmlSerializableVisitorTests/XmlOnlyModel_ImplicitOperatorUsesXmlWriterContent.cs new file mode 100644 index 000000000000..cbe386963e04 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/XmlSerializableVisitorTests/XmlOnlyModel_ImplicitOperatorUsesXmlWriterContent.cs @@ -0,0 +1,7 @@ +if ((xmlOnlyModel == null)) +{ + return null; +} +global::Azure.Core.XmlWriterContent content = new global::Azure.Core.XmlWriterContent(); +content.XmlWriter.WriteObjectValue(xmlOnlyModel, global::Samples.ModelSerializationExtensions.WireOptions, "TestElement"); +return content; diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/XmlSerializableVisitorTests.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/XmlSerializableVisitorTests.cs new file mode 100644 index 000000000000..031ef799c2f3 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/XmlSerializableVisitorTests.cs @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Generator.Tests.Common; +using Azure.Generator.Tests.TestHelpers; +using Azure.Generator.Visitors; +using Microsoft.TypeSpec.Generator.ClientModel.Providers; +using Microsoft.TypeSpec.Generator.Input; +using Microsoft.TypeSpec.Generator.Primitives; +using Microsoft.TypeSpec.Generator.Providers; +using Microsoft.TypeSpec.Generator.Statements; +using NUnit.Framework; +using System; +using System.Linq; +using System.Xml; + +namespace Azure.Generator.Tests.Visitors +{ + public class XmlSerializableVisitorTests + { + [Test] + public void AddsIXmlSerializableInterfaceWhenXmlUsagePresent() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel = InputFactory.Model( + "TestXmlModel", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Xml); + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel]); + + var modelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(inputModel); + Assert.IsNotNull(modelProvider); + visitor.InvokePreVisitModel(inputModel, modelProvider); + + var serializationProvider = modelProvider!.SerializationProviders[0]; + visitor.InvokeVisitType(serializationProvider); + + var ixmlSerializableInterface = serializationProvider.Implements + .FirstOrDefault(i => i.Name == nameof(IXmlSerializable)); + Assert.IsNotNull(ixmlSerializableInterface, "IXmlSerializable interface should be added"); + } + + [Test] + public void DoesNotAddIXmlSerializableWhenXmlUsageAbsent() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel = InputFactory.Model( + "TestJsonModel", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Json); + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel]); + + var modelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(inputModel); + Assert.IsNotNull(modelProvider); + + visitor.InvokePreVisitModel(inputModel, modelProvider); + + var serializationProvider = modelProvider!.SerializationProviders[0]; + visitor.InvokeVisitType(serializationProvider); + + var ixmlSerializableInterface = serializationProvider.Implements + .FirstOrDefault(i => i.Name == nameof(IXmlSerializable)); + Assert.IsNull(ixmlSerializableInterface, "IXmlSerializable interface should not be added without Xml usage"); + } + + [Test] + public void AddsWriteMethodWithCorrectSignature() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel = InputFactory.Model( + "TestXmlModel", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Xml); + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel]); + + var modelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(inputModel); + Assert.IsNotNull(modelProvider); + + visitor.InvokePreVisitModel(inputModel, modelProvider); + var serializationProvider = modelProvider!.SerializationProviders[0]; + visitor.InvokeVisitType(serializationProvider); + + var writeMethod = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Name == "Write" && + m.Signature.ExplicitInterface?.Name == nameof(IXmlSerializable)); + Assert.IsNotNull(writeMethod, "IXmlSerializable.Write method should be added"); + Assert.AreEqual(2, writeMethod!.Signature.Parameters.Count, "Write method should have 2 parameters"); + Assert.AreEqual("writer", writeMethod.Signature.Parameters[0].Name); + Assert.AreEqual("nameHint", writeMethod.Signature.Parameters[1].Name); + Assert.IsNotNull(writeMethod.BodyExpression, "Write method should have expression body"); + } + + [Test] + public void WriteMethodHasCorrectBody() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel = InputFactory.Model( + "TestXmlModel", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Xml); + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel]); + + var modelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(inputModel); + Assert.IsNotNull(modelProvider); + + visitor.InvokePreVisitModel(inputModel, modelProvider); + var serializationProvider = modelProvider!.SerializationProviders[0]; + visitor.InvokeVisitType(serializationProvider); + + var writeMethod = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Name == "Write" && + m.Signature.ExplicitInterface?.Name == nameof(IXmlSerializable)); + Assert.IsNotNull(writeMethod); + + var bodyExpression = writeMethod!.BodyExpression!.ToDisplayString(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), bodyExpression); + } + + [Test] + public void MultipleXmlModelsAllGetInterface() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel1 = InputFactory.Model( + "XmlModel1", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Xml); + var inputModel2 = InputFactory.Model( + "XmlModel2", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Xml); + var inputModel3 = InputFactory.Model( + "JsonModel", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Json); + + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel1, inputModel2, inputModel3]); + + var modelProvider1 = AzureClientGenerator.Instance.TypeFactory.CreateModel(inputModel1); + var modelProvider2 = AzureClientGenerator.Instance.TypeFactory.CreateModel(inputModel2); + var modelProvider3 = AzureClientGenerator.Instance.TypeFactory.CreateModel(inputModel3); + + visitor.InvokePreVisitModel(inputModel1, modelProvider1); + visitor.InvokePreVisitModel(inputModel2, modelProvider2); + visitor.InvokePreVisitModel(inputModel3, modelProvider3); + + var serialization1 = modelProvider1!.SerializationProviders[0]; + var serialization2 = modelProvider2!.SerializationProviders[0]; + var serialization3 = modelProvider3!.SerializationProviders[0]; + + visitor.InvokeVisitType(serialization1); + visitor.InvokeVisitType(serialization2); + visitor.InvokeVisitType(serialization3); + + Assert.IsTrue(serialization1.Implements.Any(i => i.Name == nameof(IXmlSerializable)), + "XmlModel1 should implement IXmlSerializable"); + Assert.IsTrue(serialization2.Implements.Any(i => i.Name == nameof(IXmlSerializable)), + "XmlModel2 should implement IXmlSerializable"); + Assert.IsFalse(serialization3.Implements.Any(i => i.Name == nameof(IXmlSerializable)), + "JsonModel should NOT implement IXmlSerializable"); + } + + [Test] + public void AddsIXmlSerializableWhenModelHasBothXmlAndJsonUsage() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel = InputFactory.Model( + "DualFormatModel", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Xml | InputModelTypeUsage.Json); + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel]); + + var modelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(inputModel); + Assert.IsNotNull(modelProvider); + + visitor.InvokePreVisitModel(inputModel, modelProvider); + var serializationProvider = modelProvider!.SerializationProviders[0]; + visitor.InvokeVisitType(serializationProvider); + + var ixmlSerializableInterface = serializationProvider.Implements + .FirstOrDefault(i => i.Name == nameof(IXmlSerializable)); + Assert.IsNotNull(ixmlSerializableInterface, "IXmlSerializable interface should be added for models with both Xml and Json usage"); + + var writeMethod = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Name == "Write" && + m.Signature.ExplicitInterface?.Name == nameof(IXmlSerializable)); + Assert.IsNotNull(writeMethod, "IXmlSerializable.Write method should be added"); + } + + [Test] + public void UpdatesWriteObjectValueMethodWithIXmlSerializableCase() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel = InputFactory.Model( + "TestXmlModel", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Xml); + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel]); + + var modelSerializationExtensions = new ModelSerializationExtensionsDefinition(); + + var writeObjectValueMethod = modelSerializationExtensions.Methods + .FirstOrDefault(m => m.Signature.Name == "WriteObjectValue" && + m.Signature.Parameters.Count >= 2 && + m.Signature.Parameters[0].Type.Equals(typeof(XmlWriter))); + Assert.IsNotNull(writeObjectValueMethod, "WriteObjectValue method for XmlWriter should exist"); + + var bodyBefore = writeObjectValueMethod!.BodyStatements; + Assert.IsNotNull(bodyBefore); + + visitor.InvokeVisitType(modelSerializationExtensions); + + var bodyAfter = writeObjectValueMethod.BodyStatements; + Assert.IsNotNull(bodyAfter); + + var hasIXmlSerializableCase = ContainsIXmlSerializableCase(bodyAfter!); + Assert.IsTrue(hasIXmlSerializableCase, "WriteObjectValue should have IXmlSerializable case after visitor"); + } + + [Test] + public void WriteObjectValueIXmlSerializableCaseIsFirstInSwitch() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel = InputFactory.Model( + "TestXmlModel", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Xml); + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel]); + + var modelSerializationExtensions = new ModelSerializationExtensionsDefinition(); + + visitor.InvokeVisitType(modelSerializationExtensions); + + var writeObjectValueMethod = modelSerializationExtensions.Methods + .FirstOrDefault(m => m.Signature.Name == "WriteObjectValue" && + m.Signature.Parameters.Count >= 2 && + m.Signature.Parameters[0].Type.Equals(typeof(XmlWriter))); + Assert.IsNotNull(writeObjectValueMethod, "WriteObjectValue method for XmlWriter should exist"); + + var body = writeObjectValueMethod!.BodyStatements; + Assert.IsNotNull(body); + + var switchStatement = GetSwitchStatement(body!); + Assert.IsNotNull(switchStatement, "Should have a switch statement"); + + var cases = switchStatement!.Cases.ToList(); + Assert.IsTrue(cases.Count > 0, "Switch should have cases"); + + var bodyString = body!.ToDisplayString(); + var ixmlSerializableIndex = bodyString.IndexOf("IXmlSerializable"); + var iPersistableModelIndex = bodyString.IndexOf("IPersistableModel"); + + Assert.IsTrue(ixmlSerializableIndex >= 0, "Should contain IXmlSerializable case"); + Assert.IsTrue(iPersistableModelIndex >= 0, "Should contain IPersistableModel case"); + Assert.IsTrue(ixmlSerializableIndex < iPersistableModelIndex, + "IXmlSerializable case should come before IPersistableModel case"); + } + + [Test] + public void WriteObjectValueMethod_HasNameHintParameter() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel = InputFactory.Model( + "TestXmlModel", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Xml); + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel]); + + var modelSerializationExtensions = new ModelSerializationExtensionsDefinition(); + + var writeObjectValueMethod = modelSerializationExtensions.Methods + .FirstOrDefault(m => m.Signature.Name == "WriteObjectValue" && + m.Signature.Parameters.Count >= 2 && + m.Signature.Parameters[0].Type.Equals(typeof(XmlWriter))); + Assert.IsNotNull(writeObjectValueMethod, "WriteObjectValue method for XmlWriter should exist"); + + var initialParamCount = writeObjectValueMethod!.Signature.Parameters.Count; + + visitor.InvokeVisitType(modelSerializationExtensions); + + Assert.AreEqual(initialParamCount + 1, writeObjectValueMethod.Signature.Parameters.Count, + "nameHint parameter should be added"); + + var nameHintParam = writeObjectValueMethod.Signature.Parameters.LastOrDefault(); + Assert.IsNotNull(nameHintParam); + Assert.AreEqual("nameHint", nameHintParam!.Name); + Assert.IsTrue(nameHintParam.Type.IsNullable, "nameHint should be nullable"); + Assert.AreEqual(typeof(string), nameHintParam.Type.FrameworkType); + } + + [Test] + public void JsonOnlyModel_DoesNotChangeImplicitOperator() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel = InputFactory.Model( + "JsonOnlyModel", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Json); + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel]); + + var modelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(inputModel); + Assert.IsNotNull(modelProvider); + + var serializationProvider = modelProvider!.SerializationProviders[0]; + + var implicitOperatorBefore = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Implicit) && + m.Signature.ReturnType?.Equals(typeof(RequestContent)) == true); + var bodyBefore = implicitOperatorBefore?.BodyStatements?.ToDisplayString(); + + visitor.InvokePreVisitModel(inputModel, modelProvider); + visitor.InvokeVisitType(serializationProvider); + + var implicitOperatorAfter = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Implicit) && + m.Signature.ReturnType?.Equals(typeof(RequestContent)) == true); + var bodyAfter = implicitOperatorAfter?.BodyStatements?.ToDisplayString(); + + Assert.AreEqual(bodyBefore, bodyAfter, + "JSON-only model implicit operator should not be modified by the visitor"); + } + + [Test] + public void JsonAndXmlModel_ImplicitOperatorUsesRequestContentCreate() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel = InputFactory.Model( + "DualFormatModel", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Xml | InputModelTypeUsage.Json); + var bodyParam = InputFactory.BodyParameter("body", inputModel); + var methodParam = InputFactory.MethodParameter("body", inputModel); + var operation = InputFactory.Operation("testOp", parameters: [bodyParam]); + var serviceMethod = InputFactory.BasicServiceMethod("testOp", operation, parameters: [methodParam]); + var client = InputFactory.Client("TestClient", methods: [serviceMethod]); + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel], clients: () => [client]); + + var modelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(inputModel); + Assert.IsNotNull(modelProvider); + + visitor.InvokePreVisitModel(inputModel, modelProvider); + var serializationProvider = modelProvider!.SerializationProviders[0]; + visitor.InvokeVisitType(serializationProvider); + + var implicitOperator = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Implicit) && + m.Signature.ReturnType?.Equals(typeof(RequestContent)) == true); + Assert.IsNotNull(implicitOperator, "Implicit RequestContent operator should be generated"); + + var bodyString = implicitOperator!.BodyStatements?.ToDisplayString(); + Assert.IsNotNull(bodyString); + Assert.AreEqual(Helpers.GetExpectedFromFile(), bodyString); + } + + [Test] + public void XmlOnlyModel_ImplicitOperatorUsesXmlWriterContent() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel = InputFactory.Model( + "XmlOnlyModel", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Xml, + serializationOptions: new InputSerializationOptions( + json: null, + xml: new InputXmlSerializationOptions("TestElement", false, null))); + var bodyParam = InputFactory.BodyParameter("body", inputModel); + var methodParam = InputFactory.MethodParameter("body", inputModel); + var operation = InputFactory.Operation("testOp", parameters: [bodyParam]); + var serviceMethod = InputFactory.BasicServiceMethod("testOp", operation, parameters: [methodParam]); + var client = InputFactory.Client("TestClient", methods: [serviceMethod]); + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel], clients: () => [client]); + + var modelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(inputModel); + Assert.IsNotNull(modelProvider); + + visitor.InvokePreVisitModel(inputModel, modelProvider); + var serializationProvider = modelProvider!.SerializationProviders[0]; + visitor.InvokeVisitType(serializationProvider); + + var implicitOperator = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Implicit) && + m.Signature.ReturnType?.Equals(typeof(RequestContent)) == true); + Assert.IsNotNull(implicitOperator, "Implicit RequestContent operator should be generated"); + + var bodyString = implicitOperator!.BodyStatements?.ToDisplayString(); + Assert.IsNotNull(bodyString); + Assert.AreEqual(Helpers.GetExpectedFromFile(), bodyString); + } + + [Test] + public void XmlOnlyModel_WithoutElementName_DoesNotChangeImplicitOperator() + { + var visitor = new TestXmlSerializableVisitor(); + var inputModel = InputFactory.Model( + "XmlOnlyModelNoElementName", + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Input | InputModelTypeUsage.Xml); + + MockHelpers.LoadMockGenerator(inputModels: () => [inputModel]); + + var modelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(inputModel); + Assert.IsNotNull(modelProvider); + + var serializationProvider = modelProvider!.SerializationProviders[0]; + + var implicitOperatorBefore = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Implicit) && + m.Signature.ReturnType?.Equals(typeof(RequestContent)) == true); + var bodyBefore = implicitOperatorBefore?.BodyStatements?.ToDisplayString(); + + visitor.InvokePreVisitModel(inputModel, modelProvider); + visitor.InvokeVisitType(serializationProvider); + + var implicitOperatorAfter = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Implicit) && + m.Signature.ReturnType?.Equals(typeof(RequestContent)) == true); + var bodyAfter = implicitOperatorAfter?.BodyStatements?.ToDisplayString(); + + Assert.AreEqual(bodyBefore, bodyAfter, + "XML-only model without element name should not have operator modified"); + } + + private static bool ContainsIXmlSerializableCase(MethodBodyStatement body) + { + return body.ToDisplayString().Contains(nameof(IXmlSerializable)); + } + + private static SwitchStatement? GetSwitchStatement(MethodBodyStatement body) + { + if (body is MethodBodyStatements statements) + { + foreach (var statement in statements.Statements) + { + if (statement is SwitchStatement switchStatement) + { + return switchStatement; + } + } + } + else if (body is SwitchStatement switchStatement) + { + return switchStatement; + } + + return null; + } + + private class TestXmlSerializableVisitor : XmlSerializableVisitor + { + public ModelProvider? InvokePreVisitModel(InputModelType inputType, ModelProvider? type) + { + return base.PreVisitModel(inputType, type); + } + + public TypeProvider? InvokeVisitType(TypeProvider type) + { + return base.VisitType(type); + } + } + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/common/InputFactory.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/common/InputFactory.cs index b2fe0baba602..764adac0c27d 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/common/InputFactory.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/common/InputFactory.cs @@ -391,6 +391,7 @@ public static InputMethodParameter MethodParameter( /// /// /// + /// /// public static InputModelType Model( string name, @@ -405,7 +406,8 @@ public static InputModelType Model( IDictionary? discriminatedModels = null, IEnumerable? derivedModels = null, IReadOnlyList? decorators = null, - bool isDynamicModel = false) + bool isDynamicModel = false, + InputSerializationOptions? serializationOptions = null) { IEnumerable propertiesList = properties ?? [Property("StringProperty", InputPrimitiveType.String)]; var model = new InputModelType( @@ -425,7 +427,7 @@ public static InputModelType Model( discriminatedModels is null ? new Dictionary() : discriminatedModels.AsReadOnly(), additionalProperties, modelAsStruct, - new(), + serializationOptions ?? new(), isDynamicModel); if (decorators is not null) { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local.Tests/TestProjects.Local.Tests.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Local.Tests/TestProjects.Local.Tests.csproj index 09880211642d..38a3fe74c1d3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local.Tests/TestProjects.Local.Tests.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local.Tests/TestProjects.Local.Tests.csproj @@ -46,6 +46,8 @@ + + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/Basic-TypeSpec.tsp b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/Basic-TypeSpec.tsp index 0dec8b371db6..315dffe96776 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/Basic-TypeSpec.tsp +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/Basic-TypeSpec.tsp @@ -708,6 +708,14 @@ op GetXmlAdvancedModel(): { @body body: XmlAdvancedModel; }; +@route("xmlAdvanced") +@doc("Update an advanced XML model with various property types") +@put +op UpdateXmlAdvancedModel(@body body: XmlAdvancedModel, @header contentType: "application/xml"): { + @header contentType: "application/xml"; + @body body: XmlAdvancedModel; +}; + @route("/plants") interface PlantOperations { @doc("Get a tree as a plant") @@ -717,4 +725,12 @@ interface PlantOperations { @header contentType: "application/xml"; @body body: Tree; }; + + @doc("Update a tree as a plant") + @put + @route("/tree/as-plant") + updateTree(@body tree: Tree, @header contentType: "application/xml"): { + @header contentType: "application/xml"; + @body body: Tree; + }; } \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/BasicTypeSpec.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/BasicTypeSpec.csproj index ecce2c89f396..dc761efda192 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/BasicTypeSpec.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/BasicTypeSpec.csproj @@ -19,6 +19,8 @@ + + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.RestClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.RestClient.cs index 347cff74952e..9f6e57954698 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.RestClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.RestClient.cs @@ -538,5 +538,20 @@ internal HttpMessage CreateGetXmlAdvancedModelRequest(RequestContext context) request.Headers.SetValue("Accept", "application/xml"); return message; } + + internal HttpMessage CreateUpdateXmlAdvancedModelRequest(RequestContent content, RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/xmlAdvanced", false); + HttpMessage message = Pipeline.CreateMessage(context, PipelineMessageClassifier200); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Put; + request.Headers.SetValue("Content-Type", "application/xml"); + request.Headers.SetValue("Accept", "application/xml"); + request.Content = content; + return message; + } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs index 782592f20b0e..9d5b468f7df4 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs @@ -2483,6 +2483,94 @@ public virtual async Task> GetXmlAdvancedModelAsync(C return Response.FromValue((XmlAdvancedModel)result, result); } + /// + /// [Protocol Method] Update an advanced XML model with various property types + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The content to send as the body of the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual Response UpdateXmlAdvancedModel(RequestContent content, RequestContext context = null) + { + using DiagnosticScope scope = ClientDiagnostics.CreateScope("BasicTypeSpecClient.UpdateXmlAdvancedModel"); + scope.Start(); + try + { + Argument.AssertNotNull(content, nameof(content)); + + using HttpMessage message = CreateUpdateXmlAdvancedModelRequest(content, context); + return Pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update an advanced XML model with various property types + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The content to send as the body of the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task UpdateXmlAdvancedModelAsync(RequestContent content, RequestContext context = null) + { + using DiagnosticScope scope = ClientDiagnostics.CreateScope("BasicTypeSpecClient.UpdateXmlAdvancedModel"); + scope.Start(); + try + { + Argument.AssertNotNull(content, nameof(content)); + + using HttpMessage message = CreateUpdateXmlAdvancedModelRequest(content, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Update an advanced XML model with various property types. + /// + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// Service returned a non-success status code. + public virtual Response UpdateXmlAdvancedModel(XmlAdvancedModel body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + Response result = UpdateXmlAdvancedModel(body, cancellationToken.ToRequestContext()); + return Response.FromValue((XmlAdvancedModel)result, result); + } + + /// Update an advanced XML model with various property types. + /// + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// Service returned a non-success status code. + public virtual async Task> UpdateXmlAdvancedModelAsync(XmlAdvancedModel body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + Response result = await UpdateXmlAdvancedModelAsync(body, cancellationToken.ToRequestContext()).ConfigureAwait(false); + return Response.FromValue((XmlAdvancedModel)result, result); + } + /// Initializes a new instance of PlantOperations. public virtual PlantOperations GetPlantOperationsClient() { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ModelSerializationExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ModelSerializationExtensions.cs index e94929222765..6ab8c4aee148 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ModelSerializationExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ModelSerializationExtensions.cs @@ -16,6 +16,7 @@ using System.Text.Json; using System.Xml; using System.Xml.Linq; +using Azure.Core; namespace BasicTypeSpec { @@ -311,10 +312,13 @@ public static void WriteBase64StringValue(this XmlWriter writer, byte[] value, s writer.WriteValue(TypeFormatters.ToString(value, format)); } - public static void WriteObjectValue(this XmlWriter writer, T value, ModelReaderWriterOptions options = null) + public static void WriteObjectValue(this XmlWriter writer, T value, ModelReaderWriterOptions options = null, string nameHint = null) { switch (value) { + case IXmlSerializable xmlSerializable: + xmlSerializable.Write(writer, nameHint); + break; case IPersistableModel persistableModel: BinaryData data = ModelReaderWriter.Write(persistableModel, options ?? WireOptions, BasicTypeSpecContext.Default); using (Stream stream = data.ToStream()) diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Plant.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Plant.Serialization.cs index 6ead88703364..8586a070913f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Plant.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Plant.Serialization.cs @@ -11,6 +11,7 @@ using System.Text.Json; using System.Xml; using System.Xml.Linq; +using Azure.Core; namespace BasicTypeSpec { @@ -19,7 +20,7 @@ namespace BasicTypeSpec /// Please note this is the abstract base class. The derived classes available for instantiation are: . /// [PersistableModelProxy(typeof(UnknownPlant))] - public abstract partial class Plant : IJsonModel + public abstract partial class Plant : IJsonModel, IXmlSerializable { /// Initializes a new instance of for deserialization. internal Plant() @@ -223,5 +224,9 @@ internal static Plant DeserializePlant(XElement element, ModelReaderWriterOption } return UnknownPlant.DeserializeUnknownPlant(element, options); } + + /// The XML writer. + /// An optional name hint. + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => Write(writer, ModelSerializationExtensions.WireOptions, nameHint); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Plant.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Plant.cs index ed98230f4807..ef44c5b0dfc6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Plant.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Plant.cs @@ -47,9 +47,9 @@ internal Plant(string species, string id, int height, IDictionary The unique identifier of the plant. - public string Id { get; } + public string Id { get; set; } /// The height of the plant in centimeters. - public int Height { get; } + public int Height { get; set; } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Tree.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Tree.Serialization.cs index bd06a74c439b..ea6a6693dd31 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Tree.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Tree.Serialization.cs @@ -13,11 +13,12 @@ using System.Xml; using System.Xml.Linq; using Azure; +using Azure.Core; namespace BasicTypeSpec { /// Tree is a specific type of plant. - public partial class Tree : Plant, IJsonModel + public partial class Tree : Plant, IJsonModel, IXmlSerializable { /// Initializes a new instance of for deserialization. internal Tree() @@ -85,6 +86,16 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + /// The to serialize into . + public static implicit operator RequestContent(Tree tree) + { + if (tree == null) + { + return null; + } + return RequestContent.Create(tree, ModelSerializationExtensions.WireOptions); + } + /// The to deserialize the from. public static explicit operator Tree(Response response) { @@ -262,5 +273,9 @@ internal static Tree DeserializeTree(XElement element, ModelReaderWriterOptions } return new Tree(species, id, height, additionalBinaryDataProperties, age); } + + /// The XML writer. + /// An optional name hint. + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => Write(writer, ModelSerializationExtensions.WireOptions, nameHint); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Tree.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Tree.cs index 55f658698f4a..57b7bdbc9d3b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Tree.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Tree.cs @@ -17,8 +17,11 @@ public partial class Tree : Plant /// The unique identifier of the plant. /// The height of the plant in centimeters. /// The age of the tree in years. - internal Tree(string id, int height, int age) : base("tree", id, height) + /// is null. + public Tree(string id, int height, int age) : base("tree", id, height) { + Argument.AssertNotNull(id, nameof(id)); + Age = age; } @@ -34,6 +37,6 @@ internal Tree(string species, string id, int height, IDictionary The age of the tree in years. - public int Age { get; } + public int Age { get; set; } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/UnknownPlant.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/UnknownPlant.Serialization.cs index c7dfa02a8463..83934ac21119 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/UnknownPlant.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/UnknownPlant.Serialization.cs @@ -12,10 +12,11 @@ using System.Text.Json; using System.Xml; using System.Xml.Linq; +using Azure.Core; namespace BasicTypeSpec { - internal partial class UnknownPlant : Plant, IJsonModel + internal partial class UnknownPlant : Plant, IJsonModel, IXmlSerializable { /// Initializes a new instance of for deserialization. internal UnknownPlant() @@ -224,5 +225,9 @@ internal static UnknownPlant DeserializeUnknownPlant(XElement element, ModelRead } return new UnknownPlant(species, id, height, additionalBinaryDataProperties); } + + /// The XML writer. + /// An optional name hint. + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => Write(writer, ModelSerializationExtensions.WireOptions, nameHint); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlAdvancedModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlAdvancedModel.Serialization.cs index de7b66221f50..fbe296ea4ec1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlAdvancedModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlAdvancedModel.Serialization.cs @@ -12,11 +12,12 @@ using System.Xml; using System.Xml.Linq; using Azure; +using Azure.Core; namespace BasicTypeSpec { /// An advanced XML model for testing various property types and XML features. - public partial class XmlAdvancedModel : IPersistableModel + public partial class XmlAdvancedModel : IPersistableModel, IXmlSerializable { /// Initializes a new instance of for deserialization. internal XmlAdvancedModel() @@ -77,6 +78,18 @@ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "X"; + /// The to serialize into . + public static implicit operator RequestContent(XmlAdvancedModel xmlAdvancedModel) + { + if (xmlAdvancedModel == null) + { + return null; + } + XmlWriterContent content = new XmlWriterContent(); + content.XmlWriter.WriteObjectValue(xmlAdvancedModel, ModelSerializationExtensions.WireOptions, "AdvancedXmlModel"); + return content; + } + /// The to deserialize the from. public static explicit operator XmlAdvancedModel(Response response) { @@ -744,5 +757,9 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M listOfDictionaryFoo, additionalBinaryDataProperties); } + + /// The XML writer. + /// An optional name hint. + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => Write(writer, ModelSerializationExtensions.WireOptions, nameHint); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlAdvancedModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlAdvancedModel.cs index b6555ae78520..f55b3f12e776 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlAdvancedModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlAdvancedModel.cs @@ -53,8 +53,33 @@ public partial class XmlAdvancedModel /// /// /// - internal XmlAdvancedModel(string name, int age, bool enabled, float score, string nullableString, string id, int version, bool isActive, string originalName, string xmlIdentifier, string content, IEnumerable unwrappedStrings, IEnumerable unwrappedCounts, IEnumerable unwrappedItems, IEnumerable wrappedColors, IEnumerable items, XmlNestedModel nestedModel, IDictionary metadata, DateTimeOffset createdAt, TimeSpan duration, BinaryData data, StringFixedEnum fixedEnum, StringExtensibleEnum extensibleEnum, string label, int daysUsed, IEnumerable fooItems, XmlNestedModel anotherModel, IEnumerable modelsWithNamespaces, IEnumerable unwrappedModelsWithNamespaces, IEnumerable> listOfListFoo, IDictionary dictionaryFoo, IDictionary> dictionaryOfDictionaryFoo, IDictionary> dictionaryListFoo, IEnumerable> listOfDictionaryFoo) + /// , , , , , , , , , , , , , , , , , , , , , or is null. + public XmlAdvancedModel(string name, int age, bool enabled, float score, string nullableString, string id, int version, bool isActive, string originalName, string xmlIdentifier, string content, IEnumerable unwrappedStrings, IEnumerable unwrappedCounts, IEnumerable unwrappedItems, IEnumerable wrappedColors, IEnumerable items, XmlNestedModel nestedModel, IDictionary metadata, DateTimeOffset createdAt, TimeSpan duration, BinaryData data, StringFixedEnum fixedEnum, StringExtensibleEnum extensibleEnum, string label, int daysUsed, IEnumerable fooItems, XmlNestedModel anotherModel, IEnumerable modelsWithNamespaces, IEnumerable unwrappedModelsWithNamespaces, IEnumerable> listOfListFoo, IDictionary dictionaryFoo, IDictionary> dictionaryOfDictionaryFoo, IDictionary> dictionaryListFoo, IEnumerable> listOfDictionaryFoo) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(originalName, nameof(originalName)); + Argument.AssertNotNull(xmlIdentifier, nameof(xmlIdentifier)); + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(unwrappedStrings, nameof(unwrappedStrings)); + Argument.AssertNotNull(unwrappedCounts, nameof(unwrappedCounts)); + Argument.AssertNotNull(unwrappedItems, nameof(unwrappedItems)); + Argument.AssertNotNull(wrappedColors, nameof(wrappedColors)); + Argument.AssertNotNull(items, nameof(items)); + Argument.AssertNotNull(nestedModel, nameof(nestedModel)); + Argument.AssertNotNull(metadata, nameof(metadata)); + Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(label, nameof(label)); + Argument.AssertNotNull(fooItems, nameof(fooItems)); + Argument.AssertNotNull(anotherModel, nameof(anotherModel)); + Argument.AssertNotNull(modelsWithNamespaces, nameof(modelsWithNamespaces)); + Argument.AssertNotNull(unwrappedModelsWithNamespaces, nameof(unwrappedModelsWithNamespaces)); + Argument.AssertNotNull(listOfListFoo, nameof(listOfListFoo)); + Argument.AssertNotNull(dictionaryFoo, nameof(dictionaryFoo)); + Argument.AssertNotNull(dictionaryOfDictionaryFoo, nameof(dictionaryOfDictionaryFoo)); + Argument.AssertNotNull(dictionaryListFoo, nameof(dictionaryListFoo)); + Argument.AssertNotNull(listOfDictionaryFoo, nameof(listOfDictionaryFoo)); + Name = name; Age = age; Enabled = enabled; @@ -180,43 +205,43 @@ internal XmlAdvancedModel(string name, int age, bool enabled, float score, strin } /// A simple string property. - public string Name { get; } + public string Name { get; set; } /// An integer property. - public int Age { get; } + public int Age { get; set; } /// A boolean property. - public bool Enabled { get; } + public bool Enabled { get; set; } /// A float property. - public float Score { get; } + public float Score { get; set; } /// An optional string. - public string OptionalString { get; } + public string OptionalString { get; set; } /// An optional integer. - public int? OptionalInt { get; } + public int? OptionalInt { get; set; } /// A nullable string. - public string NullableString { get; } + public string NullableString { get; set; } /// A string as XML attribute. - public string Id { get; } + public string Id { get; set; } /// An integer as XML attribute. - public int Version { get; } + public int Version { get; set; } /// A boolean as XML attribute. - public bool IsActive { get; } + public bool IsActive { get; set; } /// A property with a custom XML element name. - public string OriginalName { get; } + public string OriginalName { get; set; } /// An attribute with a custom XML name. - public string XmlIdentifier { get; } + public string XmlIdentifier { get; set; } /// Text content in the element (unwrapped string). - public string Content { get; } + public string Content { get; set; } /// An unwrapped array of strings - items appear directly without wrapper. public IList UnwrappedStrings { get; } @@ -234,19 +259,19 @@ internal XmlAdvancedModel(string name, int age, bool enabled, float score, strin public IList Items { get; } /// A nested model property. - public XmlNestedModel NestedModel { get; } + public XmlNestedModel NestedModel { get; set; } /// An optional nested model. - public XmlNestedModel OptionalNestedModel { get; } + public XmlNestedModel OptionalNestedModel { get; set; } /// A dictionary property. public IDictionary Metadata { get; } /// A date-time property. - public DateTimeOffset CreatedAt { get; } + public DateTimeOffset CreatedAt { get; set; } /// A duration property. - public TimeSpan Duration { get; } + public TimeSpan Duration { get; set; } /// /// A bytes property @@ -264,7 +289,7 @@ internal XmlAdvancedModel(string name, int age, bool enabled, float score, strin /// /// /// - public BinaryData Data { get; } + public BinaryData Data { get; set; } /// /// optional record of unknown @@ -295,28 +320,28 @@ internal XmlAdvancedModel(string name, int age, bool enabled, float score, strin public IDictionary OptionalRecordUnknown { get; } /// A fixed enum property. - public StringFixedEnum FixedEnum { get; } + public StringFixedEnum FixedEnum { get; set; } /// An extensible enum property. - public StringExtensibleEnum ExtensibleEnum { get; } + public StringExtensibleEnum ExtensibleEnum { get; set; } /// An optional fixed enum property. - public IntFixedEnum? OptionalFixedEnum { get; } + public IntFixedEnum? OptionalFixedEnum { get; set; } /// An optional extensible enum property. - public IntExtensibleEnum? OptionalExtensibleEnum { get; } + public IntExtensibleEnum? OptionalExtensibleEnum { get; set; } - /// Gets the Label. - public string Label { get; } + /// Gets or sets the Label. + public string Label { get; set; } - /// Gets the DaysUsed. - public int DaysUsed { get; } + /// Gets or sets the DaysUsed. + public int DaysUsed { get; set; } /// Gets the FooItems. public IList FooItems { get; } - /// Gets the AnotherModel. - public XmlNestedModel AnotherModel { get; } + /// Gets or sets the AnotherModel. + public XmlNestedModel AnotherModel { get; set; } /// Gets the ModelsWithNamespaces. public IList ModelsWithNamespaces { get; } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlItem.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlItem.Serialization.cs index 1caa7a2cae7b..9964e9041e3f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlItem.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlItem.Serialization.cs @@ -11,11 +11,12 @@ using System.IO; using System.Xml; using System.Xml.Linq; +using Azure.Core; namespace BasicTypeSpec { /// An item model for XML array testing. - public partial class XmlItem : IPersistableModel + public partial class XmlItem : IPersistableModel, IXmlSerializable { /// Initializes a new instance of for deserialization. internal XmlItem() @@ -155,5 +156,9 @@ internal static XmlItem DeserializeXmlItem(XElement element, ModelReaderWriterOp } return new XmlItem(itemName, itemValue, itemId, additionalBinaryDataProperties); } + + /// The XML writer. + /// An optional name hint. + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => Write(writer, ModelSerializationExtensions.WireOptions, nameHint); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlItem.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlItem.cs index 0b44e880da7e..5ec8ce6c8382 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlItem.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlItem.cs @@ -20,8 +20,12 @@ public partial class XmlItem /// The item name. /// The item value. /// Item ID as attribute. - internal XmlItem(string itemName, int itemValue, string itemId) + /// or is null. + public XmlItem(string itemName, int itemValue, string itemId) { + Argument.AssertNotNull(itemName, nameof(itemName)); + Argument.AssertNotNull(itemId, nameof(itemId)); + ItemName = itemName; ItemValue = itemValue; ItemId = itemId; @@ -41,12 +45,12 @@ internal XmlItem(string itemName, int itemValue, string itemId, IDictionary The item name. - public string ItemName { get; } + public string ItemName { get; set; } /// The item value. - public int ItemValue { get; } + public int ItemValue { get; set; } /// Item ID as attribute. - public string ItemId { get; } + public string ItemId { get; set; } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlModelWithNamespace.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlModelWithNamespace.Serialization.cs index 1b004b814804..3af9ae346922 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlModelWithNamespace.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlModelWithNamespace.Serialization.cs @@ -11,11 +11,12 @@ using System.IO; using System.Xml; using System.Xml.Linq; +using Azure.Core; namespace BasicTypeSpec { /// The XmlModelWithNamespace. - public partial class XmlModelWithNamespace : IPersistableModel + public partial class XmlModelWithNamespace : IPersistableModel, IXmlSerializable { /// Initializes a new instance of for deserialization. internal XmlModelWithNamespace() @@ -132,5 +133,9 @@ internal static XmlModelWithNamespace DeserializeXmlModelWithNamespace(XElement } return new XmlModelWithNamespace(foo, additionalBinaryDataProperties); } + + /// The XML writer. + /// An optional name hint. + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => Write(writer, ModelSerializationExtensions.WireOptions, nameHint); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlModelWithNamespace.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlModelWithNamespace.cs index 18eb06bab437..8dfcdf088b5a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlModelWithNamespace.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlModelWithNamespace.cs @@ -18,8 +18,11 @@ public partial class XmlModelWithNamespace /// Initializes a new instance of . /// - internal XmlModelWithNamespace(string foo) + /// is null. + public XmlModelWithNamespace(string foo) { + Argument.AssertNotNull(foo, nameof(foo)); + Foo = foo; } @@ -32,7 +35,7 @@ internal XmlModelWithNamespace(string foo, IDictionary addit _additionalBinaryDataProperties = additionalBinaryDataProperties; } - /// Gets the Foo. - public string Foo { get; } + /// Gets or sets the Foo. + public string Foo { get; set; } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlNestedModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlNestedModel.Serialization.cs index 27664e0b649f..140d4e1285ad 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlNestedModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlNestedModel.Serialization.cs @@ -11,11 +11,12 @@ using System.IO; using System.Xml; using System.Xml.Linq; +using Azure.Core; namespace BasicTypeSpec { /// A nested model for XML testing. - public partial class XmlNestedModel : IPersistableModel + public partial class XmlNestedModel : IPersistableModel, IXmlSerializable { /// Initializes a new instance of for deserialization. internal XmlNestedModel() @@ -146,5 +147,9 @@ internal static XmlNestedModel DeserializeXmlNestedModel(XElement element, Model } return new XmlNestedModel(value, nestedId, additionalBinaryDataProperties); } + + /// The XML writer. + /// An optional name hint. + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => Write(writer, ModelSerializationExtensions.WireOptions, nameHint); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlNestedModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlNestedModel.cs index fcda6bc855de..5ba7427ad8f7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlNestedModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/XmlNestedModel.cs @@ -19,8 +19,11 @@ public partial class XmlNestedModel /// Initializes a new instance of . /// The value of the nested model. /// An attribute on the nested model. - internal XmlNestedModel(string value, int nestedId) + /// is null. + public XmlNestedModel(string value, int nestedId) { + Argument.AssertNotNull(value, nameof(value)); + Value = value; NestedId = nestedId; } @@ -37,9 +40,9 @@ internal XmlNestedModel(string value, int nestedId, IDictionary The value of the nested model. - public string Value { get; } + public string Value { get; set; } /// An attribute on the nested model. - public int NestedId { get; } + public int NestedId { get; set; } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/PlantOperations.RestClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/PlantOperations.RestClient.cs index 77aa88c4df44..10d5a43a2d22 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/PlantOperations.RestClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/PlantOperations.RestClient.cs @@ -29,5 +29,20 @@ internal HttpMessage CreateGetTreeRequest(RequestContext context) request.Headers.SetValue("Accept", "application/xml"); return message; } + + internal HttpMessage CreateUpdateTreeRequest(RequestContent content, RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/plants/tree/as-plant", false); + HttpMessage message = Pipeline.CreateMessage(context, PipelineMessageClassifier200); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Put; + request.Headers.SetValue("Content-Type", "application/xml"); + request.Headers.SetValue("Accept", "application/xml"); + request.Content = content; + return message; + } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/PlantOperations.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/PlantOperations.cs index 62c887bd49cb..82b977a288d7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/PlantOperations.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/PlantOperations.cs @@ -112,5 +112,93 @@ public virtual async Task> GetTreeAsync(CancellationToken cancell Response result = await GetTreeAsync(cancellationToken.ToRequestContext()).ConfigureAwait(false); return Response.FromValue((Tree)result, result); } + + /// + /// [Protocol Method] Update a tree as a plant + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The content to send as the body of the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual Response UpdateTree(RequestContent content, RequestContext context = null) + { + using DiagnosticScope scope = ClientDiagnostics.CreateScope("PlantOperations.UpdateTree"); + scope.Start(); + try + { + Argument.AssertNotNull(content, nameof(content)); + + using HttpMessage message = CreateUpdateTreeRequest(content, context); + return Pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update a tree as a plant + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The content to send as the body of the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task UpdateTreeAsync(RequestContent content, RequestContext context = null) + { + using DiagnosticScope scope = ClientDiagnostics.CreateScope("PlantOperations.UpdateTree"); + scope.Start(); + try + { + Argument.AssertNotNull(content, nameof(content)); + + using HttpMessage message = CreateUpdateTreeRequest(content, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Update a tree as a plant. + /// + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// Service returned a non-success status code. + public virtual Response UpdateTree(Tree tree, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tree, nameof(tree)); + + Response result = UpdateTree(tree, cancellationToken.ToRequestContext()); + return Response.FromValue((Tree)result, result); + } + + /// Update a tree as a plant. + /// + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// Service returned a non-success status code. + public virtual async Task> UpdateTreeAsync(Tree tree, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tree, nameof(tree)); + + Response result = await UpdateTreeAsync(tree, cancellationToken.ToRequestContext()).ConfigureAwait(false); + return Response.FromValue((Tree)result, result); + } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json index dab9ca394d57..e9027ef7f6e6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json @@ -732,7 +732,7 @@ "kind": "constant", "name": "TreeSpecies", "namespace": "BasicTypeSpec", - "usage": "Output,Json,Xml", + "usage": "Input,Output,Json,Xml", "valueType": { "$id": "68", "kind": "string", @@ -1530,7 +1530,7 @@ { "$id": "167", "kind": "constant", - "name": "getTreeContentType", + "name": "GetXmlAdvancedModelResponseContentType1", "namespace": "", "usage": "None", "valueType": { @@ -1546,7 +1546,7 @@ { "$id": "169", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType1", + "name": "GetXmlAdvancedModelResponseContentType2", "namespace": "", "usage": "None", "valueType": { @@ -1558,11 +1558,139 @@ }, "value": "application/xml", "decorators": [] + }, + { + "$id": "171", + "kind": "constant", + "name": "UpdateXmlAdvancedModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "172", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "173", + "kind": "constant", + "name": "GetXmlAdvancedModelResponseContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "175", + "kind": "constant", + "name": "getTreeContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "177", + "kind": "constant", + "name": "GetXmlAdvancedModelResponseContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "179", + "kind": "constant", + "name": "GetXmlAdvancedModelResponseContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "181", + "kind": "constant", + "name": "GetXmlAdvancedModelResponseContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "183", + "kind": "constant", + "name": "updateTreeContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "185", + "kind": "constant", + "name": "GetXmlAdvancedModelResponseContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] } ], "models": [ { - "$id": "171", + "$id": "187", "kind": "model", "name": "ThingModel", "namespace": "BasicTypeSpec", @@ -1577,13 +1705,13 @@ }, "properties": [ { - "$id": "172", + "$id": "188", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the ThingModel", "type": { - "$id": "173", + "$id": "189", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1603,29 +1731,29 @@ "isHttpMetadata": false }, { - "$id": "174", + "$id": "190", "kind": "property", "name": "requiredUnion", "serializedName": "requiredUnion", "doc": "required Union", "type": { - "$id": "175", + "$id": "191", "kind": "union", "name": "ThingModelRequiredUnion", "variantTypes": [ { - "$id": "176", + "$id": "192", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "177", + "$id": "193", "kind": "array", "name": "Array", "valueType": { - "$id": "178", + "$id": "194", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1635,7 +1763,7 @@ "decorators": [] }, { - "$id": "179", + "$id": "195", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1659,7 +1787,7 @@ "isHttpMetadata": false }, { - "$id": "180", + "$id": "196", "kind": "property", "name": "requiredLiteralString", "serializedName": "requiredLiteralString", @@ -1681,7 +1809,7 @@ "isHttpMetadata": false }, { - "$id": "181", + "$id": "197", "kind": "property", "name": "requiredLiteralInt", "serializedName": "requiredLiteralInt", @@ -1703,7 +1831,7 @@ "isHttpMetadata": false }, { - "$id": "182", + "$id": "198", "kind": "property", "name": "requiredLiteralFloat", "serializedName": "requiredLiteralFloat", @@ -1725,7 +1853,7 @@ "isHttpMetadata": false }, { - "$id": "183", + "$id": "199", "kind": "property", "name": "requiredLiteralBool", "serializedName": "requiredLiteralBool", @@ -1747,7 +1875,7 @@ "isHttpMetadata": false }, { - "$id": "184", + "$id": "200", "kind": "property", "name": "optionalLiteralString", "serializedName": "optionalLiteralString", @@ -1769,7 +1897,7 @@ "isHttpMetadata": false }, { - "$id": "185", + "$id": "201", "kind": "property", "name": "optionalLiteralInt", "serializedName": "optionalLiteralInt", @@ -1791,7 +1919,7 @@ "isHttpMetadata": false }, { - "$id": "186", + "$id": "202", "kind": "property", "name": "optionalLiteralFloat", "serializedName": "optionalLiteralFloat", @@ -1813,7 +1941,7 @@ "isHttpMetadata": false }, { - "$id": "187", + "$id": "203", "kind": "property", "name": "optionalLiteralBool", "serializedName": "optionalLiteralBool", @@ -1835,13 +1963,13 @@ "isHttpMetadata": false }, { - "$id": "188", + "$id": "204", "kind": "property", "name": "requiredBadDescription", "serializedName": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "189", + "$id": "205", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1861,20 +1989,20 @@ "isHttpMetadata": false }, { - "$id": "190", + "$id": "206", "kind": "property", "name": "optionalNullableList", "serializedName": "optionalNullableList", "doc": "optional nullable collection", "type": { - "$id": "191", + "$id": "207", "kind": "nullable", "type": { - "$id": "192", + "$id": "208", "kind": "array", "name": "Array1", "valueType": { - "$id": "193", + "$id": "209", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1899,16 +2027,16 @@ "isHttpMetadata": false }, { - "$id": "194", + "$id": "210", "kind": "property", "name": "requiredNullableList", "serializedName": "requiredNullableList", "doc": "required nullable collection", "type": { - "$id": "195", + "$id": "211", "kind": "nullable", "type": { - "$ref": "192" + "$ref": "208" }, "namespace": "BasicTypeSpec" }, @@ -1928,7 +2056,7 @@ ] }, { - "$id": "196", + "$id": "212", "kind": "model", "name": "RoundTripModel", "namespace": "BasicTypeSpec", @@ -1948,13 +2076,13 @@ }, "properties": [ { - "$id": "197", + "$id": "213", "kind": "property", "name": "requiredString", "serializedName": "requiredString", "doc": "Required string, illustrating a reference type property.", "type": { - "$id": "198", + "$id": "214", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1974,13 +2102,13 @@ "isHttpMetadata": false }, { - "$id": "199", + "$id": "215", "kind": "property", "name": "requiredInt", "serializedName": "requiredInt", "doc": "Required int, illustrating a value type property.", "type": { - "$id": "200", + "$id": "216", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2000,13 +2128,13 @@ "isHttpMetadata": false }, { - "$id": "201", + "$id": "217", "kind": "property", "name": "requiredCollection", "serializedName": "requiredCollection", "doc": "Required collection of enums", "type": { - "$id": "202", + "$id": "218", "kind": "array", "name": "ArrayStringFixedEnum", "valueType": { @@ -2029,16 +2157,16 @@ "isHttpMetadata": false }, { - "$id": "203", + "$id": "219", "kind": "property", "name": "requiredDictionary", "serializedName": "requiredDictionary", "doc": "Required dictionary of enums", "type": { - "$id": "204", + "$id": "220", "kind": "dict", "keyType": { - "$id": "205", + "$id": "221", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2063,13 +2191,13 @@ "isHttpMetadata": false }, { - "$id": "206", + "$id": "222", "kind": "property", "name": "requiredModel", "serializedName": "requiredModel", "doc": "Required model", "type": { - "$ref": "171" + "$ref": "187" }, "optional": false, "readOnly": false, @@ -2085,7 +2213,7 @@ "isHttpMetadata": false }, { - "$id": "207", + "$id": "223", "kind": "property", "name": "intExtensibleEnum", "serializedName": "intExtensibleEnum", @@ -2107,13 +2235,13 @@ "isHttpMetadata": false }, { - "$id": "208", + "$id": "224", "kind": "property", "name": "intExtensibleEnumCollection", "serializedName": "intExtensibleEnumCollection", "doc": "this is a collection of int based extensible enum", "type": { - "$id": "209", + "$id": "225", "kind": "array", "name": "ArrayIntExtensibleEnum", "valueType": { @@ -2136,7 +2264,7 @@ "isHttpMetadata": false }, { - "$id": "210", + "$id": "226", "kind": "property", "name": "floatExtensibleEnum", "serializedName": "floatExtensibleEnum", @@ -2158,7 +2286,7 @@ "isHttpMetadata": false }, { - "$id": "211", + "$id": "227", "kind": "property", "name": "floatExtensibleEnumWithIntValue", "serializedName": "floatExtensibleEnumWithIntValue", @@ -2180,13 +2308,13 @@ "isHttpMetadata": false }, { - "$id": "212", + "$id": "228", "kind": "property", "name": "floatExtensibleEnumCollection", "serializedName": "floatExtensibleEnumCollection", "doc": "this is a collection of float based extensible enum", "type": { - "$id": "213", + "$id": "229", "kind": "array", "name": "ArrayFloatExtensibleEnum", "valueType": { @@ -2209,7 +2337,7 @@ "isHttpMetadata": false }, { - "$id": "214", + "$id": "230", "kind": "property", "name": "floatFixedEnum", "serializedName": "floatFixedEnum", @@ -2231,7 +2359,7 @@ "isHttpMetadata": false }, { - "$id": "215", + "$id": "231", "kind": "property", "name": "floatFixedEnumWithIntValue", "serializedName": "floatFixedEnumWithIntValue", @@ -2253,13 +2381,13 @@ "isHttpMetadata": false }, { - "$id": "216", + "$id": "232", "kind": "property", "name": "floatFixedEnumCollection", "serializedName": "floatFixedEnumCollection", "doc": "this is a collection of float based fixed enum", "type": { - "$id": "217", + "$id": "233", "kind": "array", "name": "ArrayFloatFixedEnum", "valueType": { @@ -2282,7 +2410,7 @@ "isHttpMetadata": false }, { - "$id": "218", + "$id": "234", "kind": "property", "name": "intFixedEnum", "serializedName": "intFixedEnum", @@ -2304,13 +2432,13 @@ "isHttpMetadata": false }, { - "$id": "219", + "$id": "235", "kind": "property", "name": "intFixedEnumCollection", "serializedName": "intFixedEnumCollection", "doc": "this is a collection of int based fixed enum", "type": { - "$id": "220", + "$id": "236", "kind": "array", "name": "ArrayIntFixedEnum", "valueType": { @@ -2333,7 +2461,7 @@ "isHttpMetadata": false }, { - "$id": "221", + "$id": "237", "kind": "property", "name": "stringFixedEnum", "serializedName": "stringFixedEnum", @@ -2355,13 +2483,13 @@ "isHttpMetadata": false }, { - "$id": "222", + "$id": "238", "kind": "property", "name": "requiredUnknown", "serializedName": "requiredUnknown", "doc": "required unknown", "type": { - "$id": "223", + "$id": "239", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2381,13 +2509,13 @@ "isHttpMetadata": false }, { - "$id": "224", + "$id": "240", "kind": "property", "name": "optionalUnknown", "serializedName": "optionalUnknown", "doc": "optional unknown", "type": { - "$id": "225", + "$id": "241", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2407,23 +2535,23 @@ "isHttpMetadata": false }, { - "$id": "226", + "$id": "242", "kind": "property", "name": "requiredRecordUnknown", "serializedName": "requiredRecordUnknown", "doc": "required record of unknown", "type": { - "$id": "227", + "$id": "243", "kind": "dict", "keyType": { - "$id": "228", + "$id": "244", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "229", + "$id": "245", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2445,13 +2573,13 @@ "isHttpMetadata": false }, { - "$id": "230", + "$id": "246", "kind": "property", "name": "optionalRecordUnknown", "serializedName": "optionalRecordUnknown", "doc": "optional record of unknown", "type": { - "$ref": "227" + "$ref": "243" }, "optional": true, "readOnly": false, @@ -2467,13 +2595,13 @@ "isHttpMetadata": false }, { - "$id": "231", + "$id": "247", "kind": "property", "name": "readOnlyRequiredRecordUnknown", "serializedName": "readOnlyRequiredRecordUnknown", "doc": "required readonly record of unknown", "type": { - "$ref": "227" + "$ref": "243" }, "optional": false, "readOnly": true, @@ -2489,13 +2617,13 @@ "isHttpMetadata": false }, { - "$id": "232", + "$id": "248", "kind": "property", "name": "readOnlyOptionalRecordUnknown", "serializedName": "readOnlyOptionalRecordUnknown", "doc": "optional readonly record of unknown", "type": { - "$ref": "227" + "$ref": "243" }, "optional": true, "readOnly": true, @@ -2511,13 +2639,13 @@ "isHttpMetadata": false }, { - "$id": "233", + "$id": "249", "kind": "property", "name": "modelWithRequiredNullable", "serializedName": "modelWithRequiredNullable", "doc": "this is a model with required nullable properties", "type": { - "$id": "234", + "$id": "250", "kind": "model", "name": "ModelWithRequiredNullableProperties", "namespace": "BasicTypeSpec", @@ -2532,16 +2660,16 @@ }, "properties": [ { - "$id": "235", + "$id": "251", "kind": "property", "name": "requiredNullablePrimitive", "serializedName": "requiredNullablePrimitive", "doc": "required nullable primitive type", "type": { - "$id": "236", + "$id": "252", "kind": "nullable", "type": { - "$id": "237", + "$id": "253", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2563,13 +2691,13 @@ "isHttpMetadata": false }, { - "$id": "238", + "$id": "254", "kind": "property", "name": "requiredExtensibleEnum", "serializedName": "requiredExtensibleEnum", "doc": "required nullable extensible enum type", "type": { - "$id": "239", + "$id": "255", "kind": "nullable", "type": { "$ref": "18" @@ -2590,13 +2718,13 @@ "isHttpMetadata": false }, { - "$id": "240", + "$id": "256", "kind": "property", "name": "requiredFixedEnum", "serializedName": "requiredFixedEnum", "doc": "required nullable fixed enum type", "type": { - "$id": "241", + "$id": "257", "kind": "nullable", "type": { "$ref": "13" @@ -2632,13 +2760,13 @@ "isHttpMetadata": false }, { - "$id": "242", + "$id": "258", "kind": "property", "name": "requiredBytes", "serializedName": "requiredBytes", "doc": "Required bytes", "type": { - "$id": "243", + "$id": "259", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -2661,10 +2789,10 @@ ] }, { - "$ref": "234" + "$ref": "250" }, { - "$id": "244", + "$id": "260", "kind": "model", "name": "FriendModel", "namespace": "BasicTypeSpec", @@ -2679,13 +2807,13 @@ }, "properties": [ { - "$id": "245", + "$id": "261", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "246", + "$id": "262", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2707,7 +2835,7 @@ ] }, { - "$id": "247", + "$id": "263", "kind": "model", "name": "RenamedModel", "namespace": "BasicTypeSpec", @@ -2722,13 +2850,13 @@ }, "properties": [ { - "$id": "248", + "$id": "264", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the ModelWithClientName", "type": { - "$id": "249", + "$id": "265", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2750,7 +2878,7 @@ ] }, { - "$id": "250", + "$id": "266", "kind": "model", "name": "ReturnsAnonymousModelResponse", "namespace": "BasicTypeSpec", @@ -2765,7 +2893,7 @@ "properties": [] }, { - "$id": "251", + "$id": "267", "kind": "model", "name": "ListWithNextLinkResponse", "namespace": "BasicTypeSpec", @@ -2779,16 +2907,16 @@ }, "properties": [ { - "$id": "252", + "$id": "268", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$id": "253", + "$id": "269", "kind": "array", "name": "ArrayThingModel", "valueType": { - "$ref": "171" + "$ref": "187" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2807,12 +2935,12 @@ "isHttpMetadata": false }, { - "$id": "254", + "$id": "270", "kind": "property", "name": "next", "serializedName": "next", "type": { - "$id": "255", + "$id": "271", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -2834,7 +2962,7 @@ ] }, { - "$id": "256", + "$id": "272", "kind": "model", "name": "ListWithStringNextLinkResponse", "namespace": "BasicTypeSpec", @@ -2848,12 +2976,12 @@ }, "properties": [ { - "$id": "257", + "$id": "273", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "253" + "$ref": "269" }, "optional": false, "readOnly": false, @@ -2869,12 +2997,12 @@ "isHttpMetadata": false }, { - "$id": "258", + "$id": "274", "kind": "property", "name": "next", "serializedName": "next", "type": { - "$id": "259", + "$id": "275", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2896,7 +3024,7 @@ ] }, { - "$id": "260", + "$id": "276", "kind": "model", "name": "ListWithHeaderNextLinkResponse", "namespace": "", @@ -2910,12 +3038,12 @@ }, "properties": [ { - "$id": "261", + "$id": "277", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "253" + "$ref": "269" }, "optional": false, "readOnly": false, @@ -2933,7 +3061,7 @@ ] }, { - "$id": "262", + "$id": "278", "kind": "model", "name": "ListWithHeaderNextLinkWithMaxPageResponse", "namespace": "", @@ -2947,12 +3075,12 @@ }, "properties": [ { - "$id": "263", + "$id": "279", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "253" + "$ref": "269" }, "optional": false, "readOnly": false, @@ -2970,7 +3098,7 @@ ] }, { - "$id": "264", + "$id": "280", "kind": "model", "name": "ListWithContinuationTokenResponse", "namespace": "BasicTypeSpec", @@ -2984,12 +3112,12 @@ }, "properties": [ { - "$id": "265", + "$id": "281", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "253" + "$ref": "269" }, "optional": false, "readOnly": false, @@ -3005,12 +3133,12 @@ "isHttpMetadata": false }, { - "$id": "266", + "$id": "282", "kind": "property", "name": "nextToken", "serializedName": "nextToken", "type": { - "$id": "267", + "$id": "283", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3032,7 +3160,7 @@ ] }, { - "$id": "268", + "$id": "284", "kind": "model", "name": "ListWithContinuationTokenWithMaxPageResponse", "namespace": "BasicTypeSpec", @@ -3046,12 +3174,12 @@ }, "properties": [ { - "$id": "269", + "$id": "285", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "253" + "$ref": "269" }, "optional": false, "readOnly": false, @@ -3067,12 +3195,12 @@ "isHttpMetadata": false }, { - "$id": "270", + "$id": "286", "kind": "property", "name": "nextToken", "serializedName": "nextToken", "type": { - "$id": "271", + "$id": "287", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3094,7 +3222,7 @@ ] }, { - "$id": "272", + "$id": "288", "kind": "model", "name": "ListWithContinuationTokenHeaderResponseResponse", "namespace": "", @@ -3108,12 +3236,12 @@ }, "properties": [ { - "$id": "273", + "$id": "289", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "253" + "$ref": "269" }, "optional": false, "readOnly": false, @@ -3131,7 +3259,7 @@ ] }, { - "$id": "274", + "$id": "290", "kind": "model", "name": "PageThingModel", "namespace": "BasicTypeSpec", @@ -3145,12 +3273,12 @@ }, "properties": [ { - "$id": "275", + "$id": "291", "kind": "property", "name": "items", "serializedName": "items", "type": { - "$ref": "253" + "$ref": "269" }, "optional": false, "readOnly": false, @@ -3168,7 +3296,7 @@ ] }, { - "$id": "276", + "$id": "292", "kind": "model", "name": "MultipartRequestRequest", "namespace": "BasicTypeSpec", @@ -3178,12 +3306,12 @@ "serializationOptions": {}, "properties": [ { - "$id": "277", + "$id": "293", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "278", + "$id": "294", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3211,7 +3339,7 @@ ] }, { - "$id": "279", + "$id": "295", "kind": "model", "name": "DataFactoryElementModel", "namespace": "BasicTypeSpec", @@ -3226,25 +3354,25 @@ }, "properties": [ { - "$id": "280", + "$id": "296", "kind": "property", "name": "stringProperty", "serializedName": "stringProperty", "doc": "String property with DFE pattern", "type": { - "$id": "281", + "$id": "297", "kind": "union", "name": "Dfe", "variantTypes": [ { - "$id": "282", + "$id": "298", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$ref": "279" + "$ref": "295" } ], "namespace": "BasicTypeSpec", @@ -3267,25 +3395,25 @@ "isHttpMetadata": false }, { - "$id": "283", + "$id": "299", "kind": "property", "name": "intProperty", "serializedName": "intProperty", "doc": "Int property with DFE pattern", "type": { - "$id": "284", + "$id": "300", "kind": "union", "name": "Dfe", "variantTypes": [ { - "$id": "285", + "$id": "301", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, { - "$ref": "279" + "$ref": "295" } ], "namespace": "BasicTypeSpec", @@ -3308,25 +3436,25 @@ "isHttpMetadata": false }, { - "$id": "286", + "$id": "302", "kind": "property", "name": "boolProperty", "serializedName": "boolProperty", "doc": "Bool property with DFE pattern", "type": { - "$id": "287", + "$id": "303", "kind": "union", "name": "Dfe", "variantTypes": [ { - "$id": "288", + "$id": "304", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", "decorators": [] }, { - "$ref": "279" + "$ref": "295" } ], "namespace": "BasicTypeSpec", @@ -3349,21 +3477,21 @@ "isHttpMetadata": false }, { - "$id": "289", + "$id": "305", "kind": "property", "name": "stringArrayProperty", "serializedName": "stringArrayProperty", "doc": "String array property with DFE pattern", "type": { - "$id": "290", + "$id": "306", "kind": "union", "name": "Dfe", "variantTypes": [ { - "$ref": "177" + "$ref": "193" }, { - "$ref": "279" + "$ref": "295" } ], "namespace": "BasicTypeSpec", @@ -3388,12 +3516,12 @@ ] }, { - "$id": "291", + "$id": "307", "kind": "model", "name": "XmlAdvancedModel", "namespace": "BasicTypeSpec", "crossLanguageDefinitionId": "BasicTypeSpec.XmlAdvancedModel", - "usage": "Output,Xml", + "usage": "Input,Output,Xml", "doc": "An advanced XML model for testing various property types and XML features.", "decorators": [ { @@ -3412,13 +3540,13 @@ }, "properties": [ { - "$id": "292", + "$id": "308", "kind": "property", "name": "name", "serializedName": "name", "doc": "A simple string property", "type": { - "$id": "293", + "$id": "309", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3440,13 +3568,13 @@ "isHttpMetadata": false }, { - "$id": "294", + "$id": "310", "kind": "property", "name": "age", "serializedName": "age", "doc": "An integer property", "type": { - "$id": "295", + "$id": "311", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -3468,13 +3596,13 @@ "isHttpMetadata": false }, { - "$id": "296", + "$id": "312", "kind": "property", "name": "enabled", "serializedName": "enabled", "doc": "A boolean property", "type": { - "$id": "297", + "$id": "313", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -3496,13 +3624,13 @@ "isHttpMetadata": false }, { - "$id": "298", + "$id": "314", "kind": "property", "name": "score", "serializedName": "score", "doc": "A float property", "type": { - "$id": "299", + "$id": "315", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -3524,13 +3652,13 @@ "isHttpMetadata": false }, { - "$id": "300", + "$id": "316", "kind": "property", "name": "optionalString", "serializedName": "optionalString", "doc": "An optional string", "type": { - "$id": "301", + "$id": "317", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3552,13 +3680,13 @@ "isHttpMetadata": false }, { - "$id": "302", + "$id": "318", "kind": "property", "name": "optionalInt", "serializedName": "optionalInt", "doc": "An optional integer", "type": { - "$id": "303", + "$id": "319", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -3580,16 +3708,16 @@ "isHttpMetadata": false }, { - "$id": "304", + "$id": "320", "kind": "property", "name": "nullableString", "serializedName": "nullableString", "doc": "A nullable string", "type": { - "$id": "305", + "$id": "321", "kind": "nullable", "type": { - "$id": "306", + "$id": "322", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3613,13 +3741,13 @@ "isHttpMetadata": false }, { - "$id": "307", + "$id": "323", "kind": "property", "name": "id", "serializedName": "id", "doc": "A string as XML attribute", "type": { - "$id": "308", + "$id": "324", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3646,13 +3774,13 @@ "isHttpMetadata": false }, { - "$id": "309", + "$id": "325", "kind": "property", "name": "version", "serializedName": "version", "doc": "An integer as XML attribute", "type": { - "$id": "310", + "$id": "326", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -3679,13 +3807,13 @@ "isHttpMetadata": false }, { - "$id": "311", + "$id": "327", "kind": "property", "name": "isActive", "serializedName": "isActive", "doc": "A boolean as XML attribute", "type": { - "$id": "312", + "$id": "328", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -3712,13 +3840,13 @@ "isHttpMetadata": false }, { - "$id": "313", + "$id": "329", "kind": "property", "name": "originalName", "serializedName": "RenamedProperty", "doc": "A property with a custom XML element name", "type": { - "$id": "314", + "$id": "330", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3747,13 +3875,13 @@ "isHttpMetadata": false }, { - "$id": "315", + "$id": "331", "kind": "property", "name": "xmlIdentifier", "serializedName": "xml-id", "doc": "An attribute with a custom XML name", "type": { - "$id": "316", + "$id": "332", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3786,13 +3914,13 @@ "isHttpMetadata": false }, { - "$id": "317", + "$id": "333", "kind": "property", "name": "content", "serializedName": "content", "doc": "Text content in the element (unwrapped string)", "type": { - "$id": "318", + "$id": "334", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3819,13 +3947,13 @@ "isHttpMetadata": false }, { - "$id": "319", + "$id": "335", "kind": "property", "name": "unwrappedStrings", "serializedName": "unwrappedStrings", "doc": "An unwrapped array of strings - items appear directly without wrapper", "type": { - "$ref": "177" + "$ref": "193" }, "optional": false, "readOnly": false, @@ -3849,13 +3977,13 @@ "isHttpMetadata": false }, { - "$id": "320", + "$id": "336", "kind": "property", "name": "unwrappedCounts", "serializedName": "unwrappedCounts", "doc": "An unwrapped array of integers", "type": { - "$ref": "192" + "$ref": "208" }, "optional": false, "readOnly": false, @@ -3879,22 +4007,22 @@ "isHttpMetadata": false }, { - "$id": "321", + "$id": "337", "kind": "property", "name": "unwrappedItems", "serializedName": "unwrappedItems", "doc": "An unwrapped array of models", "type": { - "$id": "322", + "$id": "338", "kind": "array", "name": "ArrayXmlItem", "valueType": { - "$id": "323", + "$id": "339", "kind": "model", "name": "XmlItem", "namespace": "BasicTypeSpec", "crossLanguageDefinitionId": "BasicTypeSpec.XmlItem", - "usage": "Output,Xml", + "usage": "Input,Output,Xml", "doc": "An item model for XML array testing", "decorators": [ { @@ -3913,13 +4041,13 @@ }, "properties": [ { - "$id": "324", + "$id": "340", "kind": "property", "name": "itemName", "serializedName": "itemName", "doc": "The item name", "type": { - "$id": "325", + "$id": "341", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3941,13 +4069,13 @@ "isHttpMetadata": false }, { - "$id": "326", + "$id": "342", "kind": "property", "name": "itemValue", "serializedName": "itemValue", "doc": "The item value", "type": { - "$id": "327", + "$id": "343", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -3969,13 +4097,13 @@ "isHttpMetadata": false }, { - "$id": "328", + "$id": "344", "kind": "property", "name": "itemId", "serializedName": "itemId", "doc": "Item ID as attribute", "type": { - "$id": "329", + "$id": "345", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4028,13 +4156,13 @@ "isHttpMetadata": false }, { - "$id": "330", + "$id": "346", "kind": "property", "name": "wrappedColors", "serializedName": "wrappedColors", "doc": "A wrapped array of strings (default)", "type": { - "$ref": "177" + "$ref": "193" }, "optional": false, "readOnly": false, @@ -4053,13 +4181,13 @@ "isHttpMetadata": false }, { - "$id": "331", + "$id": "347", "kind": "property", "name": "items", "serializedName": "ItemCollection", "doc": "A wrapped array with custom wrapper name", "type": { - "$ref": "322" + "$ref": "338" }, "optional": false, "readOnly": false, @@ -4085,18 +4213,18 @@ "isHttpMetadata": false }, { - "$id": "332", + "$id": "348", "kind": "property", "name": "nestedModel", "serializedName": "nestedModel", "doc": "A nested model property", "type": { - "$id": "333", + "$id": "349", "kind": "model", "name": "XmlNestedModel", "namespace": "BasicTypeSpec", "crossLanguageDefinitionId": "BasicTypeSpec.XmlNestedModel", - "usage": "Output,Xml", + "usage": "Input,Output,Xml", "doc": "A nested model for XML testing", "decorators": [], "serializationOptions": { @@ -4108,13 +4236,13 @@ }, "properties": [ { - "$id": "334", + "$id": "350", "kind": "property", "name": "value", "serializedName": "value", "doc": "The value of the nested model", "type": { - "$id": "335", + "$id": "351", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4136,13 +4264,13 @@ "isHttpMetadata": false }, { - "$id": "336", + "$id": "352", "kind": "property", "name": "nestedId", "serializedName": "nestedId", "doc": "An attribute on the nested model", "type": { - "$id": "337", + "$id": "353", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4186,13 +4314,13 @@ "isHttpMetadata": false }, { - "$id": "338", + "$id": "354", "kind": "property", "name": "optionalNestedModel", "serializedName": "optionalNestedModel", "doc": "An optional nested model", "type": { - "$ref": "333" + "$ref": "349" }, "optional": true, "readOnly": false, @@ -4210,23 +4338,23 @@ "isHttpMetadata": false }, { - "$id": "339", + "$id": "355", "kind": "property", "name": "metadata", "serializedName": "metadata", "doc": "A dictionary property", "type": { - "$id": "340", + "$id": "356", "kind": "dict", "keyType": { - "$id": "341", + "$id": "357", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "342", + "$id": "358", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4250,18 +4378,18 @@ "isHttpMetadata": false }, { - "$id": "343", + "$id": "359", "kind": "property", "name": "createdAt", "serializedName": "createdAt", "doc": "A date-time property", "type": { - "$id": "344", + "$id": "360", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "345", + "$id": "361", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4286,18 +4414,18 @@ "isHttpMetadata": false }, { - "$id": "346", + "$id": "362", "kind": "property", "name": "duration", "serializedName": "duration", "doc": "A duration property", "type": { - "$id": "347", + "$id": "363", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "348", + "$id": "364", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4322,13 +4450,13 @@ "isHttpMetadata": false }, { - "$id": "349", + "$id": "365", "kind": "property", "name": "data", "serializedName": "data", "doc": "A bytes property", "type": { - "$id": "350", + "$id": "366", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -4351,13 +4479,13 @@ "isHttpMetadata": false }, { - "$id": "351", + "$id": "367", "kind": "property", "name": "optionalRecordUnknown", "serializedName": "optionalRecordUnknown", "doc": "optional record of unknown", "type": { - "$ref": "227" + "$ref": "243" }, "optional": true, "readOnly": false, @@ -4375,7 +4503,7 @@ "isHttpMetadata": false }, { - "$id": "352", + "$id": "368", "kind": "property", "name": "fixedEnum", "serializedName": "fixedEnum", @@ -4399,7 +4527,7 @@ "isHttpMetadata": false }, { - "$id": "353", + "$id": "369", "kind": "property", "name": "extensibleEnum", "serializedName": "extensibleEnum", @@ -4423,7 +4551,7 @@ "isHttpMetadata": false }, { - "$id": "354", + "$id": "370", "kind": "property", "name": "optionalFixedEnum", "serializedName": "optionalFixedEnum", @@ -4447,7 +4575,7 @@ "isHttpMetadata": false }, { - "$id": "355", + "$id": "371", "kind": "property", "name": "optionalExtensibleEnum", "serializedName": "optionalExtensibleEnum", @@ -4471,12 +4599,12 @@ "isHttpMetadata": false }, { - "$id": "356", + "$id": "372", "kind": "property", "name": "label", "serializedName": "label", "type": { - "$id": "357", + "$id": "373", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4491,13 +4619,13 @@ "name": "TypeSpec.Xml.@ns", "arguments": { "ns": { - "$id": "358", + "$id": "374", "kind": "enumvalue", "decorators": [], "name": "ns1", "value": "https://example.com/ns1", "enumType": { - "$id": "359", + "$id": "375", "kind": "enum", "decorators": [ { @@ -4509,7 +4637,7 @@ "isGeneratedName": false, "namespace": "BasicTypeSpec", "valueType": { - "$id": "360", + "$id": "376", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -4518,29 +4646,29 @@ }, "values": [ { - "$id": "361", + "$id": "377", "kind": "enumvalue", "decorators": [], "name": "ns1", "value": "https://example.com/ns1", "enumType": { - "$ref": "359" + "$ref": "375" }, "valueType": { - "$ref": "360" + "$ref": "376" } }, { - "$id": "362", + "$id": "378", "kind": "enumvalue", "decorators": [], "name": "ns2", "value": "https://example.com/ns2", "enumType": { - "$ref": "359" + "$ref": "375" }, "valueType": { - "$ref": "360" + "$ref": "376" } } ], @@ -4557,7 +4685,7 @@ "__accessSet": true }, "valueType": { - "$ref": "360" + "$ref": "376" } } } @@ -4582,12 +4710,12 @@ "isHttpMetadata": false }, { - "$id": "363", + "$id": "379", "kind": "property", "name": "daysUsed", "serializedName": "daysUsed", "type": { - "$id": "364", + "$id": "380", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4602,16 +4730,16 @@ "name": "TypeSpec.Xml.@ns", "arguments": { "ns": { - "$id": "365", + "$id": "381", "kind": "enumvalue", "decorators": [], "name": "ns2", "value": "https://example.com/ns2", "enumType": { - "$ref": "359" + "$ref": "375" }, "valueType": { - "$ref": "360" + "$ref": "376" } } } @@ -4632,12 +4760,12 @@ "isHttpMetadata": false }, { - "$id": "366", + "$id": "382", "kind": "property", "name": "fooItems", "serializedName": "fooItems", "type": { - "$ref": "177" + "$ref": "193" }, "optional": false, "readOnly": false, @@ -4668,12 +4796,12 @@ "isHttpMetadata": false }, { - "$id": "367", + "$id": "383", "kind": "property", "name": "anotherModel", "serializedName": "anotherModel", "type": { - "$ref": "333" + "$ref": "349" }, "optional": false, "readOnly": false, @@ -4703,21 +4831,21 @@ "isHttpMetadata": false }, { - "$id": "368", + "$id": "384", "kind": "property", "name": "modelsWithNamespaces", "serializedName": "modelsWithNamespaces", "type": { - "$id": "369", + "$id": "385", "kind": "array", "name": "ArrayXmlModelWithNamespace", "valueType": { - "$id": "370", + "$id": "386", "kind": "model", "name": "XmlModelWithNamespace", "namespace": "BasicTypeSpec", "crossLanguageDefinitionId": "BasicTypeSpec.XmlModelWithNamespace", - "usage": "Output,Xml", + "usage": "Input,Output,Xml", "decorators": [ { "name": "TypeSpec.Xml.@ns", @@ -4740,12 +4868,12 @@ }, "properties": [ { - "$id": "371", + "$id": "387", "kind": "property", "name": "foo", "serializedName": "foo", "type": { - "$id": "372", + "$id": "388", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4792,12 +4920,12 @@ "isHttpMetadata": false }, { - "$id": "373", + "$id": "389", "kind": "property", "name": "unwrappedModelsWithNamespaces", "serializedName": "unwrappedModelsWithNamespaces", "type": { - "$ref": "369" + "$ref": "385" }, "optional": false, "readOnly": false, @@ -4821,16 +4949,16 @@ "isHttpMetadata": false }, { - "$id": "374", + "$id": "390", "kind": "property", "name": "listOfListFoo", "serializedName": "listOfListFoo", "type": { - "$id": "375", + "$id": "391", "kind": "array", "name": "ArrayArray", "valueType": { - "$ref": "322" + "$ref": "338" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -4852,22 +4980,22 @@ "isHttpMetadata": false }, { - "$id": "376", + "$id": "392", "kind": "property", "name": "dictionaryFoo", "serializedName": "dictionaryFoo", "type": { - "$id": "377", + "$id": "393", "kind": "dict", "keyType": { - "$id": "378", + "$id": "394", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "323" + "$ref": "339" }, "decorators": [] }, @@ -4887,22 +5015,22 @@ "isHttpMetadata": false }, { - "$id": "379", + "$id": "395", "kind": "property", "name": "dictionaryOfDictionaryFoo", "serializedName": "dictionaryOfDictionaryFoo", "type": { - "$id": "380", + "$id": "396", "kind": "dict", "keyType": { - "$id": "381", + "$id": "397", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "377" + "$ref": "393" }, "decorators": [] }, @@ -4922,22 +5050,22 @@ "isHttpMetadata": false }, { - "$id": "382", + "$id": "398", "kind": "property", "name": "dictionaryListFoo", "serializedName": "dictionaryListFoo", "type": { - "$id": "383", + "$id": "399", "kind": "dict", "keyType": { - "$id": "384", + "$id": "400", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "322" + "$ref": "338" }, "decorators": [] }, @@ -4957,16 +5085,16 @@ "isHttpMetadata": false }, { - "$id": "385", + "$id": "401", "kind": "property", "name": "listOfDictionaryFoo", "serializedName": "listOfDictionaryFoo", "type": { - "$id": "386", + "$id": "402", "kind": "array", "name": "ArrayRecord", "valueType": { - "$ref": "377" + "$ref": "393" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -4990,21 +5118,21 @@ ] }, { - "$ref": "323" + "$ref": "339" }, { - "$ref": "333" + "$ref": "349" }, { - "$ref": "370" + "$ref": "386" }, { - "$id": "387", + "$id": "403", "kind": "model", "name": "Tree", "namespace": "BasicTypeSpec", "crossLanguageDefinitionId": "BasicTypeSpec.Tree", - "usage": "Output,Json,Xml", + "usage": "Input,Output,Json,Xml", "doc": "Tree is a specific type of plant", "discriminatorValue": "tree", "decorators": [], @@ -5019,12 +5147,12 @@ } }, "baseModel": { - "$id": "388", + "$id": "404", "kind": "model", "name": "Plant", "namespace": "BasicTypeSpec", "crossLanguageDefinitionId": "BasicTypeSpec.Plant", - "usage": "Output,Json,Xml", + "usage": "Input,Output,Json,Xml", "doc": "Base plant with discriminator", "decorators": [], "serializationOptions": { @@ -5038,13 +5166,13 @@ } }, "discriminatorProperty": { - "$id": "389", + "$id": "405", "kind": "property", "name": "species", "serializedName": "species", "doc": "The species of plant", "type": { - "$id": "390", + "$id": "406", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5070,16 +5198,16 @@ }, "properties": [ { - "$ref": "389" + "$ref": "405" }, { - "$id": "391", + "$id": "407", "kind": "property", "name": "id", "serializedName": "id", "doc": "The unique identifier of the plant", "type": { - "$id": "392", + "$id": "408", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5104,13 +5232,13 @@ "isHttpMetadata": false }, { - "$id": "393", + "$id": "409", "kind": "property", "name": "height", "serializedName": "height", "doc": "The height of the plant in centimeters", "type": { - "$id": "394", + "$id": "410", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -5137,13 +5265,13 @@ ], "discriminatedSubtypes": { "tree": { - "$ref": "387" + "$ref": "403" } } }, "properties": [ { - "$id": "395", + "$id": "411", "kind": "property", "name": "species", "serializedName": "species", @@ -5169,13 +5297,13 @@ "isHttpMetadata": false }, { - "$id": "396", + "$id": "412", "kind": "property", "name": "age", "serializedName": "age", "doc": "The age of the tree in years", "type": { - "$id": "397", + "$id": "413", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -5202,19 +5330,19 @@ ] }, { - "$ref": "388" + "$ref": "404" } ], "clients": [ { - "$id": "398", + "$id": "414", "kind": "client", "name": "BasicTypeSpecClient", "namespace": "BasicTypeSpec", "doc": "This is a sample typespec project.", "methods": [ { - "$id": "399", + "$id": "415", "kind": "basic", "name": "sayHi", "accessibility": "public", @@ -5224,19 +5352,19 @@ ], "doc": "Return hi", "operation": { - "$id": "400", + "$id": "416", "name": "sayHi", "resourceName": "BasicTypeSpec", "doc": "Return hi", "accessibility": "public", "parameters": [ { - "$id": "401", + "$id": "417", "kind": "header", "name": "headParameter", "serializedName": "head-parameter", "type": { - "$id": "402", + "$id": "418", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5251,12 +5379,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.sayHi.headParameter", "methodParameterSegments": [ { - "$id": "403", + "$id": "419", "kind": "method", "name": "headParameter", "serializedName": "head-parameter", "type": { - "$id": "404", + "$id": "420", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5274,12 +5402,12 @@ ] }, { - "$id": "405", + "$id": "421", "kind": "query", "name": "queryParameter", "serializedName": "queryParameter", "type": { - "$id": "406", + "$id": "422", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5294,12 +5422,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "407", + "$id": "423", "kind": "method", "name": "queryParameter", "serializedName": "queryParameter", "type": { - "$id": "408", + "$id": "424", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5317,12 +5445,12 @@ ] }, { - "$id": "409", + "$id": "425", "kind": "query", "name": "optionalQuery", "serializedName": "optionalQuery", "type": { - "$id": "410", + "$id": "426", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5337,12 +5465,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "411", + "$id": "427", "kind": "method", "name": "optionalQuery", "serializedName": "optionalQuery", "type": { - "$id": "412", + "$id": "428", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5360,7 +5488,7 @@ ] }, { - "$id": "413", + "$id": "429", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -5376,7 +5504,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.sayHi.accept", "methodParameterSegments": [ { - "$id": "414", + "$id": "430", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -5401,7 +5529,7 @@ 200 ], "bodyType": { - "$ref": "171" + "$ref": "187" }, "headers": [], "isErrorResponse": false, @@ -5422,21 +5550,21 @@ }, "parameters": [ { - "$ref": "403" + "$ref": "419" }, { - "$ref": "407" + "$ref": "423" }, { - "$ref": "411" + "$ref": "427" }, { - "$ref": "414" + "$ref": "430" } ], "response": { "type": { - "$ref": "171" + "$ref": "187" } }, "isOverride": false, @@ -5445,7 +5573,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.sayHi" }, { - "$id": "415", + "$id": "431", "kind": "basic", "name": "helloAgain", "accessibility": "public", @@ -5455,19 +5583,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "416", + "$id": "432", "name": "helloAgain", "resourceName": "BasicTypeSpec", "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "417", + "$id": "433", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "418", + "$id": "434", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5482,12 +5610,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloAgain.p1", "methodParameterSegments": [ { - "$id": "419", + "$id": "435", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "420", + "$id": "436", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5505,7 +5633,7 @@ ] }, { - "$id": "421", + "$id": "437", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -5521,7 +5649,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloAgain.contentType", "methodParameterSegments": [ { - "$id": "422", + "$id": "438", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -5540,12 +5668,12 @@ ] }, { - "$id": "423", + "$id": "439", "kind": "path", "name": "p2", "serializedName": "p2", "type": { - "$id": "424", + "$id": "440", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5563,12 +5691,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloAgain.p2", "methodParameterSegments": [ { - "$id": "425", + "$id": "441", "kind": "method", "name": "p2", "serializedName": "p2", "type": { - "$id": "426", + "$id": "442", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5586,7 +5714,7 @@ ] }, { - "$id": "427", + "$id": "443", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -5602,7 +5730,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloAgain.accept", "methodParameterSegments": [ { - "$id": "428", + "$id": "444", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -5621,12 +5749,12 @@ ] }, { - "$id": "429", + "$id": "445", "kind": "body", "name": "action", "serializedName": "action", "type": { - "$ref": "196" + "$ref": "212" }, "isApiVersion": false, "contentTypes": [ @@ -5640,12 +5768,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloAgain.action", "methodParameterSegments": [ { - "$id": "430", + "$id": "446", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$ref": "196" + "$ref": "212" }, "location": "Body", "isApiVersion": false, @@ -5665,7 +5793,7 @@ 200 ], "bodyType": { - "$ref": "196" + "$ref": "212" }, "headers": [], "isErrorResponse": false, @@ -5689,24 +5817,24 @@ }, "parameters": [ { - "$ref": "419" + "$ref": "435" }, { - "$ref": "430" + "$ref": "446" }, { - "$ref": "422" + "$ref": "438" }, { - "$ref": "425" + "$ref": "441" }, { - "$ref": "428" + "$ref": "444" } ], "response": { "type": { - "$ref": "196" + "$ref": "212" } }, "isOverride": false, @@ -5715,7 +5843,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloAgain" }, { - "$id": "431", + "$id": "447", "kind": "basic", "name": "noContentType", "accessibility": "public", @@ -5725,19 +5853,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "432", + "$id": "448", "name": "noContentType", "resourceName": "BasicTypeSpec", "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "433", + "$id": "449", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "434", + "$id": "450", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5752,12 +5880,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.noContentType.p1", "methodParameterSegments": [ { - "$id": "435", + "$id": "451", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "436", + "$id": "452", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5775,12 +5903,12 @@ ] }, { - "$id": "437", + "$id": "453", "kind": "path", "name": "p2", "serializedName": "p2", "type": { - "$id": "438", + "$id": "454", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5798,12 +5926,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.noContentType.p2", "methodParameterSegments": [ { - "$id": "439", + "$id": "455", "kind": "method", "name": "p2", "serializedName": "p2", "type": { - "$id": "440", + "$id": "456", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5821,7 +5949,7 @@ ] }, { - "$id": "441", + "$id": "457", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -5838,7 +5966,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.noContentType.contentType", "methodParameterSegments": [ { - "$id": "442", + "$id": "458", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -5858,7 +5986,7 @@ ] }, { - "$id": "443", + "$id": "459", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -5874,7 +6002,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.noContentType.accept", "methodParameterSegments": [ { - "$id": "444", + "$id": "460", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -5893,12 +6021,12 @@ ] }, { - "$id": "445", + "$id": "461", "kind": "body", "name": "action", "serializedName": "action", "type": { - "$ref": "196" + "$ref": "212" }, "isApiVersion": false, "contentTypes": [ @@ -5912,12 +6040,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.noContentType.action", "methodParameterSegments": [ { - "$id": "446", + "$id": "462", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$ref": "196" + "$ref": "212" }, "location": "Body", "isApiVersion": false, @@ -5937,7 +6065,7 @@ 200 ], "bodyType": { - "$ref": "196" + "$ref": "212" }, "headers": [], "isErrorResponse": false, @@ -5961,24 +6089,24 @@ }, "parameters": [ { - "$ref": "435" + "$ref": "451" }, { - "$ref": "446" + "$ref": "462" }, { - "$ref": "439" + "$ref": "455" }, { - "$ref": "442" + "$ref": "458" }, { - "$ref": "444" + "$ref": "460" } ], "response": { "type": { - "$ref": "196" + "$ref": "212" } }, "isOverride": false, @@ -5987,7 +6115,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.noContentType" }, { - "$id": "447", + "$id": "463", "kind": "basic", "name": "helloDemo2", "accessibility": "public", @@ -5997,14 +6125,14 @@ ], "doc": "Return hi in demo2", "operation": { - "$id": "448", + "$id": "464", "name": "helloDemo2", "resourceName": "BasicTypeSpec", "doc": "Return hi in demo2", "accessibility": "public", "parameters": [ { - "$id": "449", + "$id": "465", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -6020,7 +6148,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloDemo2.accept", "methodParameterSegments": [ { - "$id": "450", + "$id": "466", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6045,7 +6173,7 @@ 200 ], "bodyType": { - "$ref": "171" + "$ref": "187" }, "headers": [], "isErrorResponse": false, @@ -6066,12 +6194,12 @@ }, "parameters": [ { - "$ref": "450" + "$ref": "466" } ], "response": { "type": { - "$ref": "171" + "$ref": "187" } }, "isOverride": false, @@ -6080,7 +6208,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloDemo2" }, { - "$id": "451", + "$id": "467", "kind": "basic", "name": "createLiteral", "accessibility": "public", @@ -6090,14 +6218,14 @@ ], "doc": "Create with literal value", "operation": { - "$id": "452", + "$id": "468", "name": "createLiteral", "resourceName": "BasicTypeSpec", "doc": "Create with literal value", "accessibility": "public", "parameters": [ { - "$id": "453", + "$id": "469", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -6114,7 +6242,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.createLiteral.contentType", "methodParameterSegments": [ { - "$id": "454", + "$id": "470", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -6134,7 +6262,7 @@ ] }, { - "$id": "455", + "$id": "471", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -6150,7 +6278,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.createLiteral.accept", "methodParameterSegments": [ { - "$id": "456", + "$id": "472", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6169,12 +6297,12 @@ ] }, { - "$id": "457", + "$id": "473", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "171" + "$ref": "187" }, "isApiVersion": false, "contentTypes": [ @@ -6188,12 +6316,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.createLiteral.body", "methodParameterSegments": [ { - "$id": "458", + "$id": "474", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "171" + "$ref": "187" }, "location": "Body", "isApiVersion": false, @@ -6213,7 +6341,7 @@ 200 ], "bodyType": { - "$ref": "171" + "$ref": "187" }, "headers": [], "isErrorResponse": false, @@ -6237,18 +6365,18 @@ }, "parameters": [ { - "$ref": "458" + "$ref": "474" }, { - "$ref": "454" + "$ref": "470" }, { - "$ref": "456" + "$ref": "472" } ], "response": { "type": { - "$ref": "171" + "$ref": "187" } }, "isOverride": false, @@ -6257,7 +6385,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.createLiteral" }, { - "$id": "459", + "$id": "475", "kind": "basic", "name": "helloLiteral", "accessibility": "public", @@ -6267,14 +6395,14 @@ ], "doc": "Send literal parameters", "operation": { - "$id": "460", + "$id": "476", "name": "helloLiteral", "resourceName": "BasicTypeSpec", "doc": "Send literal parameters", "accessibility": "public", "parameters": [ { - "$id": "461", + "$id": "477", "kind": "header", "name": "p1", "serializedName": "p1", @@ -6290,7 +6418,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloLiteral.p1", "methodParameterSegments": [ { - "$id": "462", + "$id": "478", "kind": "method", "name": "p1", "serializedName": "p1", @@ -6309,7 +6437,7 @@ ] }, { - "$id": "463", + "$id": "479", "kind": "path", "name": "p2", "serializedName": "p2", @@ -6328,7 +6456,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloLiteral.p2", "methodParameterSegments": [ { - "$id": "464", + "$id": "480", "kind": "method", "name": "p2", "serializedName": "p2", @@ -6347,7 +6475,7 @@ ] }, { - "$id": "465", + "$id": "481", "kind": "query", "name": "p3", "serializedName": "p3", @@ -6363,7 +6491,7 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "466", + "$id": "482", "kind": "method", "name": "p3", "serializedName": "p3", @@ -6382,7 +6510,7 @@ ] }, { - "$id": "467", + "$id": "483", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -6398,7 +6526,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloLiteral.accept", "methodParameterSegments": [ { - "$id": "468", + "$id": "484", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6423,7 +6551,7 @@ 200 ], "bodyType": { - "$ref": "171" + "$ref": "187" }, "headers": [], "isErrorResponse": false, @@ -6444,21 +6572,21 @@ }, "parameters": [ { - "$ref": "462" + "$ref": "478" }, { - "$ref": "464" + "$ref": "480" }, { - "$ref": "466" + "$ref": "482" }, { - "$ref": "468" + "$ref": "484" } ], "response": { "type": { - "$ref": "171" + "$ref": "187" } }, "isOverride": false, @@ -6467,7 +6595,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloLiteral" }, { - "$id": "469", + "$id": "485", "kind": "basic", "name": "topAction", "accessibility": "public", @@ -6477,24 +6605,24 @@ ], "doc": "top level method", "operation": { - "$id": "470", + "$id": "486", "name": "topAction", "resourceName": "BasicTypeSpec", "doc": "top level method", "accessibility": "public", "parameters": [ { - "$id": "471", + "$id": "487", "kind": "path", "name": "action", "serializedName": "action", "type": { - "$id": "472", + "$id": "488", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "473", + "$id": "489", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6515,17 +6643,17 @@ "crossLanguageDefinitionId": "BasicTypeSpec.topAction.action", "methodParameterSegments": [ { - "$id": "474", + "$id": "490", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$id": "475", + "$id": "491", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "476", + "$id": "492", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6546,7 +6674,7 @@ ] }, { - "$id": "477", + "$id": "493", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -6562,7 +6690,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.topAction.accept", "methodParameterSegments": [ { - "$id": "478", + "$id": "494", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6587,7 +6715,7 @@ 200 ], "bodyType": { - "$ref": "171" + "$ref": "187" }, "headers": [], "isErrorResponse": false, @@ -6608,15 +6736,15 @@ }, "parameters": [ { - "$ref": "474" + "$ref": "490" }, { - "$ref": "478" + "$ref": "494" } ], "response": { "type": { - "$ref": "171" + "$ref": "187" } }, "isOverride": false, @@ -6625,7 +6753,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.topAction" }, { - "$id": "479", + "$id": "495", "kind": "basic", "name": "topAction2", "accessibility": "public", @@ -6635,14 +6763,14 @@ ], "doc": "top level method2", "operation": { - "$id": "480", + "$id": "496", "name": "topAction2", "resourceName": "BasicTypeSpec", "doc": "top level method2", "accessibility": "public", "parameters": [ { - "$id": "481", + "$id": "497", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -6658,7 +6786,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.topAction2.accept", "methodParameterSegments": [ { - "$id": "482", + "$id": "498", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6683,7 +6811,7 @@ 200 ], "bodyType": { - "$ref": "171" + "$ref": "187" }, "headers": [], "isErrorResponse": false, @@ -6704,12 +6832,12 @@ }, "parameters": [ { - "$ref": "482" + "$ref": "498" } ], "response": { "type": { - "$ref": "171" + "$ref": "187" } }, "isOverride": false, @@ -6718,7 +6846,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.topAction2" }, { - "$id": "483", + "$id": "499", "kind": "basic", "name": "patchAction", "accessibility": "public", @@ -6728,14 +6856,14 @@ ], "doc": "top level patch", "operation": { - "$id": "484", + "$id": "500", "name": "patchAction", "resourceName": "BasicTypeSpec", "doc": "top level patch", "accessibility": "public", "parameters": [ { - "$id": "485", + "$id": "501", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -6752,7 +6880,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.patchAction.contentType", "methodParameterSegments": [ { - "$id": "486", + "$id": "502", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -6772,7 +6900,7 @@ ] }, { - "$id": "487", + "$id": "503", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -6788,7 +6916,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.patchAction.accept", "methodParameterSegments": [ { - "$id": "488", + "$id": "504", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6807,12 +6935,12 @@ ] }, { - "$id": "489", + "$id": "505", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "171" + "$ref": "187" }, "isApiVersion": false, "contentTypes": [ @@ -6826,12 +6954,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.patchAction.body", "methodParameterSegments": [ { - "$id": "490", + "$id": "506", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "171" + "$ref": "187" }, "location": "Body", "isApiVersion": false, @@ -6851,7 +6979,7 @@ 200 ], "bodyType": { - "$ref": "171" + "$ref": "187" }, "headers": [], "isErrorResponse": false, @@ -6875,18 +7003,18 @@ }, "parameters": [ { - "$ref": "490" + "$ref": "506" }, { - "$ref": "486" + "$ref": "502" }, { - "$ref": "488" + "$ref": "504" } ], "response": { "type": { - "$ref": "171" + "$ref": "187" } }, "isOverride": false, @@ -6895,7 +7023,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.patchAction" }, { - "$id": "491", + "$id": "507", "kind": "basic", "name": "anonymousBody", "accessibility": "public", @@ -6905,14 +7033,14 @@ ], "doc": "body parameter without body decorator", "operation": { - "$id": "492", + "$id": "508", "name": "anonymousBody", "resourceName": "BasicTypeSpec", "doc": "body parameter without body decorator", "accessibility": "public", "parameters": [ { - "$id": "493", + "$id": "509", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -6929,7 +7057,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.contentType", "methodParameterSegments": [ { - "$id": "494", + "$id": "510", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -6949,7 +7077,7 @@ ] }, { - "$id": "495", + "$id": "511", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -6965,7 +7093,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.accept", "methodParameterSegments": [ { - "$id": "496", + "$id": "512", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6984,12 +7112,12 @@ ] }, { - "$id": "497", + "$id": "513", "kind": "body", "name": "thingModel", "serializedName": "thingModel", "type": { - "$ref": "171" + "$ref": "187" }, "isApiVersion": false, "contentTypes": [ @@ -7003,13 +7131,13 @@ "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.body", "methodParameterSegments": [ { - "$id": "498", + "$id": "514", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the ThingModel", "type": { - "$id": "499", + "$id": "515", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7033,7 +7161,7 @@ 200 ], "bodyType": { - "$ref": "171" + "$ref": "187" }, "headers": [], "isErrorResponse": false, @@ -7057,16 +7185,16 @@ }, "parameters": [ { - "$ref": "498" + "$ref": "514" }, { - "$id": "500", + "$id": "516", "kind": "method", "name": "requiredUnion", "serializedName": "requiredUnion", "doc": "required Union", "type": { - "$ref": "175" + "$ref": "191" }, "location": "Body", "isApiVersion": false, @@ -7078,7 +7206,7 @@ "decorators": [] }, { - "$id": "501", + "$id": "517", "kind": "method", "name": "requiredLiteralString", "serializedName": "requiredLiteralString", @@ -7096,7 +7224,7 @@ "decorators": [] }, { - "$id": "502", + "$id": "518", "kind": "method", "name": "requiredLiteralInt", "serializedName": "requiredLiteralInt", @@ -7114,7 +7242,7 @@ "decorators": [] }, { - "$id": "503", + "$id": "519", "kind": "method", "name": "requiredLiteralFloat", "serializedName": "requiredLiteralFloat", @@ -7132,7 +7260,7 @@ "decorators": [] }, { - "$id": "504", + "$id": "520", "kind": "method", "name": "requiredLiteralBool", "serializedName": "requiredLiteralBool", @@ -7150,18 +7278,18 @@ "decorators": [] }, { - "$id": "505", + "$id": "521", "kind": "method", "name": "optionalLiteralString", "serializedName": "optionalLiteralString", "doc": "optional literal string", "type": { - "$id": "506", + "$id": "522", "kind": "enum", "name": "ThingModelOptionalLiteralString", "crossLanguageDefinitionId": "", "valueType": { - "$id": "507", + "$id": "523", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7169,12 +7297,12 @@ }, "values": [ { - "$id": "508", + "$id": "524", "kind": "enumvalue", "name": "reject", "value": "reject", "valueType": { - "$id": "509", + "$id": "525", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -7182,7 +7310,7 @@ "crossLanguageDefinitionId": "TypeSpec.string" }, "enumType": { - "$ref": "506" + "$ref": "522" }, "decorators": [] } @@ -7203,18 +7331,18 @@ "decorators": [] }, { - "$id": "510", + "$id": "526", "kind": "method", "name": "optionalLiteralInt", "serializedName": "optionalLiteralInt", "doc": "optional literal int", "type": { - "$id": "511", + "$id": "527", "kind": "enum", "name": "ThingModelOptionalLiteralInt", "crossLanguageDefinitionId": "", "valueType": { - "$id": "512", + "$id": "528", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -7222,12 +7350,12 @@ }, "values": [ { - "$id": "513", + "$id": "529", "kind": "enumvalue", "name": "456", "value": 456, "valueType": { - "$id": "514", + "$id": "530", "kind": "int32", "decorators": [], "doc": "A 32-bit integer. (`-2,147,483,648` to `2,147,483,647`)", @@ -7235,7 +7363,7 @@ "crossLanguageDefinitionId": "TypeSpec.int32" }, "enumType": { - "$ref": "511" + "$ref": "527" }, "decorators": [] } @@ -7256,18 +7384,18 @@ "decorators": [] }, { - "$id": "515", + "$id": "531", "kind": "method", "name": "optionalLiteralFloat", "serializedName": "optionalLiteralFloat", "doc": "optional literal float", "type": { - "$id": "516", + "$id": "532", "kind": "enum", "name": "ThingModelOptionalLiteralFloat", "crossLanguageDefinitionId": "", "valueType": { - "$id": "517", + "$id": "533", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -7275,12 +7403,12 @@ }, "values": [ { - "$id": "518", + "$id": "534", "kind": "enumvalue", "name": "4.56", "value": 4.56, "valueType": { - "$id": "519", + "$id": "535", "kind": "float32", "decorators": [], "doc": "A 32 bit floating point number. (`±1.5 x 10^−45` to `±3.4 x 10^38`)", @@ -7288,7 +7416,7 @@ "crossLanguageDefinitionId": "TypeSpec.float32" }, "enumType": { - "$ref": "516" + "$ref": "532" }, "decorators": [] } @@ -7309,7 +7437,7 @@ "decorators": [] }, { - "$id": "520", + "$id": "536", "kind": "method", "name": "optionalLiteralBool", "serializedName": "optionalLiteralBool", @@ -7327,13 +7455,13 @@ "decorators": [] }, { - "$id": "521", + "$id": "537", "kind": "method", "name": "requiredBadDescription", "serializedName": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "522", + "$id": "538", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7349,13 +7477,13 @@ "decorators": [] }, { - "$id": "523", + "$id": "539", "kind": "method", "name": "optionalNullableList", "serializedName": "optionalNullableList", "doc": "optional nullable collection", "type": { - "$ref": "191" + "$ref": "207" }, "location": "Body", "isApiVersion": false, @@ -7367,13 +7495,13 @@ "decorators": [] }, { - "$id": "524", + "$id": "540", "kind": "method", "name": "requiredNullableList", "serializedName": "requiredNullableList", "doc": "required nullable collection", "type": { - "$ref": "195" + "$ref": "211" }, "location": "Body", "isApiVersion": false, @@ -7385,15 +7513,15 @@ "decorators": [] }, { - "$ref": "494" + "$ref": "510" }, { - "$ref": "496" + "$ref": "512" } ], "response": { "type": { - "$ref": "171" + "$ref": "187" } }, "isOverride": false, @@ -7402,7 +7530,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody" }, { - "$id": "525", + "$id": "541", "kind": "basic", "name": "friendlyModel", "accessibility": "public", @@ -7412,14 +7540,14 @@ ], "doc": "Model can have its friendly name", "operation": { - "$id": "526", + "$id": "542", "name": "friendlyModel", "resourceName": "BasicTypeSpec", "doc": "Model can have its friendly name", "accessibility": "public", "parameters": [ { - "$id": "527", + "$id": "543", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -7436,7 +7564,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.friendlyModel.contentType", "methodParameterSegments": [ { - "$id": "528", + "$id": "544", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -7456,7 +7584,7 @@ ] }, { - "$id": "529", + "$id": "545", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7472,7 +7600,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.friendlyModel.accept", "methodParameterSegments": [ { - "$id": "530", + "$id": "546", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7491,12 +7619,12 @@ ] }, { - "$id": "531", + "$id": "547", "kind": "body", "name": "friendModel", "serializedName": "friendModel", "type": { - "$ref": "244" + "$ref": "260" }, "isApiVersion": false, "contentTypes": [ @@ -7510,13 +7638,13 @@ "crossLanguageDefinitionId": "BasicTypeSpec.friendlyModel.body", "methodParameterSegments": [ { - "$id": "532", + "$id": "548", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "533", + "$id": "549", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7540,7 +7668,7 @@ 200 ], "bodyType": { - "$ref": "244" + "$ref": "260" }, "headers": [], "isErrorResponse": false, @@ -7564,18 +7692,18 @@ }, "parameters": [ { - "$ref": "532" + "$ref": "548" }, { - "$ref": "528" + "$ref": "544" }, { - "$ref": "530" + "$ref": "546" } ], "response": { "type": { - "$ref": "244" + "$ref": "260" } }, "isOverride": false, @@ -7584,7 +7712,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.friendlyModel" }, { - "$id": "534", + "$id": "550", "kind": "basic", "name": "addTimeHeader", "accessibility": "public", @@ -7593,23 +7721,23 @@ "2024-08-16-preview" ], "operation": { - "$id": "535", + "$id": "551", "name": "addTimeHeader", "resourceName": "BasicTypeSpec", "accessibility": "public", "parameters": [ { - "$id": "536", + "$id": "552", "kind": "header", "name": "repeatabilityFirstSent", "serializedName": "Repeatability-First-Sent", "type": { - "$id": "537", + "$id": "553", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "538", + "$id": "554", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7627,17 +7755,17 @@ "crossLanguageDefinitionId": "BasicTypeSpec.addTimeHeader.repeatabilityFirstSent", "methodParameterSegments": [ { - "$id": "539", + "$id": "555", "kind": "method", "name": "repeatabilityFirstSent", "serializedName": "Repeatability-First-Sent", "type": { - "$id": "540", + "$id": "556", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "541", + "$id": "557", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7679,7 +7807,7 @@ }, "parameters": [ { - "$ref": "539" + "$ref": "555" } ], "response": {}, @@ -7689,7 +7817,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.addTimeHeader" }, { - "$id": "542", + "$id": "558", "kind": "basic", "name": "projectedNameModel", "accessibility": "public", @@ -7699,14 +7827,14 @@ ], "doc": "Model can have its projected name", "operation": { - "$id": "543", + "$id": "559", "name": "projectedNameModel", "resourceName": "BasicTypeSpec", "doc": "Model can have its projected name", "accessibility": "public", "parameters": [ { - "$id": "544", + "$id": "560", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -7723,7 +7851,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.projectedNameModel.contentType", "methodParameterSegments": [ { - "$id": "545", + "$id": "561", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -7743,7 +7871,7 @@ ] }, { - "$id": "546", + "$id": "562", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7759,7 +7887,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.projectedNameModel.accept", "methodParameterSegments": [ { - "$id": "547", + "$id": "563", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7778,12 +7906,12 @@ ] }, { - "$id": "548", + "$id": "564", "kind": "body", "name": "renamedModel", "serializedName": "renamedModel", "type": { - "$ref": "247" + "$ref": "263" }, "isApiVersion": false, "contentTypes": [ @@ -7797,13 +7925,13 @@ "crossLanguageDefinitionId": "BasicTypeSpec.projectedNameModel.body", "methodParameterSegments": [ { - "$id": "549", + "$id": "565", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the ModelWithClientName", "type": { - "$id": "550", + "$id": "566", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7827,7 +7955,7 @@ 200 ], "bodyType": { - "$ref": "247" + "$ref": "263" }, "headers": [], "isErrorResponse": false, @@ -7851,18 +7979,18 @@ }, "parameters": [ { - "$ref": "549" + "$ref": "565" }, { - "$ref": "545" + "$ref": "561" }, { - "$ref": "547" + "$ref": "563" } ], "response": { "type": { - "$ref": "247" + "$ref": "263" } }, "isOverride": false, @@ -7871,7 +7999,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.projectedNameModel" }, { - "$id": "551", + "$id": "567", "kind": "basic", "name": "returnsAnonymousModel", "accessibility": "public", @@ -7881,14 +8009,14 @@ ], "doc": "return anonymous model", "operation": { - "$id": "552", + "$id": "568", "name": "returnsAnonymousModel", "resourceName": "BasicTypeSpec", "doc": "return anonymous model", "accessibility": "public", "parameters": [ { - "$id": "553", + "$id": "569", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7904,7 +8032,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.returnsAnonymousModel.accept", "methodParameterSegments": [ { - "$id": "554", + "$id": "570", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7929,7 +8057,7 @@ 200 ], "bodyType": { - "$ref": "250" + "$ref": "266" }, "headers": [], "isErrorResponse": false, @@ -7950,12 +8078,12 @@ }, "parameters": [ { - "$ref": "554" + "$ref": "570" } ], "response": { "type": { - "$ref": "250" + "$ref": "266" } }, "isOverride": false, @@ -7964,7 +8092,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.returnsAnonymousModel" }, { - "$id": "555", + "$id": "571", "kind": "basic", "name": "getUnknownValue", "accessibility": "public", @@ -7974,19 +8102,19 @@ ], "doc": "get extensible enum", "operation": { - "$id": "556", + "$id": "572", "name": "getUnknownValue", "resourceName": "BasicTypeSpec", "doc": "get extensible enum", "accessibility": "public", "parameters": [ { - "$id": "557", + "$id": "573", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$id": "558", + "$id": "574", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8001,12 +8129,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.getUnknownValue.accept", "methodParameterSegments": [ { - "$id": "559", + "$id": "575", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "558" + "$ref": "574" }, "location": "Header", "isApiVersion": false, @@ -8026,7 +8154,7 @@ 200 ], "bodyType": { - "$id": "560", + "$id": "576", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8058,12 +8186,12 @@ }, "parameters": [ { - "$ref": "559" + "$ref": "575" } ], "response": { "type": { - "$ref": "560" + "$ref": "576" } }, "isOverride": false, @@ -8072,7 +8200,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.getUnknownValue" }, { - "$id": "561", + "$id": "577", "kind": "basic", "name": "internalProtocol", "accessibility": "public", @@ -8082,14 +8210,14 @@ ], "doc": "When set protocol false and convenient true, then the protocol method should be internal", "operation": { - "$id": "562", + "$id": "578", "name": "internalProtocol", "resourceName": "BasicTypeSpec", "doc": "When set protocol false and convenient true, then the protocol method should be internal", "accessibility": "public", "parameters": [ { - "$id": "563", + "$id": "579", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -8106,7 +8234,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.internalProtocol.contentType", "methodParameterSegments": [ { - "$id": "564", + "$id": "580", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -8126,7 +8254,7 @@ ] }, { - "$id": "565", + "$id": "581", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8142,7 +8270,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.internalProtocol.accept", "methodParameterSegments": [ { - "$id": "566", + "$id": "582", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -8161,12 +8289,12 @@ ] }, { - "$id": "567", + "$id": "583", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "171" + "$ref": "187" }, "isApiVersion": false, "contentTypes": [ @@ -8180,12 +8308,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.internalProtocol.body", "methodParameterSegments": [ { - "$id": "568", + "$id": "584", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "171" + "$ref": "187" }, "location": "Body", "isApiVersion": false, @@ -8205,7 +8333,7 @@ 200 ], "bodyType": { - "$ref": "171" + "$ref": "187" }, "headers": [], "isErrorResponse": false, @@ -8229,18 +8357,18 @@ }, "parameters": [ { - "$ref": "568" + "$ref": "584" }, { - "$ref": "564" + "$ref": "580" }, { - "$ref": "566" + "$ref": "582" } ], "response": { "type": { - "$ref": "171" + "$ref": "187" } }, "isOverride": false, @@ -8249,7 +8377,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.internalProtocol" }, { - "$id": "569", + "$id": "585", "kind": "basic", "name": "stillConvenient", "accessibility": "public", @@ -8259,7 +8387,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": "570", + "$id": "586", "name": "stillConvenient", "resourceName": "BasicTypeSpec", "doc": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", @@ -8292,7 +8420,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.stillConvenient" }, { - "$id": "571", + "$id": "587", "kind": "basic", "name": "headAsBoolean", "accessibility": "public", @@ -8302,19 +8430,19 @@ ], "doc": "head as boolean.", "operation": { - "$id": "572", + "$id": "588", "name": "headAsBoolean", "resourceName": "BasicTypeSpec", "doc": "head as boolean.", "accessibility": "public", "parameters": [ { - "$id": "573", + "$id": "589", "kind": "path", "name": "id", "serializedName": "id", "type": { - "$id": "574", + "$id": "590", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8332,12 +8460,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.headAsBoolean.id", "methodParameterSegments": [ { - "$id": "575", + "$id": "591", "kind": "method", "name": "id", "serializedName": "id", "type": { - "$id": "576", + "$id": "592", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8376,7 +8504,7 @@ }, "parameters": [ { - "$ref": "575" + "$ref": "591" } ], "response": {}, @@ -8386,7 +8514,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.headAsBoolean" }, { - "$id": "577", + "$id": "593", "kind": "paging", "name": "ListWithNextLink", "accessibility": "public", @@ -8396,14 +8524,14 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "578", + "$id": "594", "name": "ListWithNextLink", "resourceName": "BasicTypeSpec", "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "579", + "$id": "595", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8419,7 +8547,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ListWithNextLink.accept", "methodParameterSegments": [ { - "$id": "580", + "$id": "596", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -8444,7 +8572,7 @@ 200 ], "bodyType": { - "$ref": "251" + "$ref": "267" }, "headers": [], "isErrorResponse": false, @@ -8465,12 +8593,12 @@ }, "parameters": [ { - "$ref": "580" + "$ref": "596" } ], "response": { "type": { - "$ref": "253" + "$ref": "269" }, "resultSegments": [ "things" @@ -8494,7 +8622,7 @@ } }, { - "$id": "581", + "$id": "597", "kind": "paging", "name": "ListWithStringNextLink", "accessibility": "public", @@ -8504,14 +8632,14 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "582", + "$id": "598", "name": "ListWithStringNextLink", "resourceName": "BasicTypeSpec", "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "583", + "$id": "599", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8527,7 +8655,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ListWithStringNextLink.accept", "methodParameterSegments": [ { - "$id": "584", + "$id": "600", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -8552,7 +8680,7 @@ 200 ], "bodyType": { - "$ref": "256" + "$ref": "272" }, "headers": [], "isErrorResponse": false, @@ -8573,12 +8701,12 @@ }, "parameters": [ { - "$ref": "584" + "$ref": "600" } ], "response": { "type": { - "$ref": "253" + "$ref": "269" }, "resultSegments": [ "things" @@ -8602,7 +8730,7 @@ } }, { - "$id": "585", + "$id": "601", "kind": "paging", "name": "ListWithHeaderNextLink", "accessibility": "public", @@ -8612,14 +8740,14 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "586", + "$id": "602", "name": "ListWithHeaderNextLink", "resourceName": "BasicTypeSpec", "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "587", + "$id": "603", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8635,7 +8763,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ListWithHeaderNextLink.accept", "methodParameterSegments": [ { - "$id": "588", + "$id": "604", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -8660,14 +8788,14 @@ 200 ], "bodyType": { - "$ref": "260" + "$ref": "276" }, "headers": [ { "name": "next", "nameInResponse": "next", "type": { - "$id": "589", + "$id": "605", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8693,12 +8821,12 @@ }, "parameters": [ { - "$ref": "588" + "$ref": "604" } ], "response": { "type": { - "$ref": "253" + "$ref": "269" }, "resultSegments": [ "things" @@ -8722,7 +8850,7 @@ } }, { - "$id": "590", + "$id": "606", "kind": "paging", "name": "ListWithHeaderNextLinkWithMaxPage", "accessibility": "public", @@ -8732,19 +8860,19 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "591", + "$id": "607", "name": "ListWithHeaderNextLinkWithMaxPage", "resourceName": "BasicTypeSpec", "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "592", + "$id": "608", "kind": "query", "name": "numElements", "serializedName": "numElements", "type": { - "$id": "593", + "$id": "609", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -8759,12 +8887,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "594", + "$id": "610", "kind": "method", "name": "numElements", "serializedName": "numElements", "type": { - "$id": "595", + "$id": "611", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -8782,7 +8910,7 @@ ] }, { - "$id": "596", + "$id": "612", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8798,7 +8926,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ListWithHeaderNextLinkWithMaxPage.accept", "methodParameterSegments": [ { - "$id": "597", + "$id": "613", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -8823,14 +8951,14 @@ 200 ], "bodyType": { - "$ref": "262" + "$ref": "278" }, "headers": [ { "name": "next", "nameInResponse": "next", "type": { - "$id": "598", + "$id": "614", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8856,15 +8984,15 @@ }, "parameters": [ { - "$ref": "594" + "$ref": "610" }, { - "$ref": "597" + "$ref": "613" } ], "response": { "type": { - "$ref": "253" + "$ref": "269" }, "resultSegments": [ "things" @@ -8890,7 +9018,7 @@ } }, { - "$id": "599", + "$id": "615", "kind": "paging", "name": "ListWithContinuationToken", "accessibility": "public", @@ -8900,19 +9028,19 @@ ], "doc": "List things with continuation token", "operation": { - "$id": "600", + "$id": "616", "name": "ListWithContinuationToken", "resourceName": "BasicTypeSpec", "doc": "List things with continuation token", "accessibility": "public", "parameters": [ { - "$id": "601", + "$id": "617", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "602", + "$id": "618", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8927,12 +9055,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "603", + "$id": "619", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "604", + "$id": "620", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8950,7 +9078,7 @@ ] }, { - "$id": "605", + "$id": "621", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8966,7 +9094,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ListWithContinuationToken.accept", "methodParameterSegments": [ { - "$id": "606", + "$id": "622", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -8991,7 +9119,7 @@ 200 ], "bodyType": { - "$ref": "264" + "$ref": "280" }, "headers": [], "isErrorResponse": false, @@ -9012,15 +9140,15 @@ }, "parameters": [ { - "$ref": "603" + "$ref": "619" }, { - "$ref": "606" + "$ref": "622" } ], "response": { "type": { - "$ref": "253" + "$ref": "269" }, "resultSegments": [ "things" @@ -9036,7 +9164,7 @@ ], "continuationToken": { "parameter": { - "$ref": "601" + "$ref": "617" }, "responseSegments": [ "nextToken" @@ -9047,7 +9175,7 @@ } }, { - "$id": "607", + "$id": "623", "kind": "paging", "name": "ListWithContinuationTokenWithMaxPage", "accessibility": "public", @@ -9057,19 +9185,19 @@ ], "doc": "List things with continuation token", "operation": { - "$id": "608", + "$id": "624", "name": "ListWithContinuationTokenWithMaxPage", "resourceName": "BasicTypeSpec", "doc": "List things with continuation token", "accessibility": "public", "parameters": [ { - "$id": "609", + "$id": "625", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "610", + "$id": "626", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9084,12 +9212,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "611", + "$id": "627", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "612", + "$id": "628", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9107,12 +9235,12 @@ ] }, { - "$id": "613", + "$id": "629", "kind": "query", "name": "numElements", "serializedName": "numElements", "type": { - "$id": "614", + "$id": "630", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -9127,12 +9255,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "615", + "$id": "631", "kind": "method", "name": "numElements", "serializedName": "numElements", "type": { - "$id": "616", + "$id": "632", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -9150,7 +9278,7 @@ ] }, { - "$id": "617", + "$id": "633", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9166,7 +9294,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ListWithContinuationTokenWithMaxPage.accept", "methodParameterSegments": [ { - "$id": "618", + "$id": "634", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9191,7 +9319,7 @@ 200 ], "bodyType": { - "$ref": "268" + "$ref": "284" }, "headers": [], "isErrorResponse": false, @@ -9212,18 +9340,18 @@ }, "parameters": [ { - "$ref": "611" + "$ref": "627" }, { - "$ref": "615" + "$ref": "631" }, { - "$ref": "618" + "$ref": "634" } ], "response": { "type": { - "$ref": "253" + "$ref": "269" }, "resultSegments": [ "things" @@ -9239,7 +9367,7 @@ ], "continuationToken": { "parameter": { - "$ref": "609" + "$ref": "625" }, "responseSegments": [ "nextToken" @@ -9252,7 +9380,7 @@ } }, { - "$id": "619", + "$id": "635", "kind": "paging", "name": "ListWithContinuationTokenHeaderResponse", "accessibility": "public", @@ -9262,19 +9390,19 @@ ], "doc": "List things with continuation token header response", "operation": { - "$id": "620", + "$id": "636", "name": "ListWithContinuationTokenHeaderResponse", "resourceName": "BasicTypeSpec", "doc": "List things with continuation token header response", "accessibility": "public", "parameters": [ { - "$id": "621", + "$id": "637", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "622", + "$id": "638", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9289,12 +9417,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "623", + "$id": "639", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "624", + "$id": "640", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9312,7 +9440,7 @@ ] }, { - "$id": "625", + "$id": "641", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9328,7 +9456,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ListWithContinuationTokenHeaderResponse.accept", "methodParameterSegments": [ { - "$id": "626", + "$id": "642", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9353,14 +9481,14 @@ 200 ], "bodyType": { - "$ref": "272" + "$ref": "288" }, "headers": [ { "name": "nextToken", "nameInResponse": "next-token", "type": { - "$id": "627", + "$id": "643", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9386,15 +9514,15 @@ }, "parameters": [ { - "$ref": "623" + "$ref": "639" }, { - "$ref": "626" + "$ref": "642" } ], "response": { "type": { - "$ref": "253" + "$ref": "269" }, "resultSegments": [ "things" @@ -9410,7 +9538,7 @@ ], "continuationToken": { "parameter": { - "$ref": "621" + "$ref": "637" }, "responseSegments": [ "next-token" @@ -9421,7 +9549,7 @@ } }, { - "$id": "628", + "$id": "644", "kind": "paging", "name": "ListWithPaging", "accessibility": "public", @@ -9431,14 +9559,14 @@ ], "doc": "List things with paging", "operation": { - "$id": "629", + "$id": "645", "name": "ListWithPaging", "resourceName": "BasicTypeSpec", "doc": "List things with paging", "accessibility": "public", "parameters": [ { - "$id": "630", + "$id": "646", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9454,7 +9582,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ListWithPaging.accept", "methodParameterSegments": [ { - "$id": "631", + "$id": "647", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9479,7 +9607,7 @@ 200 ], "bodyType": { - "$ref": "274" + "$ref": "290" }, "headers": [], "isErrorResponse": false, @@ -9500,12 +9628,12 @@ }, "parameters": [ { - "$ref": "631" + "$ref": "647" } ], "response": { "type": { - "$ref": "253" + "$ref": "269" }, "resultSegments": [ "items" @@ -9523,7 +9651,7 @@ } }, { - "$id": "632", + "$id": "648", "kind": "basic", "name": "ConditionalRequest", "accessibility": "public", @@ -9533,19 +9661,19 @@ ], "doc": "A sample operation with conditional requests", "operation": { - "$id": "633", + "$id": "649", "name": "ConditionalRequest", "resourceName": "BasicTypeSpec", "doc": "A sample operation with conditional requests", "accessibility": "public", "parameters": [ { - "$id": "634", + "$id": "650", "kind": "header", "name": "ifMatch", "serializedName": "If-Match", "type": { - "$id": "635", + "$id": "651", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9560,12 +9688,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ConditionalRequest.ifMatch", "methodParameterSegments": [ { - "$id": "636", + "$id": "652", "kind": "method", "name": "ifMatch", "serializedName": "If-Match", "type": { - "$id": "637", + "$id": "653", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9583,12 +9711,12 @@ ] }, { - "$id": "638", + "$id": "654", "kind": "header", "name": "ifNoneMatch", "serializedName": "If-None-Match", "type": { - "$id": "639", + "$id": "655", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9603,12 +9731,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ConditionalRequest.ifNoneMatch", "methodParameterSegments": [ { - "$id": "640", + "$id": "656", "kind": "method", "name": "ifNoneMatch", "serializedName": "If-None-Match", "type": { - "$id": "641", + "$id": "657", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9647,10 +9775,10 @@ }, "parameters": [ { - "$ref": "636" + "$ref": "652" }, { - "$ref": "640" + "$ref": "656" } ], "response": {}, @@ -9660,7 +9788,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ConditionalRequest" }, { - "$id": "642", + "$id": "658", "kind": "basic", "name": "ConditionalRequestDate", "accessibility": "public", @@ -9670,19 +9798,19 @@ ], "doc": "A sample operation with conditional requests", "operation": { - "$id": "643", + "$id": "659", "name": "ConditionalRequestDate", "resourceName": "BasicTypeSpec", "doc": "A sample operation with conditional requests", "accessibility": "public", "parameters": [ { - "$id": "644", + "$id": "660", "kind": "header", "name": "ifMatch", "serializedName": "If-Match", "type": { - "$id": "645", + "$id": "661", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9697,12 +9825,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ConditionalRequestDate.ifMatch", "methodParameterSegments": [ { - "$id": "646", + "$id": "662", "kind": "method", "name": "ifMatch", "serializedName": "If-Match", "type": { - "$id": "647", + "$id": "663", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9720,12 +9848,12 @@ ] }, { - "$id": "648", + "$id": "664", "kind": "header", "name": "ifNoneMatch", "serializedName": "If-None-Match", "type": { - "$id": "649", + "$id": "665", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9740,12 +9868,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ConditionalRequestDate.ifNoneMatch", "methodParameterSegments": [ { - "$id": "650", + "$id": "666", "kind": "method", "name": "ifNoneMatch", "serializedName": "If-None-Match", "type": { - "$id": "651", + "$id": "667", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9763,12 +9891,12 @@ ] }, { - "$id": "652", + "$id": "668", "kind": "header", "name": "ifModifiedSince", "serializedName": "If-Modified-Since", "type": { - "$id": "653", + "$id": "669", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9783,12 +9911,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ConditionalRequestDate.ifModifiedSince", "methodParameterSegments": [ { - "$id": "654", + "$id": "670", "kind": "method", "name": "ifModifiedSince", "serializedName": "If-Modified-Since", "type": { - "$id": "655", + "$id": "671", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9827,13 +9955,13 @@ }, "parameters": [ { - "$ref": "646" + "$ref": "662" }, { - "$ref": "650" + "$ref": "666" }, { - "$ref": "654" + "$ref": "670" } ], "response": {}, @@ -9843,7 +9971,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ConditionalRequestDate" }, { - "$id": "656", + "$id": "672", "kind": "basic", "name": "MultipartRequest", "accessibility": "public", @@ -9853,14 +9981,14 @@ ], "doc": "A sample operation with multipart request", "operation": { - "$id": "657", + "$id": "673", "name": "MultipartRequest", "resourceName": "BasicTypeSpec", "doc": "A sample operation with multipart request", "accessibility": "public", "parameters": [ { - "$id": "658", + "$id": "674", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -9876,7 +10004,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.MultipartRequest.contentType", "methodParameterSegments": [ { - "$id": "659", + "$id": "675", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -9895,12 +10023,12 @@ ] }, { - "$id": "660", + "$id": "676", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "276" + "$ref": "292" }, "isApiVersion": false, "contentTypes": [ @@ -9914,12 +10042,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.MultipartRequest.body", "methodParameterSegments": [ { - "$id": "661", + "$id": "677", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "276" + "$ref": "292" }, "location": "Body", "isApiVersion": false, @@ -9957,10 +10085,10 @@ }, "parameters": [ { - "$ref": "659" + "$ref": "675" }, { - "$ref": "661" + "$ref": "677" } ], "response": {}, @@ -9970,7 +10098,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.MultipartRequest" }, { - "$id": "662", + "$id": "678", "kind": "basic", "name": "CreateDataFactoryModel", "accessibility": "public", @@ -9980,14 +10108,14 @@ ], "doc": "Create a model with DataFactoryElement properties", "operation": { - "$id": "663", + "$id": "679", "name": "CreateDataFactoryModel", "resourceName": "BasicTypeSpec", "doc": "Create a model with DataFactoryElement properties", "accessibility": "public", "parameters": [ { - "$id": "664", + "$id": "680", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -10004,7 +10132,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.CreateDataFactoryModel.contentType", "methodParameterSegments": [ { - "$id": "665", + "$id": "681", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -10024,7 +10152,7 @@ ] }, { - "$id": "666", + "$id": "682", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -10040,7 +10168,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.CreateDataFactoryModel.accept", "methodParameterSegments": [ { - "$id": "667", + "$id": "683", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -10059,12 +10187,12 @@ ] }, { - "$id": "668", + "$id": "684", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "279" + "$ref": "295" }, "isApiVersion": false, "contentTypes": [ @@ -10078,12 +10206,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.CreateDataFactoryModel.body", "methodParameterSegments": [ { - "$id": "669", + "$id": "685", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "279" + "$ref": "295" }, "location": "Body", "isApiVersion": false, @@ -10103,7 +10231,7 @@ 200 ], "bodyType": { - "$ref": "279" + "$ref": "295" }, "headers": [], "isErrorResponse": false, @@ -10127,18 +10255,18 @@ }, "parameters": [ { - "$ref": "669" + "$ref": "685" }, { - "$ref": "665" + "$ref": "681" }, { - "$ref": "667" + "$ref": "683" } ], "response": { "type": { - "$ref": "279" + "$ref": "295" } }, "isOverride": false, @@ -10147,7 +10275,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.CreateDataFactoryModel" }, { - "$id": "670", + "$id": "686", "kind": "basic", "name": "GetDataFactoryModel", "accessibility": "public", @@ -10157,19 +10285,19 @@ ], "doc": "Get a model with DataFactoryElement properties", "operation": { - "$id": "671", + "$id": "687", "name": "GetDataFactoryModel", "resourceName": "BasicTypeSpec", "doc": "Get a model with DataFactoryElement properties", "accessibility": "public", "parameters": [ { - "$id": "672", + "$id": "688", "kind": "path", "name": "id", "serializedName": "id", "type": { - "$id": "673", + "$id": "689", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10187,12 +10315,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.GetDataFactoryModel.id", "methodParameterSegments": [ { - "$id": "674", + "$id": "690", "kind": "method", "name": "id", "serializedName": "id", "type": { - "$id": "675", + "$id": "691", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10210,7 +10338,7 @@ ] }, { - "$id": "676", + "$id": "692", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -10226,7 +10354,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.GetDataFactoryModel.accept", "methodParameterSegments": [ { - "$id": "677", + "$id": "693", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -10251,7 +10379,7 @@ 200 ], "bodyType": { - "$ref": "279" + "$ref": "295" }, "headers": [], "isErrorResponse": false, @@ -10272,15 +10400,15 @@ }, "parameters": [ { - "$ref": "674" + "$ref": "690" }, { - "$ref": "677" + "$ref": "693" } ], "response": { "type": { - "$ref": "279" + "$ref": "295" } }, "isOverride": false, @@ -10289,7 +10417,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.GetDataFactoryModel" }, { - "$id": "678", + "$id": "694", "kind": "basic", "name": "GetXmlAdvancedModel", "accessibility": "public", @@ -10299,14 +10427,14 @@ ], "doc": "Get an advanced XML model with various property types", "operation": { - "$id": "679", + "$id": "695", "name": "GetXmlAdvancedModel", "resourceName": "BasicTypeSpec", "doc": "Get an advanced XML model with various property types", "accessibility": "public", "parameters": [ { - "$id": "680", + "$id": "696", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -10322,7 +10450,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.GetXmlAdvancedModel.accept", "methodParameterSegments": [ { - "$id": "681", + "$id": "697", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -10347,7 +10475,7 @@ 200 ], "bodyType": { - "$ref": "291" + "$ref": "307" }, "headers": [ { @@ -10376,28 +10504,211 @@ }, "parameters": [ { - "$ref": "681" + "$ref": "697" } ], "response": { "type": { - "$ref": "291" + "$ref": "307" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, "crossLanguageDefinitionId": "BasicTypeSpec.GetXmlAdvancedModel" + }, + { + "$id": "698", + "kind": "basic", + "name": "UpdateXmlAdvancedModel", + "accessibility": "public", + "apiVersions": [ + "2024-07-16-preview", + "2024-08-16-preview" + ], + "doc": "Update an advanced XML model with various property types", + "operation": { + "$id": "699", + "name": "UpdateXmlAdvancedModel", + "resourceName": "BasicTypeSpec", + "doc": "Update an advanced XML model with various property types", + "accessibility": "public", + "parameters": [ + { + "$id": "700", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "167" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "BasicTypeSpec.UpdateXmlAdvancedModel.contentType", + "methodParameterSegments": [ + { + "$id": "701", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "167" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "BasicTypeSpec.UpdateXmlAdvancedModel.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "702", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "171" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "BasicTypeSpec.UpdateXmlAdvancedModel.accept", + "methodParameterSegments": [ + { + "$id": "703", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "171" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "BasicTypeSpec.UpdateXmlAdvancedModel.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "704", + "kind": "body", + "name": "body", + "serializedName": "body", + "type": { + "$ref": "307" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "BasicTypeSpec.UpdateXmlAdvancedModel.body", + "methodParameterSegments": [ + { + "$id": "705", + "kind": "method", + "name": "body", + "serializedName": "body", + "type": { + "$ref": "307" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "BasicTypeSpec.UpdateXmlAdvancedModel.body", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "307" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "173" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "PUT", + "uri": "{basicTypeSpecUrl}", + "path": "/xmlAdvanced", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "BasicTypeSpec.UpdateXmlAdvancedModel", + "decorators": [], + "namespace": "BasicTypeSpec" + }, + "parameters": [ + { + "$ref": "705" + }, + { + "$ref": "701" + }, + { + "$ref": "703" + } + ], + "response": { + "type": { + "$ref": "307" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "BasicTypeSpec.UpdateXmlAdvancedModel" } ], "parameters": [ { - "$id": "682", + "$id": "706", "kind": "endpoint", "name": "basicTypeSpecUrl", "serializedName": "basicTypeSpecUrl", "type": { - "$id": "683", + "$id": "707", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -10421,13 +10732,13 @@ ], "children": [ { - "$id": "684", + "$id": "708", "kind": "client", "name": "PlantOperations", "namespace": "BasicTypeSpec", "methods": [ { - "$id": "685", + "$id": "709", "kind": "basic", "name": "getTree", "accessibility": "public", @@ -10437,19 +10748,19 @@ ], "doc": "Get a tree as a plant", "operation": { - "$id": "686", + "$id": "710", "name": "getTree", "resourceName": "PlantOperations", "doc": "Get a tree as a plant", "accessibility": "public", "parameters": [ { - "$id": "687", + "$id": "711", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "167" + "$ref": "175" }, "isApiVersion": false, "optional": false, @@ -10460,12 +10771,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.PlantOperations.getTree.accept", "methodParameterSegments": [ { - "$id": "688", + "$id": "712", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "167" + "$ref": "175" }, "location": "Header", "isApiVersion": false, @@ -10485,14 +10796,14 @@ 200 ], "bodyType": { - "$ref": "387" + "$ref": "403" }, "headers": [ { "name": "contentType", "nameInResponse": "content-type", "type": { - "$ref": "169" + "$ref": "177" } } ], @@ -10514,28 +10825,211 @@ }, "parameters": [ { - "$ref": "688" + "$ref": "712" } ], "response": { "type": { - "$ref": "387" + "$ref": "403" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, "crossLanguageDefinitionId": "BasicTypeSpec.PlantOperations.getTree" + }, + { + "$id": "713", + "kind": "basic", + "name": "updateTree", + "accessibility": "public", + "apiVersions": [ + "2024-07-16-preview", + "2024-08-16-preview" + ], + "doc": "Update a tree as a plant", + "operation": { + "$id": "714", + "name": "updateTree", + "resourceName": "PlantOperations", + "doc": "Update a tree as a plant", + "accessibility": "public", + "parameters": [ + { + "$id": "715", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "179" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "BasicTypeSpec.PlantOperations.updateTree.contentType", + "methodParameterSegments": [ + { + "$id": "716", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "179" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "BasicTypeSpec.PlantOperations.updateTree.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "717", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "183" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "BasicTypeSpec.PlantOperations.updateTree.accept", + "methodParameterSegments": [ + { + "$id": "718", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "183" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "BasicTypeSpec.PlantOperations.updateTree.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "719", + "kind": "body", + "name": "tree", + "serializedName": "tree", + "type": { + "$ref": "403" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "BasicTypeSpec.PlantOperations.updateTree.tree", + "methodParameterSegments": [ + { + "$id": "720", + "kind": "method", + "name": "tree", + "serializedName": "tree", + "type": { + "$ref": "403" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "BasicTypeSpec.PlantOperations.updateTree.tree", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "403" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "185" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "PUT", + "uri": "{basicTypeSpecUrl}", + "path": "/plants/tree/as-plant", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "BasicTypeSpec.PlantOperations.updateTree", + "decorators": [], + "namespace": "BasicTypeSpec" + }, + "parameters": [ + { + "$ref": "720" + }, + { + "$ref": "716" + }, + { + "$ref": "718" + } + ], + "response": { + "type": { + "$ref": "403" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "BasicTypeSpec.PlantOperations.updateTree" } ], "parameters": [ { - "$id": "689", + "$id": "721", "kind": "endpoint", "name": "basicTypeSpecUrl", "serializedName": "basicTypeSpecUrl", "type": { - "$id": "690", + "$id": "722", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -10558,7 +11052,7 @@ "2024-08-16-preview" ], "parent": { - "$ref": "398" + "$ref": "414" }, "isMultiServiceClient": false } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Payload/Xml/XmlTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Payload/Xml/XmlTests.cs new file mode 100644 index 000000000000..7136c082eb9e --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Payload/Xml/XmlTests.cs @@ -0,0 +1,356 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Threading.Tasks; +using NUnit.Framework; +using Payload.Xml; + +namespace TestProjects.Spector.Tests.Http.Payload.Xml +{ + public class XmlTests : SpectorTestBase + { + [SpectorTest] + public Task GetSimpleModel() => Test(async (host) => + { + var response = await new XmlClient(host, null).GetSimpleModelValueClient().GetAsync(); + + Assert.AreEqual(200, response.GetRawResponse().Status); + + var model = response.Value; + Assert.NotNull(model); + + Assert.AreEqual("foo", model.Name); + Assert.AreEqual(123, model.Age); + }); + + [SpectorTest] + public Task PutSimpleModel() => Test(async (host) => + { + SimpleModel model = new SimpleModel("foo", 123); + var response = await new XmlClient(host, null).GetSimpleModelValueClient() + .PutAsync(model); + + Assert.AreEqual(204, response.Status); + }); + + [SpectorTest] + public Task GetModelWithSimpleArrays() => Test(async (host) => + { + var response = await new XmlClient(host, null).GetModelWithSimpleArraysValueClient().GetAsync(); + + Assert.AreEqual(200, response.GetRawResponse().Status); + + var model = response.Value; + Assert.NotNull(model); + Assert.AreEqual(3, model.Colors.Count); + Assert.AreEqual(model.Colors[0], "red"); + Assert.AreEqual(model.Colors[1], "green"); + Assert.AreEqual(model.Colors[2], "blue"); + + Assert.AreEqual(2, model.Counts.Count); + Assert.AreEqual(model.Counts[0], 1); + Assert.AreEqual(model.Counts[1], 2); + }); + + [SpectorTest] + public Task PutModelWithSimpleArrays() => Test(async (host) => + { + var model = new ModelWithSimpleArrays( + new[] { "red", "green", "blue" }, + new[] { 1, 2 }); + var response = await new XmlClient(host, null).GetModelWithSimpleArraysValueClient() + .PutAsync(model); + + Assert.AreEqual(204, response.Status); + }); + + [SpectorTest] + public Task GetModelWithArrayOfModel() => Test(async (host) => + { + var response = await new XmlClient(host, null).GetModelWithArrayOfModelValueClient().GetAsync(); + + Assert.AreEqual(200, response.GetRawResponse().Status); + + var model = response.Value; + Assert.NotNull(model); + Assert.AreEqual(2, model.Items.Count); + Assert.AreEqual("foo", model.Items[0].Name); + Assert.AreEqual(123, model.Items[0].Age); + Assert.AreEqual("bar", model.Items[1].Name); + Assert.AreEqual(456, model.Items[1].Age); + }); + + [SpectorTest] + public Task PutModelWithArrayOfModel() => Test(async (host) => + { + var model = new ModelWithArrayOfModel(new[] + { + new SimpleModel("foo", 123), + new SimpleModel("bar", 456) + }); + var response = await new XmlClient(host, null).GetModelWithArrayOfModelValueClient() + .PutAsync(model); + + Assert.AreEqual(204, response.Status); + }); + + [SpectorTest] + public Task GetModelWithOptionalField() => Test(async (host) => + { + var response = await new XmlClient(host, null).GetModelWithOptionalFieldValueClient().GetAsync(); + + Assert.AreEqual(200, response.GetRawResponse().Status); + + var model = response.Value; + Assert.NotNull(model); + Assert.AreEqual("widget", model.Item); + }); + + [SpectorTest] + public Task PutModelWithOptionalField() => Test(async (host) => + { + var model = new ModelWithOptionalField("widget"); + var response = await new XmlClient(host, null).GetModelWithOptionalFieldValueClient() + .PutAsync(model); + + Assert.AreEqual(204, response.Status); + }); + + [SpectorTest] + public Task GetModelWithAttributes() => Test(async (host) => + { + var response = await new XmlClient(host, null).GetModelWithAttributesValueClient().GetAsync(); + + Assert.AreEqual(200, response.GetRawResponse().Status); + + var model = response.Value; + Assert.NotNull(model); + Assert.IsTrue(model.Enabled); + Assert.AreEqual(123, model.Id1); + Assert.AreEqual("foo", model.Id2); + }); + + [SpectorTest] + public Task PutModelWithAttributes() => Test(async (host) => + { + var model = new ModelWithAttributes(123, "foo", true); + var response = await new XmlClient(host, null).GetModelWithAttributesValueClient() + .PutAsync(model); + + Assert.AreEqual(204, response.Status); + }); + + [SpectorTest] + public Task GetModelWithUnwrappedArray() => Test(async (host) => + { + var response = await new XmlClient(host, null).GetModelWithUnwrappedArrayValueClient().GetAsync(); + + Assert.AreEqual(200, response.GetRawResponse().Status); + + var model = response.Value; + Assert.NotNull(model); + + var colors = model.Colors; + Assert.NotNull(colors); + Assert.AreEqual(3, colors.Count); + Assert.AreEqual("red", colors[0]); + Assert.AreEqual("green", colors[1]); + Assert.AreEqual("blue", colors[2]); + + var counts = model.Counts; + Assert.NotNull(counts); + Assert.AreEqual(2, counts.Count); + Assert.AreEqual(1, counts[0]); + Assert.AreEqual(2, counts[1]); + }); + + [SpectorTest] + public Task PutModelWithUnwrappedArray() => Test(async (host) => + { + var model = new ModelWithUnwrappedArray( + new[] { "red", "green", "blue" }, + new[] { 1, 2 }); + var response = await new XmlClient(host, null).GetModelWithUnwrappedArrayValueClient() + .PutAsync(model); + + Assert.AreEqual(204, response.Status); + }); + + [SpectorTest] + public Task GetModelWithRenamedArrays() => Test(async (host) => + { + var response = await new XmlClient(host, null).GetModelWithRenamedArraysValueClient().GetAsync(); + + Assert.AreEqual(200, response.GetRawResponse().Status); + + var model = response.Value; + Assert.NotNull(model); + Assert.AreEqual(3, model.Colors.Count); + Assert.AreEqual(model.Colors[0], "red"); + Assert.AreEqual(model.Colors[1], "green"); + Assert.AreEqual(model.Colors[2], "blue"); + Assert.AreEqual(2, model.Counts.Count); + Assert.AreEqual(model.Counts[0], 1); + Assert.AreEqual(model.Counts[1], 2); + }); + + [SpectorTest] + public Task PutModelWithRenamedArrays() => Test(async (host) => + { + var model = new ModelWithRenamedArrays( + new[] { "red", "green", "blue" }, + new[] { 1, 2 }); + var response = await new XmlClient(host, null).GetModelWithRenamedArraysValueClient() + .PutAsync(model); + + Assert.AreEqual(204, response.Status); + }); + + [SpectorTest] + public Task GetModelWithRenamedFields() => Test(async (host) => + { + var response = await new XmlClient(host, null).GetModelWithRenamedFieldsValueClient().GetAsync(); + + Assert.AreEqual(200, response.GetRawResponse().Status); + + var model = response.Value; + Assert.NotNull(model); + var inputData = model.InputData; + Assert.NotNull(inputData); + Assert.AreEqual("foo", inputData.Name); + Assert.AreEqual(123, inputData.Age); + + var outputData = model.OutputData; + Assert.NotNull(outputData); + Assert.AreEqual("bar", outputData.Name); + Assert.AreEqual(456, outputData.Age); + }); + + [SpectorTest] + public Task PutModelWithRenamedFields() => Test(async (host) => + { + var model = new ModelWithRenamedFields( + new SimpleModel("foo", 123), + new SimpleModel("bar", 456)); + var response = await new XmlClient(host, null).GetModelWithRenamedFieldsValueClient() + .PutAsync(model); + + Assert.AreEqual(204, response.Status); + }); + + [SpectorTest] + public Task GetModelWithEmptyArray() => Test(async (host) => + { + var response = await new XmlClient(host, null).GetModelWithEmptyArrayValueClient().GetAsync(); + + Assert.AreEqual(200, response.GetRawResponse().Status); + + var model = response.Value; + Assert.NotNull(model); + Assert.NotNull(model.Items); + Assert.AreEqual(0, model.Items.Count); + }); + + [SpectorTest] + public Task PutModelWithEmptyArray() => Test(async (host) => + { + var model = new ModelWithEmptyArray(new List()); + var response = await new XmlClient(host, null).GetModelWithEmptyArrayValueClient() + .PutAsync(model); + + Assert.AreEqual(204, response.Status); + }); + + [SpectorTest] + public Task GetModelWithText() => Test(async (host) => + { + var response = await new XmlClient(host, null).GetModelWithTextValueClient().GetAsync(); + + Assert.AreEqual(200, response.GetRawResponse().Status); + + var model = response.Value; + Assert.NotNull(model); + Assert.AreEqual("foo", model.Language); + Assert.IsTrue(model.Content.Contains("This is some text.")); + }); + + [SpectorTest] + public Task PutModelWithText() => Test(async (host) => + { + var model = new ModelWithText("foo", "\n This is some text.\n"); + var response = await new XmlClient(host, null).GetModelWithTextValueClient() + .PutAsync(model); + + Assert.AreEqual(204, response.Status); + }); + + [SpectorTest] + public Task GetModelWithDictionary() => Test(async (host) => + { + var response = await new XmlClient(host, null).GetModelWithDictionaryValueClient().GetAsync(); + + Assert.AreEqual(200, response.GetRawResponse().Status); + + var model = response.Value; + Assert.NotNull(model); + + var metadata = model.Metadata; + Assert.NotNull(metadata); + Assert.AreEqual(3, metadata.Count); + Assert.AreEqual("blue", metadata["Color"]); + Assert.AreEqual("123", metadata["Count"]); + Assert.AreEqual("false", metadata["Enabled"]); + }); + + [SpectorTest] + public Task PutModelWithDictionary() => Test(async (host) => + { + var model = new ModelWithDictionary(new Dictionary + { + { "Color", "blue" }, + { "Count", "123" }, + { "Enabled", "false" } + }); + var response = await new XmlClient(host, null).GetModelWithDictionaryValueClient() + .PutAsync(model); + + Assert.AreEqual(204, response.Status); + }); + + [SpectorTest] + public Task GetModelWithEncodedNames() => Test(async (host) => + { + var response = await new XmlClient(host, null).GetModelWithEncodedNamesValueClient().GetAsync(); + + Assert.AreEqual(200, response.GetRawResponse().Status); + + var model = response.Value; + Assert.NotNull(model); + + var modelData = model.ModelData; + Assert.NotNull(modelData); + Assert.AreEqual("foo", modelData.Name); + Assert.AreEqual(123, modelData.Age); + + var colors = model.Colors; + Assert.NotNull(colors); + Assert.AreEqual(3, colors.Count); + Assert.AreEqual("red", colors[0]); + Assert.AreEqual("green", colors[1]); + Assert.AreEqual("blue", colors[2]); + }); + + [SpectorTest] + public Task PutModelWithEncodedNames() => Test(async (host) => + { + var model = new ModelWithEncodedNames( + new SimpleModel("foo", 123), + new[] { "red", "green", "blue" }); + var response = await new XmlClient(host, null).GetModelWithEncodedNamesValueClient() + .PutAsync(model); + + Assert.AreEqual(204, response.Status); + }); + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj index ce5e16352c4d..26640ff708e7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj @@ -71,6 +71,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/Configuration.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/Configuration.json new file mode 100644 index 000000000000..1a414c766b4e --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/Configuration.json @@ -0,0 +1,10 @@ +{ + "package-name": "Payload.Xml", + "license": { + "name": "MIT License", + "company": "Microsoft Corporation", + "link": "https://mit-license.org", + "header": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.", + "description": "Copyright (c) Microsoft Corporation\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the “Software”), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE." + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/Payload.Xml.sln b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/Payload.Xml.sln new file mode 100644 index 000000000000..ffe5c722514c --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/Payload.Xml.sln @@ -0,0 +1,48 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Payload.Xml", "src\Payload.Xml.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/metadata.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/metadata.json new file mode 100644 index 000000000000..a16ea4ccb9ff --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/metadata.json @@ -0,0 +1,3 @@ +{ + "apiVersion": "not-specified" +} \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithArrayOfModelValue.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithArrayOfModelValue.cs new file mode 100644 index 000000000000..92840d757f01 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithArrayOfModelValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class ModelWithArrayOfModelValue + { + protected ModelWithArrayOfModelValue() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response Get(RequestContext context) => throw null; + + public virtual Task GetAsync(RequestContext context) => throw null; + + public virtual Response Get(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual Response Put(RequestContent content, RequestContext context = null) => throw null; + + public virtual Task PutAsync(RequestContent content, RequestContext context = null) => throw null; + + public virtual Response Put(ModelWithArrayOfModel input, CancellationToken cancellationToken = default) => throw null; + + public virtual Task PutAsync(ModelWithArrayOfModel input, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithAttributesValue.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithAttributesValue.cs new file mode 100644 index 000000000000..df84cbabd876 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithAttributesValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class ModelWithAttributesValue + { + protected ModelWithAttributesValue() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response Get(RequestContext context) => throw null; + + public virtual Task GetAsync(RequestContext context) => throw null; + + public virtual Response Get(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual Response Put(RequestContent content, RequestContext context = null) => throw null; + + public virtual Task PutAsync(RequestContent content, RequestContext context = null) => throw null; + + public virtual Response Put(ModelWithAttributes input, CancellationToken cancellationToken = default) => throw null; + + public virtual Task PutAsync(ModelWithAttributes input, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithDictionaryValue.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithDictionaryValue.cs new file mode 100644 index 000000000000..c794a6d68da0 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithDictionaryValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class ModelWithDictionaryValue + { + protected ModelWithDictionaryValue() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response Get(RequestContext context) => throw null; + + public virtual Task GetAsync(RequestContext context) => throw null; + + public virtual Response Get(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual Response Put(RequestContent content, RequestContext context = null) => throw null; + + public virtual Task PutAsync(RequestContent content, RequestContext context = null) => throw null; + + public virtual Response Put(ModelWithDictionary input, CancellationToken cancellationToken = default) => throw null; + + public virtual Task PutAsync(ModelWithDictionary input, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEmptyArrayValue.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEmptyArrayValue.cs new file mode 100644 index 000000000000..dda515d75ef4 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEmptyArrayValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class ModelWithEmptyArrayValue + { + protected ModelWithEmptyArrayValue() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response Get(RequestContext context) => throw null; + + public virtual Task GetAsync(RequestContext context) => throw null; + + public virtual Response Get(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual Response Put(RequestContent content, RequestContext context = null) => throw null; + + public virtual Task PutAsync(RequestContent content, RequestContext context = null) => throw null; + + public virtual Response Put(ModelWithEmptyArray input, CancellationToken cancellationToken = default) => throw null; + + public virtual Task PutAsync(ModelWithEmptyArray input, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEncodedNamesValue.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEncodedNamesValue.cs new file mode 100644 index 000000000000..a12d3fccbac3 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithEncodedNamesValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class ModelWithEncodedNamesValue + { + protected ModelWithEncodedNamesValue() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response Get(RequestContext context) => throw null; + + public virtual Task GetAsync(RequestContext context) => throw null; + + public virtual Response Get(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual Response Put(RequestContent content, RequestContext context = null) => throw null; + + public virtual Task PutAsync(RequestContent content, RequestContext context = null) => throw null; + + public virtual Response Put(ModelWithEncodedNames input, CancellationToken cancellationToken = default) => throw null; + + public virtual Task PutAsync(ModelWithEncodedNames input, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithOptionalFieldValue.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithOptionalFieldValue.cs new file mode 100644 index 000000000000..fc8337568a16 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithOptionalFieldValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class ModelWithOptionalFieldValue + { + protected ModelWithOptionalFieldValue() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response Get(RequestContext context) => throw null; + + public virtual Task GetAsync(RequestContext context) => throw null; + + public virtual Response Get(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual Response Put(RequestContent content, RequestContext context = null) => throw null; + + public virtual Task PutAsync(RequestContent content, RequestContext context = null) => throw null; + + public virtual Response Put(ModelWithOptionalField input, CancellationToken cancellationToken = default) => throw null; + + public virtual Task PutAsync(ModelWithOptionalField input, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedArraysValue.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedArraysValue.cs new file mode 100644 index 000000000000..41d310b6d83d --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedArraysValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class ModelWithRenamedArraysValue + { + protected ModelWithRenamedArraysValue() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response Get(RequestContext context) => throw null; + + public virtual Task GetAsync(RequestContext context) => throw null; + + public virtual Response Get(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual Response Put(RequestContent content, RequestContext context = null) => throw null; + + public virtual Task PutAsync(RequestContent content, RequestContext context = null) => throw null; + + public virtual Response Put(ModelWithRenamedArrays input, CancellationToken cancellationToken = default) => throw null; + + public virtual Task PutAsync(ModelWithRenamedArrays input, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedFieldsValue.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedFieldsValue.cs new file mode 100644 index 000000000000..275535c7f124 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithRenamedFieldsValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class ModelWithRenamedFieldsValue + { + protected ModelWithRenamedFieldsValue() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response Get(RequestContext context) => throw null; + + public virtual Task GetAsync(RequestContext context) => throw null; + + public virtual Response Get(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual Response Put(RequestContent content, RequestContext context = null) => throw null; + + public virtual Task PutAsync(RequestContent content, RequestContext context = null) => throw null; + + public virtual Response Put(ModelWithRenamedFields input, CancellationToken cancellationToken = default) => throw null; + + public virtual Task PutAsync(ModelWithRenamedFields input, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithSimpleArraysValue.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithSimpleArraysValue.cs new file mode 100644 index 000000000000..13dc9b0e7fb0 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithSimpleArraysValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class ModelWithSimpleArraysValue + { + protected ModelWithSimpleArraysValue() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response Get(RequestContext context) => throw null; + + public virtual Task GetAsync(RequestContext context) => throw null; + + public virtual Response Get(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual Response Put(RequestContent content, RequestContext context = null) => throw null; + + public virtual Task PutAsync(RequestContent content, RequestContext context = null) => throw null; + + public virtual Response Put(ModelWithSimpleArrays input, CancellationToken cancellationToken = default) => throw null; + + public virtual Task PutAsync(ModelWithSimpleArrays input, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithTextValue.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithTextValue.cs new file mode 100644 index 000000000000..a313286843ba --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithTextValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class ModelWithTextValue + { + protected ModelWithTextValue() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response Get(RequestContext context) => throw null; + + public virtual Task GetAsync(RequestContext context) => throw null; + + public virtual Response Get(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual Response Put(RequestContent content, RequestContext context = null) => throw null; + + public virtual Task PutAsync(RequestContent content, RequestContext context = null) => throw null; + + public virtual Response Put(ModelWithText input, CancellationToken cancellationToken = default) => throw null; + + public virtual Task PutAsync(ModelWithText input, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithUnwrappedArrayValue.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithUnwrappedArrayValue.cs new file mode 100644 index 000000000000..2d1f9a0beee1 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/ModelWithUnwrappedArrayValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class ModelWithUnwrappedArrayValue + { + protected ModelWithUnwrappedArrayValue() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response Get(RequestContext context) => throw null; + + public virtual Task GetAsync(RequestContext context) => throw null; + + public virtual Response Get(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual Response Put(RequestContent content, RequestContext context = null) => throw null; + + public virtual Task PutAsync(RequestContent content, RequestContext context = null) => throw null; + + public virtual Response Put(ModelWithUnwrappedArray input, CancellationToken cancellationToken = default) => throw null; + + public virtual Task PutAsync(ModelWithUnwrappedArray input, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithArrayOfModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithArrayOfModel.Serialization.cs new file mode 100644 index 000000000000..75f8d9373dac --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithArrayOfModel.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Xml; +using Azure; +using Azure.Core; + +namespace Payload.Xml +{ + public partial class ModelWithArrayOfModel : IPersistableModel, IXmlSerializable + { + internal ModelWithArrayOfModel() => throw null; + + protected virtual ModelWithArrayOfModel PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ModelWithArrayOfModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(ModelWithArrayOfModel modelWithArrayOfModel) => throw null; + + public static explicit operator ModelWithArrayOfModel(Response response) => throw null; + + protected virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) => throw null; + + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithArrayOfModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithArrayOfModel.cs new file mode 100644 index 000000000000..3d45bb681428 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithArrayOfModel.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Payload.Xml +{ + public partial class ModelWithArrayOfModel + { + public ModelWithArrayOfModel(IEnumerable items) => throw null; + + public IList Items => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithAttributes.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithAttributes.Serialization.cs new file mode 100644 index 000000000000..15f501965fd3 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithAttributes.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Xml; +using Azure; +using Azure.Core; + +namespace Payload.Xml +{ + public partial class ModelWithAttributes : IPersistableModel, IXmlSerializable + { + internal ModelWithAttributes() => throw null; + + protected virtual ModelWithAttributes PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ModelWithAttributes IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(ModelWithAttributes modelWithAttributes) => throw null; + + public static explicit operator ModelWithAttributes(Response response) => throw null; + + protected virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) => throw null; + + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithAttributes.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithAttributes.cs new file mode 100644 index 000000000000..cc4e08f1a223 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithAttributes.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Payload.Xml +{ + public partial class ModelWithAttributes + { + public ModelWithAttributes(int id1, string id2, bool enabled) => throw null; + + public int Id1 + { + get => throw null; + set => throw null; + } + + public string Id2 + { + get => throw null; + set => throw null; + } + + public bool Enabled + { + get => throw null; + set => throw null; + } + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithDictionary.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithDictionary.Serialization.cs new file mode 100644 index 000000000000..2d71198d502b --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithDictionary.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Xml; +using Azure; +using Azure.Core; + +namespace Payload.Xml +{ + public partial class ModelWithDictionary : IPersistableModel, IXmlSerializable + { + internal ModelWithDictionary() => throw null; + + protected virtual ModelWithDictionary PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ModelWithDictionary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(ModelWithDictionary modelWithDictionary) => throw null; + + public static explicit operator ModelWithDictionary(Response response) => throw null; + + protected virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) => throw null; + + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithDictionary.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithDictionary.cs new file mode 100644 index 000000000000..8873a7b826b3 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithDictionary.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Payload.Xml +{ + public partial class ModelWithDictionary + { + public ModelWithDictionary(IDictionary metadata) => throw null; + + public IDictionary Metadata => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithEmptyArray.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithEmptyArray.Serialization.cs new file mode 100644 index 000000000000..f0baf2812bc1 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithEmptyArray.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Xml; +using Azure; +using Azure.Core; + +namespace Payload.Xml +{ + public partial class ModelWithEmptyArray : IPersistableModel, IXmlSerializable + { + internal ModelWithEmptyArray() => throw null; + + protected virtual ModelWithEmptyArray PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ModelWithEmptyArray IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(ModelWithEmptyArray modelWithEmptyArray) => throw null; + + public static explicit operator ModelWithEmptyArray(Response response) => throw null; + + protected virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) => throw null; + + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithEmptyArray.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithEmptyArray.cs new file mode 100644 index 000000000000..f01466c74fe3 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithEmptyArray.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Payload.Xml +{ + public partial class ModelWithEmptyArray + { + public ModelWithEmptyArray(IEnumerable items) => throw null; + + public IList Items => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithEncodedNames.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithEncodedNames.Serialization.cs new file mode 100644 index 000000000000..efee4bfa0ccf --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithEncodedNames.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Xml; +using Azure; +using Azure.Core; + +namespace Payload.Xml +{ + public partial class ModelWithEncodedNames : IPersistableModel, IXmlSerializable + { + internal ModelWithEncodedNames() => throw null; + + protected virtual ModelWithEncodedNames PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ModelWithEncodedNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(ModelWithEncodedNames modelWithEncodedNames) => throw null; + + public static explicit operator ModelWithEncodedNames(Response response) => throw null; + + protected virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) => throw null; + + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithEncodedNames.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithEncodedNames.cs new file mode 100644 index 000000000000..5a14fbb31471 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithEncodedNames.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Payload.Xml +{ + public partial class ModelWithEncodedNames + { + public ModelWithEncodedNames(SimpleModel modelData, IEnumerable colors) => throw null; + + public SimpleModel ModelData + { + get => throw null; + set => throw null; + } + + public IList Colors => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithOptionalField.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithOptionalField.Serialization.cs new file mode 100644 index 000000000000..5ca4268eaee2 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithOptionalField.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Xml; +using Azure; +using Azure.Core; + +namespace Payload.Xml +{ + public partial class ModelWithOptionalField : IPersistableModel, IXmlSerializable + { + internal ModelWithOptionalField() => throw null; + + protected virtual ModelWithOptionalField PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ModelWithOptionalField IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(ModelWithOptionalField modelWithOptionalField) => throw null; + + public static explicit operator ModelWithOptionalField(Response response) => throw null; + + protected virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) => throw null; + + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithOptionalField.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithOptionalField.cs new file mode 100644 index 000000000000..f8bc90c9e7f1 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithOptionalField.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Payload.Xml +{ + public partial class ModelWithOptionalField + { + public ModelWithOptionalField(string item) => throw null; + + public string Item + { + get => throw null; + set => throw null; + } + + public int? Value + { + get => throw null; + set => throw null; + } + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithRenamedArrays.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithRenamedArrays.Serialization.cs new file mode 100644 index 000000000000..9167bd3c0f86 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithRenamedArrays.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Xml; +using Azure; +using Azure.Core; + +namespace Payload.Xml +{ + public partial class ModelWithRenamedArrays : IPersistableModel, IXmlSerializable + { + internal ModelWithRenamedArrays() => throw null; + + protected virtual ModelWithRenamedArrays PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ModelWithRenamedArrays IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(ModelWithRenamedArrays modelWithRenamedArrays) => throw null; + + public static explicit operator ModelWithRenamedArrays(Response response) => throw null; + + protected virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) => throw null; + + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithRenamedArrays.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithRenamedArrays.cs new file mode 100644 index 000000000000..9d0c821eab00 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithRenamedArrays.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Payload.Xml +{ + public partial class ModelWithRenamedArrays + { + public ModelWithRenamedArrays(IEnumerable colors, IEnumerable counts) => throw null; + + public IList Colors => throw null; + + public IList Counts => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithRenamedFields.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithRenamedFields.Serialization.cs new file mode 100644 index 000000000000..d75b41030f3f --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithRenamedFields.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Xml; +using Azure; +using Azure.Core; + +namespace Payload.Xml +{ + public partial class ModelWithRenamedFields : IPersistableModel, IXmlSerializable + { + internal ModelWithRenamedFields() => throw null; + + protected virtual ModelWithRenamedFields PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ModelWithRenamedFields IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(ModelWithRenamedFields modelWithRenamedFields) => throw null; + + public static explicit operator ModelWithRenamedFields(Response response) => throw null; + + protected virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) => throw null; + + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithRenamedFields.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithRenamedFields.cs new file mode 100644 index 000000000000..9aa89663d656 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithRenamedFields.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Payload.Xml +{ + public partial class ModelWithRenamedFields + { + public ModelWithRenamedFields(SimpleModel inputData, SimpleModel outputData) => throw null; + + public SimpleModel InputData + { + get => throw null; + set => throw null; + } + + public SimpleModel OutputData + { + get => throw null; + set => throw null; + } + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithSimpleArrays.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithSimpleArrays.Serialization.cs new file mode 100644 index 000000000000..f605b5abcd2f --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithSimpleArrays.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Xml; +using Azure; +using Azure.Core; + +namespace Payload.Xml +{ + public partial class ModelWithSimpleArrays : IPersistableModel, IXmlSerializable + { + internal ModelWithSimpleArrays() => throw null; + + protected virtual ModelWithSimpleArrays PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ModelWithSimpleArrays IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(ModelWithSimpleArrays modelWithSimpleArrays) => throw null; + + public static explicit operator ModelWithSimpleArrays(Response response) => throw null; + + protected virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) => throw null; + + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithSimpleArrays.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithSimpleArrays.cs new file mode 100644 index 000000000000..67ca17d5c9f9 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithSimpleArrays.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Payload.Xml +{ + public partial class ModelWithSimpleArrays + { + public ModelWithSimpleArrays(IEnumerable colors, IEnumerable counts) => throw null; + + public IList Colors => throw null; + + public IList Counts => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithText.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithText.Serialization.cs new file mode 100644 index 000000000000..695f7f320ea8 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithText.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Xml; +using Azure; +using Azure.Core; + +namespace Payload.Xml +{ + public partial class ModelWithText : IPersistableModel, IXmlSerializable + { + internal ModelWithText() => throw null; + + protected virtual ModelWithText PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ModelWithText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(ModelWithText modelWithText) => throw null; + + public static explicit operator ModelWithText(Response response) => throw null; + + protected virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) => throw null; + + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithText.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithText.cs new file mode 100644 index 000000000000..8dd7ca7ee775 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithText.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Payload.Xml +{ + public partial class ModelWithText + { + public ModelWithText(string language, string content) => throw null; + + public string Language + { + get => throw null; + set => throw null; + } + + public string Content + { + get => throw null; + set => throw null; + } + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithUnwrappedArray.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithUnwrappedArray.Serialization.cs new file mode 100644 index 000000000000..70529d16662a --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithUnwrappedArray.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Xml; +using Azure; +using Azure.Core; + +namespace Payload.Xml +{ + public partial class ModelWithUnwrappedArray : IPersistableModel, IXmlSerializable + { + internal ModelWithUnwrappedArray() => throw null; + + protected virtual ModelWithUnwrappedArray PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ModelWithUnwrappedArray IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(ModelWithUnwrappedArray modelWithUnwrappedArray) => throw null; + + public static explicit operator ModelWithUnwrappedArray(Response response) => throw null; + + protected virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) => throw null; + + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithUnwrappedArray.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithUnwrappedArray.cs new file mode 100644 index 000000000000..33e75acf9a6c --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/ModelWithUnwrappedArray.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Payload.Xml +{ + public partial class ModelWithUnwrappedArray + { + public ModelWithUnwrappedArray(IEnumerable colors, IEnumerable counts) => throw null; + + public IList Colors => throw null; + + public IList Counts => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/PayloadXmlContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/PayloadXmlContext.cs new file mode 100644 index 000000000000..706ee5a72d1f --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/PayloadXmlContext.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace Payload.Xml +{ + [ModelReaderWriterBuildable(typeof(ModelWithArrayOfModel))] + [ModelReaderWriterBuildable(typeof(ModelWithAttributes))] + [ModelReaderWriterBuildable(typeof(ModelWithDictionary))] + [ModelReaderWriterBuildable(typeof(ModelWithEmptyArray))] + [ModelReaderWriterBuildable(typeof(ModelWithEncodedNames))] + [ModelReaderWriterBuildable(typeof(ModelWithOptionalField))] + [ModelReaderWriterBuildable(typeof(ModelWithRenamedArrays))] + [ModelReaderWriterBuildable(typeof(ModelWithRenamedFields))] + [ModelReaderWriterBuildable(typeof(ModelWithSimpleArrays))] + [ModelReaderWriterBuildable(typeof(ModelWithText))] + [ModelReaderWriterBuildable(typeof(ModelWithUnwrappedArray))] + [ModelReaderWriterBuildable(typeof(SimpleModel))] + public partial class PayloadXmlContext : ModelReaderWriterContext + { + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/SimpleModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/SimpleModel.Serialization.cs new file mode 100644 index 000000000000..60fd4f20afa9 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/SimpleModel.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Xml; +using Azure; +using Azure.Core; + +namespace Payload.Xml +{ + public partial class SimpleModel : IPersistableModel, IXmlSerializable + { + internal SimpleModel() => throw null; + + protected virtual SimpleModel PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + SimpleModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(SimpleModel simpleModel) => throw null; + + public static explicit operator SimpleModel(Response response) => throw null; + + protected virtual void XmlModelWriteCore(XmlWriter writer, ModelReaderWriterOptions options) => throw null; + + void IXmlSerializable.Write(XmlWriter writer, string nameHint) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/SimpleModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/SimpleModel.cs new file mode 100644 index 000000000000..8ea496761dac --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/Models/SimpleModel.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Payload.Xml +{ + public partial class SimpleModel + { + public SimpleModel(string name, int age) => throw null; + + public string Name + { + get => throw null; + set => throw null; + } + + public int Age + { + get => throw null; + set => throw null; + } + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/PayloadXmlClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/PayloadXmlClientBuilderExtensions.cs new file mode 100644 index 000000000000..8cd749d3f9da --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/PayloadXmlClientBuilderExtensions.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Diagnostics.CodeAnalysis; +using Azure.Core.Extensions; +using Payload.Xml; + +namespace Microsoft.Extensions.Azure +{ + public static partial class PayloadXmlClientBuilderExtensions + { + public static IAzureClientBuilder AddXmlClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilder => throw null; + + [RequiresUnreferencedCode("Requires unreferenced code until we opt into EnableConfigurationBindingGenerator.")] + [RequiresDynamicCode("Requires unreferenced code until we opt into EnableConfigurationBindingGenerator.")] + public static IAzureClientBuilder AddXmlClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/PayloadXmlModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/PayloadXmlModelFactory.cs new file mode 100644 index 000000000000..b18f42c5635b --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/PayloadXmlModelFactory.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Payload.Xml +{ + public static partial class PayloadXmlModelFactory + { + public static SimpleModel SimpleModel(string name = default, int age = default) => throw null; + + public static ModelWithSimpleArrays ModelWithSimpleArrays(IEnumerable colors = default, IEnumerable counts = default) => throw null; + + public static ModelWithArrayOfModel ModelWithArrayOfModel(IEnumerable items = default) => throw null; + + public static ModelWithOptionalField ModelWithOptionalField(string item = default, int? value = default) => throw null; + + public static ModelWithAttributes ModelWithAttributes(int id1 = default, string id2 = default, bool enabled = default) => throw null; + + public static ModelWithUnwrappedArray ModelWithUnwrappedArray(IEnumerable colors = default, IEnumerable counts = default) => throw null; + + public static ModelWithRenamedArrays ModelWithRenamedArrays(IEnumerable colors = default, IEnumerable counts = default) => throw null; + + public static ModelWithRenamedFields ModelWithRenamedFields(SimpleModel inputData = default, SimpleModel outputData = default) => throw null; + + public static ModelWithEmptyArray ModelWithEmptyArray(IEnumerable items = default) => throw null; + + public static ModelWithText ModelWithText(string language = default, string content = default) => throw null; + + public static ModelWithDictionary ModelWithDictionary(IDictionary metadata = default) => throw null; + + public static ModelWithEncodedNames ModelWithEncodedNames(SimpleModel modelData = default, IEnumerable colors = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/SimpleModelValue.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/SimpleModelValue.cs new file mode 100644 index 000000000000..85c6024b7171 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/SimpleModelValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class SimpleModelValue + { + protected SimpleModelValue() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response Get(RequestContext context) => throw null; + + public virtual Task GetAsync(RequestContext context) => throw null; + + public virtual Response Get(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual Response Put(RequestContent content, RequestContext context = null) => throw null; + + public virtual Task PutAsync(RequestContent content, RequestContext context = null) => throw null; + + public virtual Response Put(SimpleModel input, CancellationToken cancellationToken = default) => throw null; + + public virtual Task PutAsync(SimpleModel input, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/XmlClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/XmlClient.cs new file mode 100644 index 000000000000..2a323cb0dfae --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/XmlClient.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core.Pipeline; + +namespace Payload.Xml +{ + public partial class XmlClient + { + public XmlClient() : this(new Uri("http://localhost:3000"), new XmlClientOptions()) => throw null; + + public XmlClient(Uri endpoint, XmlClientOptions options) => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual SimpleModelValue GetSimpleModelValueClient() => throw null; + + public virtual ModelWithSimpleArraysValue GetModelWithSimpleArraysValueClient() => throw null; + + public virtual ModelWithArrayOfModelValue GetModelWithArrayOfModelValueClient() => throw null; + + public virtual ModelWithOptionalFieldValue GetModelWithOptionalFieldValueClient() => throw null; + + public virtual ModelWithAttributesValue GetModelWithAttributesValueClient() => throw null; + + public virtual ModelWithUnwrappedArrayValue GetModelWithUnwrappedArrayValueClient() => throw null; + + public virtual ModelWithRenamedArraysValue GetModelWithRenamedArraysValueClient() => throw null; + + public virtual ModelWithRenamedFieldsValue GetModelWithRenamedFieldsValueClient() => throw null; + + public virtual ModelWithEmptyArrayValue GetModelWithEmptyArrayValueClient() => throw null; + + public virtual ModelWithTextValue GetModelWithTextValueClient() => throw null; + + public virtual ModelWithDictionaryValue GetModelWithDictionaryValueClient() => throw null; + + public virtual ModelWithEncodedNamesValue GetModelWithEncodedNamesValueClient() => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/XmlClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/XmlClientOptions.cs new file mode 100644 index 000000000000..f502c1e3e94a --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Generated/XmlClientOptions.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Payload.Xml +{ + public partial class XmlClientOptions : ClientOptions + { + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Payload.Xml.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Payload.Xml.csproj new file mode 100644 index 000000000000..ac1493cabc8c --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Payload.Xml.csproj @@ -0,0 +1,27 @@ + + + This is the Payload.Xml client library for developing .NET applications with rich experience. + SDK Code Generation Payload.Xml + 1.0.0-beta.1 + Payload.Xml + true + + + + + + + + + + + + + + + + + + + + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/tspCodeModel.json new file mode 100644 index 000000000000..5b54d1eba80d --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/tspCodeModel.json @@ -0,0 +1,4918 @@ +{ + "name": "Payload.Xml", + "apiVersions": [], + "enums": [], + "constants": [ + { + "$id": "1", + "kind": "constant", + "name": "getContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "2", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "3", + "kind": "constant", + "name": "GetResponseContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "4", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "5", + "kind": "constant", + "name": "GetResponseContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "6", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "7", + "kind": "constant", + "name": "GetResponseContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "8", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "9", + "kind": "constant", + "name": "getContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "10", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "11", + "kind": "constant", + "name": "GetResponseContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "12", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "13", + "kind": "constant", + "name": "GetResponseContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "14", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "15", + "kind": "constant", + "name": "GetResponseContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "16", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "17", + "kind": "constant", + "name": "getContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "18", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "19", + "kind": "constant", + "name": "GetResponseContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "20", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "21", + "kind": "constant", + "name": "GetResponseContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "22", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "23", + "kind": "constant", + "name": "GetResponseContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "24", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "25", + "kind": "constant", + "name": "getContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "26", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "27", + "kind": "constant", + "name": "GetResponseContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "28", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "29", + "kind": "constant", + "name": "GetResponseContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "30", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "31", + "kind": "constant", + "name": "GetResponseContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "32", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "33", + "kind": "constant", + "name": "getContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "34", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "35", + "kind": "constant", + "name": "GetResponseContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "36", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "37", + "kind": "constant", + "name": "GetResponseContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "38", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "39", + "kind": "constant", + "name": "GetResponseContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "40", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "41", + "kind": "constant", + "name": "getContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "42", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "43", + "kind": "constant", + "name": "GetResponseContentType15", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "44", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "45", + "kind": "constant", + "name": "GetResponseContentType16", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "46", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "47", + "kind": "constant", + "name": "GetResponseContentType17", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "48", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "49", + "kind": "constant", + "name": "getContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "50", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "51", + "kind": "constant", + "name": "GetResponseContentType18", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "52", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "53", + "kind": "constant", + "name": "GetResponseContentType19", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "54", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "55", + "kind": "constant", + "name": "GetResponseContentType20", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "56", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "57", + "kind": "constant", + "name": "getContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "58", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "59", + "kind": "constant", + "name": "GetResponseContentType21", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "60", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "61", + "kind": "constant", + "name": "GetResponseContentType22", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "62", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "63", + "kind": "constant", + "name": "GetResponseContentType23", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "64", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "65", + "kind": "constant", + "name": "getContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "66", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "67", + "kind": "constant", + "name": "GetResponseContentType24", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "68", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "69", + "kind": "constant", + "name": "GetResponseContentType25", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "70", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "71", + "kind": "constant", + "name": "GetResponseContentType26", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "72", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "73", + "kind": "constant", + "name": "getContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "74", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "75", + "kind": "constant", + "name": "GetResponseContentType27", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "76", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "77", + "kind": "constant", + "name": "GetResponseContentType28", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "78", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "79", + "kind": "constant", + "name": "GetResponseContentType29", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "80", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "81", + "kind": "constant", + "name": "getContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "82", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "83", + "kind": "constant", + "name": "GetResponseContentType30", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "84", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "85", + "kind": "constant", + "name": "GetResponseContentType31", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "86", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "87", + "kind": "constant", + "name": "GetResponseContentType32", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "88", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "89", + "kind": "constant", + "name": "getContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "90", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "91", + "kind": "constant", + "name": "GetResponseContentType33", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "92", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "93", + "kind": "constant", + "name": "GetResponseContentType34", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "94", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "95", + "kind": "constant", + "name": "GetResponseContentType35", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "96", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + } + ], + "models": [ + { + "$id": "97", + "kind": "model", + "name": "SimpleModel", + "namespace": "Payload.Xml", + "crossLanguageDefinitionId": "Payload.Xml.SimpleModel", + "usage": "Input,Output,Xml", + "doc": "Contains fields of primitive types.", + "decorators": [], + "serializationOptions": { + "xml": { + "name": "SimpleModel", + "attribute": false, + "unwrapped": false + } + }, + "properties": [ + { + "$id": "98", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.SimpleModel.name", + "serializationOptions": { + "xml": { + "name": "name", + "attribute": false, + "unwrapped": false + } + }, + "isHttpMetadata": false + }, + { + "$id": "100", + "kind": "property", + "name": "age", + "serializedName": "age", + "type": { + "$id": "101", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.SimpleModel.age", + "serializationOptions": { + "xml": { + "name": "age", + "attribute": false, + "unwrapped": false + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "102", + "kind": "model", + "name": "ModelWithSimpleArrays", + "namespace": "Payload.Xml", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArrays", + "usage": "Input,Output,Xml", + "doc": "Contains fields of arrays of primitive types.", + "decorators": [], + "serializationOptions": { + "xml": { + "name": "ModelWithSimpleArrays", + "attribute": false, + "unwrapped": false + } + }, + "properties": [ + { + "$id": "103", + "kind": "property", + "name": "colors", + "serializedName": "colors", + "type": { + "$id": "104", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArrays.colors", + "serializationOptions": { + "xml": { + "name": "colors", + "attribute": false, + "unwrapped": false, + "itemsName": "string" + } + }, + "isHttpMetadata": false + }, + { + "$id": "106", + "kind": "property", + "name": "counts", + "serializedName": "counts", + "type": { + "$id": "107", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "108", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArrays.counts", + "serializationOptions": { + "xml": { + "name": "counts", + "attribute": false, + "unwrapped": false, + "itemsName": "int32" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "109", + "kind": "model", + "name": "ModelWithArrayOfModel", + "namespace": "Payload.Xml", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModel", + "usage": "Input,Output,Xml", + "doc": "Contains an array of models.", + "decorators": [], + "serializationOptions": { + "xml": { + "name": "ModelWithArrayOfModel", + "attribute": false, + "unwrapped": false + } + }, + "properties": [ + { + "$id": "110", + "kind": "property", + "name": "items", + "serializedName": "items", + "type": { + "$id": "111", + "kind": "array", + "name": "ArraySimpleModel", + "valueType": { + "$ref": "97" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModel.items", + "serializationOptions": { + "xml": { + "name": "items", + "attribute": false, + "unwrapped": false, + "itemsName": "SimpleModel" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "112", + "kind": "model", + "name": "ModelWithOptionalField", + "namespace": "Payload.Xml", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalField", + "usage": "Input,Output,Xml", + "doc": "Contains an optional field.", + "decorators": [], + "serializationOptions": { + "xml": { + "name": "ModelWithOptionalField", + "attribute": false, + "unwrapped": false + } + }, + "properties": [ + { + "$id": "113", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$id": "114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalField.item", + "serializationOptions": { + "xml": { + "name": "item", + "attribute": false, + "unwrapped": false + } + }, + "isHttpMetadata": false + }, + { + "$id": "115", + "kind": "property", + "name": "value", + "serializedName": "value", + "type": { + "$id": "116", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalField.value", + "serializationOptions": { + "xml": { + "name": "value", + "attribute": false, + "unwrapped": false + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "117", + "kind": "model", + "name": "ModelWithAttributes", + "namespace": "Payload.Xml", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributes", + "usage": "Input,Output,Xml", + "doc": "Contains fields that are XML attributes.", + "decorators": [], + "serializationOptions": { + "xml": { + "name": "ModelWithAttributes", + "attribute": false, + "unwrapped": false + } + }, + "properties": [ + { + "$id": "118", + "kind": "property", + "name": "id1", + "serializedName": "id1", + "type": { + "$id": "119", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [ + { + "name": "TypeSpec.Xml.@attribute", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributes.id1", + "serializationOptions": { + "xml": { + "name": "id1", + "attribute": true, + "unwrapped": false + } + }, + "isHttpMetadata": false + }, + { + "$id": "120", + "kind": "property", + "name": "id2", + "serializedName": "id2", + "type": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [ + { + "name": "TypeSpec.Xml.@attribute", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributes.id2", + "serializationOptions": { + "xml": { + "name": "id2", + "attribute": true, + "unwrapped": false + } + }, + "isHttpMetadata": false + }, + { + "$id": "122", + "kind": "property", + "name": "enabled", + "serializedName": "enabled", + "type": { + "$id": "123", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributes.enabled", + "serializationOptions": { + "xml": { + "name": "enabled", + "attribute": false, + "unwrapped": false + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "124", + "kind": "model", + "name": "ModelWithUnwrappedArray", + "namespace": "Payload.Xml", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArray", + "usage": "Input,Output,Xml", + "doc": "Contains fields of wrapped and unwrapped arrays of primitive types.", + "decorators": [], + "serializationOptions": { + "xml": { + "name": "ModelWithUnwrappedArray", + "attribute": false, + "unwrapped": false + } + }, + "properties": [ + { + "$id": "125", + "kind": "property", + "name": "colors", + "serializedName": "colors", + "type": { + "$ref": "104" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [ + { + "name": "TypeSpec.Xml.@unwrapped", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArray.colors", + "serializationOptions": { + "xml": { + "name": "colors", + "attribute": false, + "unwrapped": true, + "itemsName": "colors" + } + }, + "isHttpMetadata": false + }, + { + "$id": "126", + "kind": "property", + "name": "counts", + "serializedName": "counts", + "type": { + "$ref": "107" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArray.counts", + "serializationOptions": { + "xml": { + "name": "counts", + "attribute": false, + "unwrapped": false, + "itemsName": "int32" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "127", + "kind": "model", + "name": "ModelWithRenamedArrays", + "namespace": "Payload.Xml", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArrays", + "usage": "Input,Output,Xml", + "doc": "Contains fields of wrapped and unwrapped arrays of primitive types that have different XML representations.", + "decorators": [], + "serializationOptions": { + "xml": { + "name": "ModelWithRenamedArrays", + "attribute": false, + "unwrapped": false + } + }, + "properties": [ + { + "$id": "128", + "kind": "property", + "name": "colors", + "serializedName": "Colors", + "type": { + "$ref": "104" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [ + { + "name": "TypeSpec.Xml.@unwrapped", + "arguments": {} + }, + { + "name": "TypeSpec.Xml.@name", + "arguments": { + "name": "Colors" + } + } + ], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArrays.colors", + "serializationOptions": { + "xml": { + "name": "Colors", + "attribute": false, + "unwrapped": true, + "itemsName": "Colors" + } + }, + "isHttpMetadata": false + }, + { + "$id": "129", + "kind": "property", + "name": "counts", + "serializedName": "Counts", + "type": { + "$ref": "107" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [ + { + "name": "TypeSpec.Xml.@name", + "arguments": { + "name": "Counts" + } + } + ], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArrays.counts", + "serializationOptions": { + "xml": { + "name": "Counts", + "attribute": false, + "unwrapped": false, + "itemsName": "int32" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "130", + "kind": "model", + "name": "ModelWithRenamedFields", + "namespace": "Payload.Xml", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFields", + "usage": "Input,Output,Xml", + "doc": "Contains fields of the same type that have different XML representation.", + "decorators": [ + { + "name": "TypeSpec.Xml.@name", + "arguments": { + "name": "ModelWithRenamedFieldsSrc" + } + } + ], + "serializationOptions": { + "xml": { + "name": "ModelWithRenamedFieldsSrc", + "attribute": false, + "unwrapped": false + } + }, + "properties": [ + { + "$id": "131", + "kind": "property", + "name": "inputData", + "serializedName": "InputData", + "type": { + "$ref": "97" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [ + { + "name": "TypeSpec.Xml.@name", + "arguments": { + "name": "InputData" + } + } + ], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFields.inputData", + "serializationOptions": { + "xml": { + "name": "InputData", + "attribute": false, + "unwrapped": false + } + }, + "isHttpMetadata": false + }, + { + "$id": "132", + "kind": "property", + "name": "outputData", + "serializedName": "OutputData", + "type": { + "$ref": "97" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [ + { + "name": "TypeSpec.Xml.@name", + "arguments": { + "name": "OutputData" + } + } + ], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFields.outputData", + "serializationOptions": { + "xml": { + "name": "OutputData", + "attribute": false, + "unwrapped": false + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "133", + "kind": "model", + "name": "ModelWithEmptyArray", + "namespace": "Payload.Xml", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArray", + "usage": "Input,Output,Xml", + "doc": "Contains an array of models that's supposed to be sent/received as an empty XML element.", + "decorators": [], + "serializationOptions": { + "xml": { + "name": "ModelWithEmptyArray", + "attribute": false, + "unwrapped": false + } + }, + "properties": [ + { + "$id": "134", + "kind": "property", + "name": "items", + "serializedName": "items", + "type": { + "$ref": "111" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArray.items", + "serializationOptions": { + "xml": { + "name": "items", + "attribute": false, + "unwrapped": false, + "itemsName": "SimpleModel" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "135", + "kind": "model", + "name": "ModelWithText", + "namespace": "Payload.Xml", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithText", + "usage": "Input,Output,Xml", + "doc": "Contains an attribute and text.", + "decorators": [], + "serializationOptions": { + "xml": { + "name": "ModelWithText", + "attribute": false, + "unwrapped": false + } + }, + "properties": [ + { + "$id": "136", + "kind": "property", + "name": "language", + "serializedName": "language", + "type": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [ + { + "name": "TypeSpec.Xml.@attribute", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithText.language", + "serializationOptions": { + "xml": { + "name": "language", + "attribute": true, + "unwrapped": false + } + }, + "isHttpMetadata": false + }, + { + "$id": "138", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [ + { + "name": "TypeSpec.Xml.@unwrapped", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithText.content", + "serializationOptions": { + "xml": { + "name": "content", + "attribute": false, + "unwrapped": true + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "140", + "kind": "model", + "name": "ModelWithDictionary", + "namespace": "Payload.Xml", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionary", + "usage": "Input,Output,Xml", + "doc": "Contains a dictionary of key value pairs.", + "decorators": [], + "serializationOptions": { + "xml": { + "name": "ModelWithDictionary", + "attribute": false, + "unwrapped": false + } + }, + "properties": [ + { + "$id": "141", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "type": { + "$id": "142", + "kind": "dict", + "keyType": { + "$id": "143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionary.metadata", + "serializationOptions": { + "xml": { + "name": "metadata", + "attribute": false, + "unwrapped": false + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "145", + "kind": "model", + "name": "ModelWithEncodedNames", + "namespace": "Payload.Xml", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNames", + "usage": "Input,Output,Xml", + "doc": "Uses encodedName instead of Xml.Name which is functionally equivalent.", + "decorators": [], + "serializationOptions": { + "xml": { + "name": "ModelWithEncodedNamesSrc", + "attribute": false, + "unwrapped": false + } + }, + "properties": [ + { + "$id": "146", + "kind": "property", + "name": "modelData", + "serializedName": "SimpleModelData", + "type": { + "$ref": "97" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNames.modelData", + "serializationOptions": { + "xml": { + "name": "SimpleModelData", + "attribute": false, + "unwrapped": false + } + }, + "isHttpMetadata": false + }, + { + "$id": "147", + "kind": "property", + "name": "colors", + "serializedName": "PossibleColors", + "type": { + "$ref": "104" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNames.colors", + "serializationOptions": { + "xml": { + "name": "PossibleColors", + "attribute": false, + "unwrapped": false, + "itemsName": "string" + } + }, + "isHttpMetadata": false + } + ] + } + ], + "clients": [ + { + "$id": "148", + "kind": "client", + "name": "XmlClient", + "namespace": "Payload.Xml", + "doc": "Sends and receives bodies in XML format.", + "methods": [], + "parameters": [ + { + "$id": "149", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "150", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.endpoint" + } + ], + "initializedBy": 1, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml", + "apiVersions": [], + "children": [ + { + "$id": "152", + "kind": "client", + "name": "SimpleModelValue", + "namespace": "Payload.Xml", + "doc": "Operations for the SimpleModel type.", + "methods": [ + { + "$id": "153", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "154", + "name": "get", + "resourceName": "SimpleModelValue", + "accessibility": "public", + "parameters": [ + { + "$id": "155", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "1" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.get.accept", + "methodParameterSegments": [ + { + "$id": "156", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "1" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "97" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "3" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/xml/simpleModel", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.get", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "156" + } + ], + "response": { + "type": { + "$ref": "97" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.get" + }, + { + "$id": "157", + "kind": "basic", + "name": "put", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "158", + "name": "put", + "resourceName": "SimpleModelValue", + "accessibility": "public", + "parameters": [ + { + "$id": "159", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "5" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.put.contentType", + "methodParameterSegments": [ + { + "$id": "160", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "5" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.put.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "161", + "kind": "body", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "97" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.put.input", + "methodParameterSegments": [ + { + "$id": "162", + "kind": "method", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "97" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.put.input", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/payload/xml/simpleModel", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.put", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "160" + }, + { + "$ref": "162" + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.put" + } + ], + "parameters": [ + { + "$id": "163", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "164", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.endpoint" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.SimpleModelValue", + "apiVersions": [], + "parent": { + "$ref": "148" + }, + "isMultiServiceClient": false + }, + { + "$id": "166", + "kind": "client", + "name": "ModelWithSimpleArraysValue", + "namespace": "Payload.Xml", + "doc": "Operations for the ModelWithSimpleArrays type.", + "methods": [ + { + "$id": "167", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "168", + "name": "get", + "resourceName": "ModelWithSimpleArraysValue", + "accessibility": "public", + "parameters": [ + { + "$id": "169", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "9" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.get.accept", + "methodParameterSegments": [ + { + "$id": "170", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "9" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "102" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "11" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithSimpleArrays", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.get", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "170" + } + ], + "response": { + "type": { + "$ref": "102" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.get" + }, + { + "$id": "171", + "kind": "basic", + "name": "put", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "172", + "name": "put", + "resourceName": "ModelWithSimpleArraysValue", + "accessibility": "public", + "parameters": [ + { + "$id": "173", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "13" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.put.contentType", + "methodParameterSegments": [ + { + "$id": "174", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "13" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.put.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "175", + "kind": "body", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "102" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.put.input", + "methodParameterSegments": [ + { + "$id": "176", + "kind": "method", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "102" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.put.input", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithSimpleArrays", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.put", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "174" + }, + { + "$ref": "176" + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.put" + } + ], + "parameters": [ + { + "$id": "177", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "178", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.endpoint" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue", + "apiVersions": [], + "parent": { + "$ref": "148" + }, + "isMultiServiceClient": false + }, + { + "$id": "180", + "kind": "client", + "name": "ModelWithArrayOfModelValue", + "namespace": "Payload.Xml", + "doc": "Operations for the ModelWithArrayOfModel type.", + "methods": [ + { + "$id": "181", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "182", + "name": "get", + "resourceName": "ModelWithArrayOfModelValue", + "accessibility": "public", + "parameters": [ + { + "$id": "183", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "17" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.get.accept", + "methodParameterSegments": [ + { + "$id": "184", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "17" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "109" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "19" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithArrayOfModel", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.get", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "184" + } + ], + "response": { + "type": { + "$ref": "109" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.get" + }, + { + "$id": "185", + "kind": "basic", + "name": "put", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "186", + "name": "put", + "resourceName": "ModelWithArrayOfModelValue", + "accessibility": "public", + "parameters": [ + { + "$id": "187", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "21" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.put.contentType", + "methodParameterSegments": [ + { + "$id": "188", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "21" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.put.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "189", + "kind": "body", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "109" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.put.input", + "methodParameterSegments": [ + { + "$id": "190", + "kind": "method", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "109" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.put.input", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithArrayOfModel", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.put", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "188" + }, + { + "$ref": "190" + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.put" + } + ], + "parameters": [ + { + "$id": "191", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "192", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.endpoint" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue", + "apiVersions": [], + "parent": { + "$ref": "148" + }, + "isMultiServiceClient": false + }, + { + "$id": "194", + "kind": "client", + "name": "ModelWithOptionalFieldValue", + "namespace": "Payload.Xml", + "doc": "Operations for the ModelWithOptionalField type.", + "methods": [ + { + "$id": "195", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "196", + "name": "get", + "resourceName": "ModelWithOptionalFieldValue", + "accessibility": "public", + "parameters": [ + { + "$id": "197", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "25" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.get.accept", + "methodParameterSegments": [ + { + "$id": "198", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "25" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "112" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "27" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithOptionalField", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.get", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "198" + } + ], + "response": { + "type": { + "$ref": "112" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.get" + }, + { + "$id": "199", + "kind": "basic", + "name": "put", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "200", + "name": "put", + "resourceName": "ModelWithOptionalFieldValue", + "accessibility": "public", + "parameters": [ + { + "$id": "201", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "29" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.put.contentType", + "methodParameterSegments": [ + { + "$id": "202", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "29" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.put.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "203", + "kind": "body", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "112" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.put.input", + "methodParameterSegments": [ + { + "$id": "204", + "kind": "method", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "112" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.put.input", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithOptionalField", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.put", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "202" + }, + { + "$ref": "204" + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.put" + } + ], + "parameters": [ + { + "$id": "205", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "206", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.endpoint" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue", + "apiVersions": [], + "parent": { + "$ref": "148" + }, + "isMultiServiceClient": false + }, + { + "$id": "208", + "kind": "client", + "name": "ModelWithAttributesValue", + "namespace": "Payload.Xml", + "doc": "Operations for the ModelWithAttributes type.", + "methods": [ + { + "$id": "209", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "210", + "name": "get", + "resourceName": "ModelWithAttributesValue", + "accessibility": "public", + "parameters": [ + { + "$id": "211", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "33" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.get.accept", + "methodParameterSegments": [ + { + "$id": "212", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "33" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "117" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "35" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithAttributes", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.get", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "212" + } + ], + "response": { + "type": { + "$ref": "117" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.get" + }, + { + "$id": "213", + "kind": "basic", + "name": "put", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "214", + "name": "put", + "resourceName": "ModelWithAttributesValue", + "accessibility": "public", + "parameters": [ + { + "$id": "215", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "37" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.put.contentType", + "methodParameterSegments": [ + { + "$id": "216", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "37" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.put.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "217", + "kind": "body", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "117" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.put.input", + "methodParameterSegments": [ + { + "$id": "218", + "kind": "method", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "117" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.put.input", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithAttributes", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.put", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "216" + }, + { + "$ref": "218" + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.put" + } + ], + "parameters": [ + { + "$id": "219", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "220", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.endpoint" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue", + "apiVersions": [], + "parent": { + "$ref": "148" + }, + "isMultiServiceClient": false + }, + { + "$id": "222", + "kind": "client", + "name": "ModelWithUnwrappedArrayValue", + "namespace": "Payload.Xml", + "doc": "Operations for the ModelWithUnwrappedArray type.", + "methods": [ + { + "$id": "223", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "224", + "name": "get", + "resourceName": "ModelWithUnwrappedArrayValue", + "accessibility": "public", + "parameters": [ + { + "$id": "225", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "41" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.get.accept", + "methodParameterSegments": [ + { + "$id": "226", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "41" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "124" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "43" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithUnwrappedArray", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.get", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "226" + } + ], + "response": { + "type": { + "$ref": "124" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.get" + }, + { + "$id": "227", + "kind": "basic", + "name": "put", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "228", + "name": "put", + "resourceName": "ModelWithUnwrappedArrayValue", + "accessibility": "public", + "parameters": [ + { + "$id": "229", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "45" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.put.contentType", + "methodParameterSegments": [ + { + "$id": "230", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "45" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.put.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "231", + "kind": "body", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "124" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.put.input", + "methodParameterSegments": [ + { + "$id": "232", + "kind": "method", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "124" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.put.input", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithUnwrappedArray", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.put", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "230" + }, + { + "$ref": "232" + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.put" + } + ], + "parameters": [ + { + "$id": "233", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "234", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.endpoint" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue", + "apiVersions": [], + "parent": { + "$ref": "148" + }, + "isMultiServiceClient": false + }, + { + "$id": "236", + "kind": "client", + "name": "ModelWithRenamedArraysValue", + "namespace": "Payload.Xml", + "doc": "Operations for the ModelWithRenamedArrays type.", + "methods": [ + { + "$id": "237", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "238", + "name": "get", + "resourceName": "ModelWithRenamedArraysValue", + "accessibility": "public", + "parameters": [ + { + "$id": "239", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "49" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.get.accept", + "methodParameterSegments": [ + { + "$id": "240", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "49" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "127" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "51" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithRenamedArrays", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.get", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "240" + } + ], + "response": { + "type": { + "$ref": "127" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.get" + }, + { + "$id": "241", + "kind": "basic", + "name": "put", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "242", + "name": "put", + "resourceName": "ModelWithRenamedArraysValue", + "accessibility": "public", + "parameters": [ + { + "$id": "243", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "53" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.put.contentType", + "methodParameterSegments": [ + { + "$id": "244", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "53" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.put.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "245", + "kind": "body", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "127" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.put.input", + "methodParameterSegments": [ + { + "$id": "246", + "kind": "method", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "127" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.put.input", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithRenamedArrays", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.put", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "244" + }, + { + "$ref": "246" + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.put" + } + ], + "parameters": [ + { + "$id": "247", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "248", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.endpoint" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue", + "apiVersions": [], + "parent": { + "$ref": "148" + }, + "isMultiServiceClient": false + }, + { + "$id": "250", + "kind": "client", + "name": "ModelWithRenamedFieldsValue", + "namespace": "Payload.Xml", + "doc": "Operations for the ModelWithRenamedFields type.", + "methods": [ + { + "$id": "251", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "252", + "name": "get", + "resourceName": "ModelWithRenamedFieldsValue", + "accessibility": "public", + "parameters": [ + { + "$id": "253", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "57" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.get.accept", + "methodParameterSegments": [ + { + "$id": "254", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "57" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "130" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "59" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithRenamedFields", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.get", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "254" + } + ], + "response": { + "type": { + "$ref": "130" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.get" + }, + { + "$id": "255", + "kind": "basic", + "name": "put", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "256", + "name": "put", + "resourceName": "ModelWithRenamedFieldsValue", + "accessibility": "public", + "parameters": [ + { + "$id": "257", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "61" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.put.contentType", + "methodParameterSegments": [ + { + "$id": "258", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "61" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.put.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "259", + "kind": "body", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "130" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.put.input", + "methodParameterSegments": [ + { + "$id": "260", + "kind": "method", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "130" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.put.input", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithRenamedFields", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.put", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "258" + }, + { + "$ref": "260" + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.put" + } + ], + "parameters": [ + { + "$id": "261", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "262", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.endpoint" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue", + "apiVersions": [], + "parent": { + "$ref": "148" + }, + "isMultiServiceClient": false + }, + { + "$id": "264", + "kind": "client", + "name": "ModelWithEmptyArrayValue", + "namespace": "Payload.Xml", + "doc": "Operations for the ModelWithEmptyArray type.", + "methods": [ + { + "$id": "265", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "266", + "name": "get", + "resourceName": "ModelWithEmptyArrayValue", + "accessibility": "public", + "parameters": [ + { + "$id": "267", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "65" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.get.accept", + "methodParameterSegments": [ + { + "$id": "268", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "65" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "133" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "67" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithEmptyArray", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.get", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "268" + } + ], + "response": { + "type": { + "$ref": "133" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.get" + }, + { + "$id": "269", + "kind": "basic", + "name": "put", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "270", + "name": "put", + "resourceName": "ModelWithEmptyArrayValue", + "accessibility": "public", + "parameters": [ + { + "$id": "271", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "69" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.put.contentType", + "methodParameterSegments": [ + { + "$id": "272", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "69" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.put.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "273", + "kind": "body", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "133" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.put.input", + "methodParameterSegments": [ + { + "$id": "274", + "kind": "method", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "133" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.put.input", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithEmptyArray", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.put", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "272" + }, + { + "$ref": "274" + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.put" + } + ], + "parameters": [ + { + "$id": "275", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "276", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.endpoint" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue", + "apiVersions": [], + "parent": { + "$ref": "148" + }, + "isMultiServiceClient": false + }, + { + "$id": "278", + "kind": "client", + "name": "ModelWithTextValue", + "namespace": "Payload.Xml", + "doc": "Operations for the ModelWithText type.", + "methods": [ + { + "$id": "279", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "280", + "name": "get", + "resourceName": "ModelWithTextValue", + "accessibility": "public", + "parameters": [ + { + "$id": "281", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "73" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.get.accept", + "methodParameterSegments": [ + { + "$id": "282", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "73" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "135" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "75" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithText", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.get", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "282" + } + ], + "response": { + "type": { + "$ref": "135" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.get" + }, + { + "$id": "283", + "kind": "basic", + "name": "put", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "284", + "name": "put", + "resourceName": "ModelWithTextValue", + "accessibility": "public", + "parameters": [ + { + "$id": "285", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "77" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.put.contentType", + "methodParameterSegments": [ + { + "$id": "286", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "77" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.put.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "287", + "kind": "body", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "135" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.put.input", + "methodParameterSegments": [ + { + "$id": "288", + "kind": "method", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "135" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.put.input", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithText", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.put", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "286" + }, + { + "$ref": "288" + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.put" + } + ], + "parameters": [ + { + "$id": "289", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "290", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.endpoint" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue", + "apiVersions": [], + "parent": { + "$ref": "148" + }, + "isMultiServiceClient": false + }, + { + "$id": "292", + "kind": "client", + "name": "ModelWithDictionaryValue", + "namespace": "Payload.Xml", + "doc": "Operations for the ModelWithDictionary type.", + "methods": [ + { + "$id": "293", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "294", + "name": "get", + "resourceName": "ModelWithDictionaryValue", + "accessibility": "public", + "parameters": [ + { + "$id": "295", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "81" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.get.accept", + "methodParameterSegments": [ + { + "$id": "296", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "81" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "140" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "83" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithDictionary", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.get", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "296" + } + ], + "response": { + "type": { + "$ref": "140" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.get" + }, + { + "$id": "297", + "kind": "basic", + "name": "put", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "298", + "name": "put", + "resourceName": "ModelWithDictionaryValue", + "accessibility": "public", + "parameters": [ + { + "$id": "299", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "85" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.put.contentType", + "methodParameterSegments": [ + { + "$id": "300", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "85" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.put.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "301", + "kind": "body", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "140" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.put.input", + "methodParameterSegments": [ + { + "$id": "302", + "kind": "method", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "140" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.put.input", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithDictionary", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.put", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "300" + }, + { + "$ref": "302" + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.put" + } + ], + "parameters": [ + { + "$id": "303", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "304", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.endpoint" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue", + "apiVersions": [], + "parent": { + "$ref": "148" + }, + "isMultiServiceClient": false + }, + { + "$id": "306", + "kind": "client", + "name": "ModelWithEncodedNamesValue", + "namespace": "Payload.Xml", + "doc": "Operations for the ModelWithEncodedNames type.", + "methods": [ + { + "$id": "307", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "308", + "name": "get", + "resourceName": "ModelWithEncodedNamesValue", + "accessibility": "public", + "parameters": [ + { + "$id": "309", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "89" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.get.accept", + "methodParameterSegments": [ + { + "$id": "310", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "89" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "145" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "91" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/xml" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithEncodedNames", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.get", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "310" + } + ], + "response": { + "type": { + "$ref": "145" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.get" + }, + { + "$id": "311", + "kind": "basic", + "name": "put", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "312", + "name": "put", + "resourceName": "ModelWithEncodedNamesValue", + "accessibility": "public", + "parameters": [ + { + "$id": "313", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "93" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.put.contentType", + "methodParameterSegments": [ + { + "$id": "314", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "93" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.put.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "315", + "kind": "body", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "145" + }, + "isApiVersion": false, + "contentTypes": [ + "application/xml" + ], + "defaultContentType": "application/xml", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.put.input", + "methodParameterSegments": [ + { + "$id": "316", + "kind": "method", + "name": "input", + "serializedName": "input", + "type": { + "$ref": "145" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.put.input", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/payload/xml/modelWithEncodedNames", + "requestMediaTypes": [ + "application/xml" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.put", + "decorators": [], + "namespace": "Payload.Xml" + }, + "parameters": [ + { + "$ref": "314" + }, + { + "$ref": "316" + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.put" + } + ], + "parameters": [ + { + "$id": "317", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "318", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.endpoint" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue", + "apiVersions": [], + "parent": { + "$ref": "148" + }, + "isMultiServiceClient": false + } + ], + "isMultiServiceClient": false + } + ] +}