File: StatisticsJsonSerializerContext.Statistics.g.cs
Project: src\src\Components\Aspire.Confluent.Kafka\Aspire.Confluent.Kafka.csproj (Aspire.Confluent.Kafka)
// <auto-generated/>
 
#nullable enable annotations
#nullable disable warnings
 
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
 
namespace Aspire.Confluent.Kafka
{
    internal sealed partial class StatisticsJsonSerializerContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Confluent.Kafka.Statistics>? _Statistics;
        
        /// <summary>
        /// Defines the source generated JSON serialization contract metadata for a given type.
        /// </summary>
        public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Confluent.Kafka.Statistics> Statistics
        {
            get => _Statistics ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Confluent.Kafka.Statistics>)Options.GetTypeInfo(typeof(global::Aspire.Confluent.Kafka.Statistics));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Confluent.Kafka.Statistics> Create_Statistics(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Confluent.Kafka.Statistics>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Confluent.Kafka.Statistics> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Confluent.Kafka.Statistics>
                {
                    ObjectCreator = () => new global::Aspire.Confluent.Kafka.Statistics(),
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => StatisticsPropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    SerializeHandler = StatisticsSerializeHandler
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Confluent.Kafka.Statistics>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] StatisticsPropInit(global::System.Text.Json.JsonSerializerOptions options)
        {
            var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[21];
 
            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).Name,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).Name = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Name",
                JsonPropertyName = "name"
            };
            
            properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info0);
 
            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).ClientId,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).ClientId = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ClientId",
                JsonPropertyName = "client_id"
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info1);
 
            var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).Type,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).Type = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Type",
                JsonPropertyName = "type"
            };
            
            properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info2);
 
            var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).Timestamp,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).Timestamp = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Timestamp",
                JsonPropertyName = "ts"
            };
            
            properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info3);
 
            var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).Time,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).Time = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Time",
                JsonPropertyName = "time"
            };
            
            properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info4);
 
            var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).Age,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).Age = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Age",
                JsonPropertyName = "age"
            };
            
            properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info5);
 
            var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).ReplyQueue,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).ReplyQueue = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ReplyQueue",
                JsonPropertyName = "replyq"
            };
            
            properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info6);
 
            var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).MessageCount,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).MessageCount = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "MessageCount",
                JsonPropertyName = "msg_cnt"
            };
            
            properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info7);
 
            var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).MessageSize,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).MessageSize = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "MessageSize",
                JsonPropertyName = "msg_size"
            };
            
            properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info8);
 
            var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).MessageMax,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).MessageMax = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "MessageMax",
                JsonPropertyName = "msg_max"
            };
            
            properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info9);
 
            var info10 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).MessageSizeMax,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).MessageSizeMax = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "MessageSizeMax",
                JsonPropertyName = "msg_size_max"
            };
            
            properties[10] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info10);
 
            var info11 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).Tx,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).Tx = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Tx",
                JsonPropertyName = "tx"
            };
            
            properties[11] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info11);
 
            var info12 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).TxBytes,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).TxBytes = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "TxBytes",
                JsonPropertyName = "tx_bytes"
            };
            
            properties[12] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info12);
 
            var info13 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).Rx,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).Rx = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Rx",
                JsonPropertyName = "rx"
            };
            
            properties[13] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info13);
 
            var info14 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).RxBytes,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).RxBytes = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "RxBytes",
                JsonPropertyName = "rx_bytes"
            };
            
            properties[14] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info14);
 
            var info15 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).TxMessages,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).TxMessages = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "TxMessages",
                JsonPropertyName = "txmsgs"
            };
            
            properties[15] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info15);
 
            var info16 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).TxMessageBytes,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).TxMessageBytes = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "TxMessageBytes",
                JsonPropertyName = "txmsg_bytes"
            };
            
            properties[16] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info16);
 
            var info17 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).RxMessages,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).RxMessages = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "RxMessages",
                JsonPropertyName = "rxmsgs"
            };
            
            properties[17] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info17);
 
            var info18 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).RxMessageBytes,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).RxMessageBytes = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "RxMessageBytes",
                JsonPropertyName = "rxmsg_bytes"
            };
            
            properties[18] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info18);
 
            var info19 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).SimpleCount,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).SimpleCount = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "SimpleCount",
                JsonPropertyName = "simple_cnt"
            };
            
            properties[19] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info19);
 
            var info20 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Confluent.Kafka.Statistics),
                Converter = null,
                Getter = static obj => ((global::Aspire.Confluent.Kafka.Statistics)obj).MetadataCacheCount,
                Setter = static (obj, value) => ((global::Aspire.Confluent.Kafka.Statistics)obj).MetadataCacheCount = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "MetadataCacheCount",
                JsonPropertyName = "metadata_cache_cnt"
            };
            
            properties[20] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info20);
 
            return properties;
        }
 
        // Intentionally not a static method because we create a delegate to it. Invoking delegates to instance
        // methods is almost as fast as virtual calls. Static methods need to go through a shuffle thunk.
        private void StatisticsSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Confluent.Kafka.Statistics? value)
        {
            if (value == null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();
 
            writer.WriteString(PropName_name, ((global::Aspire.Confluent.Kafka.Statistics)value).Name);
            writer.WriteString(PropName_client_id, ((global::Aspire.Confluent.Kafka.Statistics)value).ClientId);
            writer.WriteString(PropName_type, ((global::Aspire.Confluent.Kafka.Statistics)value).Type);
            writer.WriteNumber(PropName_ts, ((global::Aspire.Confluent.Kafka.Statistics)value).Timestamp);
            writer.WriteNumber(PropName_time, ((global::Aspire.Confluent.Kafka.Statistics)value).Time);
            writer.WriteNumber(PropName_age, ((global::Aspire.Confluent.Kafka.Statistics)value).Age);
            writer.WriteNumber(PropName_replyq, ((global::Aspire.Confluent.Kafka.Statistics)value).ReplyQueue);
            writer.WriteNumber(PropName_msg_cnt, ((global::Aspire.Confluent.Kafka.Statistics)value).MessageCount);
            writer.WriteNumber(PropName_msg_size, ((global::Aspire.Confluent.Kafka.Statistics)value).MessageSize);
            writer.WriteNumber(PropName_msg_max, ((global::Aspire.Confluent.Kafka.Statistics)value).MessageMax);
            writer.WriteNumber(PropName_msg_size_max, ((global::Aspire.Confluent.Kafka.Statistics)value).MessageSizeMax);
            writer.WriteNumber(PropName_tx, ((global::Aspire.Confluent.Kafka.Statistics)value).Tx);
            writer.WriteNumber(PropName_tx_bytes, ((global::Aspire.Confluent.Kafka.Statistics)value).TxBytes);
            writer.WriteNumber(PropName_rx, ((global::Aspire.Confluent.Kafka.Statistics)value).Rx);
            writer.WriteNumber(PropName_rx_bytes, ((global::Aspire.Confluent.Kafka.Statistics)value).RxBytes);
            writer.WriteNumber(PropName_txmsgs, ((global::Aspire.Confluent.Kafka.Statistics)value).TxMessages);
            writer.WriteNumber(PropName_txmsg_bytes, ((global::Aspire.Confluent.Kafka.Statistics)value).TxMessageBytes);
            writer.WriteNumber(PropName_rxmsgs, ((global::Aspire.Confluent.Kafka.Statistics)value).RxMessages);
            writer.WriteNumber(PropName_rxmsg_bytes, ((global::Aspire.Confluent.Kafka.Statistics)value).RxMessageBytes);
            writer.WriteNumber(PropName_simple_cnt, ((global::Aspire.Confluent.Kafka.Statistics)value).SimpleCount);
            writer.WriteNumber(PropName_metadata_cache_cnt, ((global::Aspire.Confluent.Kafka.Statistics)value).MetadataCacheCount);
 
            writer.WriteEndObject();
        }
    }
}