// ------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version: 17.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ namespace ServiceClientGenerator.Generators.Marshallers { using System.Linq; using System.Text; using System.Collections.Generic; using System; /// /// Class to produce the template output /// #line 1 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")] public partial class RestXmlExceptionUnmarshaller : BaseResponseUnmarshaller { #line hidden /// /// Create the template output /// public override string TransformText() { #line 6 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" AddLicenseHeader(); AddCommonUsingStatements(); #line default #line hidden this.Write("\r\nnamespace "); #line 12 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.Namespace)); #line default #line hidden this.Write(".Model.Internal.MarshallTransformations\r\n{\r\n /// \r\n /// Response U" + "nmarshaller for "); #line 15 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.UnmarshallerBaseName)); #line default #line hidden this.Write(" operation\r\n /// \r\n public class "); #line 17 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.UnmarshallerBaseName)); #line default #line hidden this.Write("Unmarshaller : IErrorResponseUnmarshaller<"); #line 17 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.UnmarshallerBaseName)); #line default #line hidden this.Write(", XmlUnmarshallerContext>\r\n {\r\n /// \r\n /// Unmarshaller" + " the response from the service to the response class.\r\n /// \r" + "\n /// \r\n /// \r\n " + " public "); #line 24 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.UnmarshallerBaseName)); #line default #line hidden this.Write(@" Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// /// Unmarshaller the response from the service to the response class. /// /// /// /// public "); #line 35 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.UnmarshallerBaseName)); #line default #line hidden this.Write(" Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse" + " errorResponse)\r\n {\r\n "); #line 37 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.UnmarshallerBaseName)); #line default #line hidden this.Write(" response = new "); #line 37 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.UnmarshallerBaseName)); #line default #line hidden this.Write(@"(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { "); #line 44 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" foreach (var member in this.Structure.Members) { if(member.Shape.IsList) { var listMarshallName = member.Shape.ListMarshallName ?? "member"; #line default #line hidden this.Write(" if (context.TestExpression(\""); #line 51 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(member.MarshallName)); #line default #line hidden this.Write("/"); #line 51 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(listMarshallName)); #line default #line hidden this.Write("\"))\r\n {\r\n var unmarshaller = "); #line 53 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(member.DetermineTypeUnmarshallerInstantiate())); #line default #line hidden this.Write(";\r\n response."); #line 54 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(member.PropertyName)); #line default #line hidden this.Write(".Add(unmarshaller.Unmarshall(context));\r\n }\r\n"); #line 56 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" } else { #line default #line hidden this.Write(" if (context.TestExpression(\""); #line 61 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(member.MarshallName)); #line default #line hidden this.Write("\"))\r\n {\r\n var unmarshaller = "); #line 63 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(member.DetermineTypeUnmarshallerInstantiate())); #line default #line hidden this.Write(";\r\n response."); #line 64 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.Write(this.ToStringHelper.ToStringWithCulture(member.PropertyName)); #line default #line hidden this.Write(" = unmarshaller.Unmarshall(context);\r\n }\r\n"); #line 66 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" } } #line default #line hidden this.Write(" }\r\n }\r\n return response;\r\n }\r\n\r\n"); #line 75 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Marshallers\RestXmlExceptionUnmarshaller.tt" this.AddStructureSingletonMethod(); #line default #line hidden this.Write(" }\r\n}"); return this.GenerationEnvironment.ToString(); } } #line default #line hidden }