public int CreateUserDefinedOption(string codeName, int nameStringIndex, int descStringIndex)
        {
            if (UserDefinedOptions.Count == UserDefinedOptions.Capacity)
            {
                return(TypeExtensions.kNone);
            }

            var option = new MegaloVariantUserDefinedOption()
            {
                CodeName               = codeName,
                NameStringIndex        = nameStringIndex,
                DescriptionStringIndex = descStringIndex,
            };

            UserDefinedOptions.Add(option);
            return(UserDefinedOptions.Count - 1);
        }
        internal void CopyValueFrom(MegaloVariantUserDefinedOption other, int otherIndex = -1, bool isDefault = false)
        {
            if (otherIndex.IsNone())
            {
                otherIndex = other.ValueData.Values.Count - 1;
            }

            if (isDefault)
            {
                ValueIndex = ValueData.Values.Count;
            }

            var other_value = other.ValueData.Values[otherIndex];

            ValueData.AddValue(new MegaloVariantUserDefinedOptionValueParams()
            {
                NameStringIndex        = other_value.NameStringIndex,
                DescriptionStringIndex = other_value.DescriptionStringIndex,
                Value = other_value.Value,
            }, isDefault);
        }