// <auto-generated/>

//------------------------------------------------------------------------------------------------
//      This file has been programatically generated; DON´T EDIT!
//------------------------------------------------------------------------------------------------

#pragma warning disable SA1001
#pragma warning disable SA1027
#pragma warning disable SA1028
#pragma warning disable SA1121
#pragma warning disable SA1205
#pragma warning disable SA1309
#pragma warning disable SA1402
#pragma warning disable SA1505
#pragma warning disable SA1507
#pragma warning disable SA1508
#pragma warning disable SA1652

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Numerics;
using System.Text.Json;

using JSONREADER = System.Text.Json.Utf8JsonReader;
using JSONWRITER = System.Text.Json.Utf8JsonWriter;
using FIELDINFO = SharpGLTF.Reflection.FieldInfo;


namespace SharpGLTF.Schema2.AGI
{
	using Collections;

	/// <summary>
	/// glTF Extension for an individual node in a glTF model, to associate it with the model's root AGI_stk_metadata object.
	/// </summary>
	#if NET6_0_OR_GREATER
	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
	#endif
	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
	partial class AgiNodeStkMetadata : ExtraProperties
	{
	
		#region reflection
	
		public new const string SCHEMANAME = "AGI_stk_metadata";
		protected override string GetSchemaName() => SCHEMANAME;
	
		protected override IEnumerable<string> ReflectFieldsNames()
		{
			yield return "noObscuration";
			yield return "solarPanelGroupName";
			foreach(var f in base.ReflectFieldsNames()) yield return f;
		}
		protected override bool TryReflectField(string name, out FIELDINFO value)
		{
			switch(name)
			{
				case "noObscuration": value = FIELDINFO.From("noObscuration",this, instance => instance._noObscuration); return true;
				case "solarPanelGroupName": value = FIELDINFO.From("solarPanelGroupName",this, instance => instance._solarPanelGroupName); return true;
				default: return base.TryReflectField(name, out value);
			}
		}
	
		#endregion
	
		#region data
	
		private Boolean? _noObscuration;
		
		private String _solarPanelGroupName;
		
		#endregion
	
		#region serialization
	
		protected override void SerializeProperties(JSONWRITER writer)
		{
			base.SerializeProperties(writer);
			SerializeProperty(writer, "noObscuration", _noObscuration);
			SerializeProperty(writer, "solarPanelGroupName", _solarPanelGroupName);
		}
	
		protected override void DeserializeProperty(string jsonPropertyName, ref JSONREADER reader)
		{
			switch (jsonPropertyName)
			{
				case "noObscuration": DeserializePropertyValue<AgiNodeStkMetadata, Boolean?>(ref reader, this, out _noObscuration); break;
				case "solarPanelGroupName": DeserializePropertyValue<AgiNodeStkMetadata, String>(ref reader, this, out _solarPanelGroupName); break;
				default: base.DeserializeProperty(jsonPropertyName,ref reader); break;
			}
		}
	
		#endregion
	
	}

}
