File: _generated\159\TelemetryDiskLoggerJsonSerializerContext.IdentifiersModel.g.cs
Web Access
Project: src\src\sdk\src\Cli\dotnet\dotnet.csproj (dotnet)
// <auto-generated/>

#nullable enable annotations
#nullable disable warnings

// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618

namespace Microsoft.DotNet.Cli.Telemetry
{
    internal partial class TelemetryDiskLoggerJsonSerializerContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel>? _IdentifiersModel;
        
        /// <summary>
        /// Defines the source generated JSON serialization contract metadata for a given type.
        /// </summary>
        #nullable disable annotations // Marking the property type as nullable-oblivious.
        public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel> IdentifiersModel
        #nullable enable annotations
        {
            get => _IdentifiersModel ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel>)Options.GetTypeInfo(typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel> Create_IdentifiersModel(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel>
                {
                    ObjectCreator = null,
                    ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel((string)args[0], (string)args[1], (string)args[2], (string)args[3], (string)args[4], (string)args[5]),
                    PropertyMetadataInitializer = _ => IdentifiersModelPropInit(options),
                    ConstructorParameterMetadataInitializer = IdentifiersModelCtorParamInit,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string)}, modifiers: null),
                    SerializeHandler = IdentifiersModelSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }

        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] IdentifiersModelPropInit(global::System.Text.Json.JsonSerializerOptions options)
        {
            var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[6];

            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)obj).id,
                Setter = static (obj, value) => __set_IdentifiersModel_id((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "id",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel).GetProperty("id", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            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::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)obj).traceId,
                Setter = static (obj, value) => __set_IdentifiersModel_traceId((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "traceId",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel).GetProperty("traceId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info1);
            properties[1].IsGetNullable = false;
            properties[1].IsSetNullable = false;

            var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)obj).spanId,
                Setter = static (obj, value) => __set_IdentifiersModel_spanId((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "spanId",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel).GetProperty("spanId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info2);
            properties[2].IsGetNullable = false;
            properties[2].IsSetNullable = false;

            var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)obj).parentSpanId,
                Setter = static (obj, value) => __set_IdentifiersModel_parentSpanId((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "parentSpanId",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel).GetProperty("parentSpanId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info3);
            properties[3].IsGetNullable = false;
            properties[3].IsSetNullable = false;

            var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)obj).parentId,
                Setter = static (obj, value) => __set_IdentifiersModel_parentId((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "parentId",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel).GetProperty("parentId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info4);

            var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)obj).rootId,
                Setter = static (obj, value) => __set_IdentifiersModel_rootId((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "rootId",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel).GetProperty("rootId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info5);

            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 IdentifiersModelSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();

            writer.WriteString(PropName_id, ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)value).id);
            writer.WriteString(PropName_traceId, ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)value).traceId);
            writer.WriteString(PropName_spanId, ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)value).spanId);
            writer.WriteString(PropName_parentSpanId, ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)value).parentSpanId);
            writer.WriteString(PropName_parentId, ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)value).parentId);
            writer.WriteString(PropName_rootId, ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel)value).rootId);

            writer.WriteEndObject();
        }

        private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] IdentifiersModelCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
        {
            new()
            {
                Name = "id",
                ParameterType = typeof(string),
                Position = 0,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = true,
            },

            new()
            {
                Name = "traceId",
                ParameterType = typeof(string),
                Position = 1,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = false,
            },

            new()
            {
                Name = "spanId",
                ParameterType = typeof(string),
                Position = 2,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = false,
            },

            new()
            {
                Name = "parentSpanId",
                ParameterType = typeof(string),
                Position = 3,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = false,
            },

            new()
            {
                Name = "parentId",
                ParameterType = typeof(string),
                Position = 4,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = true,
            },

            new()
            {
                Name = "rootId",
                ParameterType = typeof(string),
                Position = 5,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = true,
            },
        };

        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_id")]
        private static extern void __set_IdentifiersModel_id(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel obj, string value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_traceId")]
        private static extern void __set_IdentifiersModel_traceId(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel obj, string value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_spanId")]
        private static extern void __set_IdentifiersModel_spanId(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel obj, string value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_parentSpanId")]
        private static extern void __set_IdentifiersModel_parentSpanId(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel obj, string value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_parentId")]
        private static extern void __set_IdentifiersModel_parentId(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel obj, string value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_rootId")]
        private static extern void __set_IdentifiersModel_rootId(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.IdentifiersModel obj, string value);
    }
}