QueryFormat
The QueryFormat.
using Azure.Core;
using Azure.Storage.Common;
using System.Xml;
namespace Azure.Storage.Blobs.Models
{
internal class QueryFormat : IXmlSerializable
{
public QueryFormatType Type { get; }
public DelimitedTextConfigurationInternal DelimitedTextConfiguration { get; set; }
public JsonTextConfigurationInternal JsonTextConfiguration { get; set; }
public ArrowTextConfigurationInternal ArrowConfiguration { get; set; }
public object ParquetTextConfiguration { get; set; }
public QueryFormat(QueryFormatType type)
{
Type = type;
}
internal QueryFormat(QueryFormatType type, DelimitedTextConfigurationInternal delimitedTextConfiguration, JsonTextConfigurationInternal jsonTextConfiguration, ArrowTextConfigurationInternal arrowConfiguration, object parquetTextConfiguration)
{
Type = type;
DelimitedTextConfiguration = delimitedTextConfiguration;
JsonTextConfiguration = jsonTextConfiguration;
ArrowConfiguration = arrowConfiguration;
ParquetTextConfiguration = parquetTextConfiguration;
}
void IXmlSerializable.Write(XmlWriter writer, string nameHint)
{
writer.WriteStartElement(nameHint ?? "QueryFormat");
writer.WriteStartElement("Type");
writer.WriteValue(Type.ToSerialString());
writer.WriteEndElement();
if (Optional.IsDefined(DelimitedTextConfiguration))
writer.WriteObjectValue(DelimitedTextConfiguration, "DelimitedTextConfiguration");
if (Optional.IsDefined(JsonTextConfiguration))
writer.WriteObjectValue(JsonTextConfiguration, "JsonTextConfiguration");
if (Optional.IsDefined(ArrowConfiguration))
writer.WriteObjectValue(ArrowConfiguration, "ArrowConfiguration");
if (Optional.IsDefined(ParquetTextConfiguration))
writer.WriteObjectValue(ParquetTextConfiguration, "ParquetTextConfiguration");
writer.WriteEndElement();
}
}
}