// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License

/******************************************************************************/
//
//                             DO NOT MODIFY
//          This file has been generated by the UIElementsGenerator tool
//              See InlineStyleGenerator class for details
//
/******************************************************************************/
using UnityEngine.UIElements.StyleSheets;
using UnityEngine.Yoga;

namespace UnityEngine.UIElements
{
    internal partial class InlineStyleAccess : IStyle
    {
        StyleEnum<Align> IStyle.alignContent
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.AlignContent);
                return new StyleEnum<Align>((Align)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<Align>((Align)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.AlignContent, tmp, ve.sharedStyle.alignContent))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.AlignContent = (YogaAlign)ve.computedStyle.alignContent.value;
                }
            }
        }

        StyleEnum<Align> IStyle.alignItems
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.AlignItems);
                return new StyleEnum<Align>((Align)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<Align>((Align)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.AlignItems, tmp, ve.sharedStyle.alignItems))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.AlignItems = (YogaAlign)ve.computedStyle.alignItems.value;
                }
            }
        }

        StyleEnum<Align> IStyle.alignSelf
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.AlignSelf);
                return new StyleEnum<Align>((Align)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<Align>((Align)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.AlignSelf, tmp, ve.sharedStyle.alignSelf))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.AlignSelf = (YogaAlign)ve.computedStyle.alignSelf.value;
                }
            }
        }

        StyleColor IStyle.backgroundColor
        {
            get
            {
                return GetStyleColor(StylePropertyId.BackgroundColor);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BackgroundColor, value, ve.sharedStyle.backgroundColor))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleBackground IStyle.backgroundImage
        {
            get
            {
                return GetStyleBackground(StylePropertyId.BackgroundImage);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BackgroundImage, value, ve.sharedStyle.backgroundImage))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleColor IStyle.borderBottomColor
        {
            get
            {
                return GetStyleColor(StylePropertyId.BorderBottomColor);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BorderBottomColor, value, ve.sharedStyle.borderBottomColor))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleLength IStyle.borderBottomLeftRadius
        {
            get
            {
                return GetStyleLength(StylePropertyId.BorderBottomLeftRadius);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BorderBottomLeftRadius, value, ve.sharedStyle.borderBottomLeftRadius))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.BorderRadius | VersionChangeType.Repaint);
                }
            }
        }

        StyleLength IStyle.borderBottomRightRadius
        {
            get
            {
                return GetStyleLength(StylePropertyId.BorderBottomRightRadius);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BorderBottomRightRadius, value, ve.sharedStyle.borderBottomRightRadius))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.BorderRadius | VersionChangeType.Repaint);
                }
            }
        }

        StyleFloat IStyle.borderBottomWidth
        {
            get
            {
                return GetStyleFloat(StylePropertyId.BorderBottomWidth);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BorderBottomWidth, value, ve.sharedStyle.borderBottomWidth))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.BorderWidth | VersionChangeType.Layout | VersionChangeType.Repaint);
                    ve.yogaNode.BorderBottomWidth = ve.computedStyle.borderBottomWidth.value;
                }
            }
        }

        StyleColor IStyle.borderLeftColor
        {
            get
            {
                return GetStyleColor(StylePropertyId.BorderLeftColor);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BorderLeftColor, value, ve.sharedStyle.borderLeftColor))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleFloat IStyle.borderLeftWidth
        {
            get
            {
                return GetStyleFloat(StylePropertyId.BorderLeftWidth);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BorderLeftWidth, value, ve.sharedStyle.borderLeftWidth))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.BorderWidth | VersionChangeType.Layout | VersionChangeType.Repaint);
                    ve.yogaNode.BorderLeftWidth = ve.computedStyle.borderLeftWidth.value;
                }
            }
        }

        StyleColor IStyle.borderRightColor
        {
            get
            {
                return GetStyleColor(StylePropertyId.BorderRightColor);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BorderRightColor, value, ve.sharedStyle.borderRightColor))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleFloat IStyle.borderRightWidth
        {
            get
            {
                return GetStyleFloat(StylePropertyId.BorderRightWidth);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BorderRightWidth, value, ve.sharedStyle.borderRightWidth))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.BorderWidth | VersionChangeType.Layout | VersionChangeType.Repaint);
                    ve.yogaNode.BorderRightWidth = ve.computedStyle.borderRightWidth.value;
                }
            }
        }

        StyleColor IStyle.borderTopColor
        {
            get
            {
                return GetStyleColor(StylePropertyId.BorderTopColor);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BorderTopColor, value, ve.sharedStyle.borderTopColor))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleLength IStyle.borderTopLeftRadius
        {
            get
            {
                return GetStyleLength(StylePropertyId.BorderTopLeftRadius);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BorderTopLeftRadius, value, ve.sharedStyle.borderTopLeftRadius))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.BorderRadius | VersionChangeType.Repaint);
                }
            }
        }

        StyleLength IStyle.borderTopRightRadius
        {
            get
            {
                return GetStyleLength(StylePropertyId.BorderTopRightRadius);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BorderTopRightRadius, value, ve.sharedStyle.borderTopRightRadius))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.BorderRadius | VersionChangeType.Repaint);
                }
            }
        }

        StyleFloat IStyle.borderTopWidth
        {
            get
            {
                return GetStyleFloat(StylePropertyId.BorderTopWidth);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.BorderTopWidth, value, ve.sharedStyle.borderTopWidth))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.BorderWidth | VersionChangeType.Layout | VersionChangeType.Repaint);
                    ve.yogaNode.BorderTopWidth = ve.computedStyle.borderTopWidth.value;
                }
            }
        }

        StyleLength IStyle.bottom
        {
            get
            {
                return GetStyleLength(StylePropertyId.Bottom);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.Bottom, value, ve.sharedStyle.bottom))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.Bottom = ve.computedStyle.bottom.ToYogaValue();
                }
            }
        }

        StyleColor IStyle.color
        {
            get
            {
                return GetStyleColor(StylePropertyId.Color);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.Color, value, ve.sharedStyle.color))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.StyleSheet | VersionChangeType.Repaint);
                }
            }
        }

        StyleEnum<DisplayStyle> IStyle.display
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.Display);
                return new StyleEnum<DisplayStyle>((DisplayStyle)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<DisplayStyle>((DisplayStyle)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.Display, tmp, ve.sharedStyle.display))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.Display = (YogaDisplay)ve.computedStyle.display.value;
                }
            }
        }

        StyleLength IStyle.flexBasis
        {
            get
            {
                return GetStyleLength(StylePropertyId.FlexBasis);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.FlexBasis, value, ve.sharedStyle.flexBasis))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.FlexBasis = ve.computedStyle.flexBasis.ToYogaValue();
                }
            }
        }

        StyleEnum<FlexDirection> IStyle.flexDirection
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.FlexDirection);
                return new StyleEnum<FlexDirection>((FlexDirection)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<FlexDirection>((FlexDirection)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.FlexDirection, tmp, ve.sharedStyle.flexDirection))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.FlexDirection = (YogaFlexDirection)ve.computedStyle.flexDirection.value;
                }
            }
        }

        StyleFloat IStyle.flexGrow
        {
            get
            {
                return GetStyleFloat(StylePropertyId.FlexGrow);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.FlexGrow, value, ve.sharedStyle.flexGrow))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.FlexGrow = ve.computedStyle.flexGrow.value;
                }
            }
        }

        StyleFloat IStyle.flexShrink
        {
            get
            {
                return GetStyleFloat(StylePropertyId.FlexShrink);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.FlexShrink, value, ve.sharedStyle.flexShrink))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.FlexShrink = ve.computedStyle.flexShrink.value;
                }
            }
        }

        StyleEnum<Wrap> IStyle.flexWrap
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.FlexWrap);
                return new StyleEnum<Wrap>((Wrap)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<Wrap>((Wrap)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.FlexWrap, tmp, ve.sharedStyle.flexWrap))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.Wrap = (YogaWrap)ve.computedStyle.flexWrap.value;
                }
            }
        }

        StyleLength IStyle.fontSize
        {
            get
            {
                return GetStyleLength(StylePropertyId.FontSize);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.FontSize, value, ve.sharedStyle.fontSize))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.StyleSheet | VersionChangeType.Layout);
                }
            }
        }

        StyleLength IStyle.height
        {
            get
            {
                return GetStyleLength(StylePropertyId.Height);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.Height, value, ve.sharedStyle.height))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.Height = ve.computedStyle.height.ToYogaValue();
                }
            }
        }

        StyleEnum<Justify> IStyle.justifyContent
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.JustifyContent);
                return new StyleEnum<Justify>((Justify)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<Justify>((Justify)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.JustifyContent, tmp, ve.sharedStyle.justifyContent))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.JustifyContent = (YogaJustify)ve.computedStyle.justifyContent.value;
                }
            }
        }

        StyleLength IStyle.left
        {
            get
            {
                return GetStyleLength(StylePropertyId.Left);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.Left, value, ve.sharedStyle.left))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.Left = ve.computedStyle.left.ToYogaValue();
                }
            }
        }

        StyleLength IStyle.marginBottom
        {
            get
            {
                return GetStyleLength(StylePropertyId.MarginBottom);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.MarginBottom, value, ve.sharedStyle.marginBottom))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.MarginBottom = ve.computedStyle.marginBottom.ToYogaValue();
                }
            }
        }

        StyleLength IStyle.marginLeft
        {
            get
            {
                return GetStyleLength(StylePropertyId.MarginLeft);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.MarginLeft, value, ve.sharedStyle.marginLeft))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.MarginLeft = ve.computedStyle.marginLeft.ToYogaValue();
                }
            }
        }

        StyleLength IStyle.marginRight
        {
            get
            {
                return GetStyleLength(StylePropertyId.MarginRight);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.MarginRight, value, ve.sharedStyle.marginRight))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.MarginRight = ve.computedStyle.marginRight.ToYogaValue();
                }
            }
        }

        StyleLength IStyle.marginTop
        {
            get
            {
                return GetStyleLength(StylePropertyId.MarginTop);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.MarginTop, value, ve.sharedStyle.marginTop))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.MarginTop = ve.computedStyle.marginTop.ToYogaValue();
                }
            }
        }

        StyleLength IStyle.maxHeight
        {
            get
            {
                return GetStyleLength(StylePropertyId.MaxHeight);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.MaxHeight, value, ve.sharedStyle.maxHeight))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.MaxHeight = ve.computedStyle.maxHeight.ToYogaValue();
                }
            }
        }

        StyleLength IStyle.maxWidth
        {
            get
            {
                return GetStyleLength(StylePropertyId.MaxWidth);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.MaxWidth, value, ve.sharedStyle.maxWidth))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.MaxWidth = ve.computedStyle.maxWidth.ToYogaValue();
                }
            }
        }

        StyleLength IStyle.minHeight
        {
            get
            {
                return GetStyleLength(StylePropertyId.MinHeight);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.MinHeight, value, ve.sharedStyle.minHeight))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.MinHeight = ve.computedStyle.minHeight.ToYogaValue();
                }
            }
        }

        StyleLength IStyle.minWidth
        {
            get
            {
                return GetStyleLength(StylePropertyId.MinWidth);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.MinWidth, value, ve.sharedStyle.minWidth))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.MinWidth = ve.computedStyle.minWidth.ToYogaValue();
                }
            }
        }

        StyleFloat IStyle.opacity
        {
            get
            {
                return GetStyleFloat(StylePropertyId.Opacity);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.Opacity, value, ve.sharedStyle.opacity))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Opacity);
                }
            }
        }

        StyleEnum<Overflow> IStyle.overflow
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.Overflow);
                return new StyleEnum<Overflow>((Overflow)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<OverflowInternal>((OverflowInternal)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.Overflow, tmp, ve.sharedStyle.overflow))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout | VersionChangeType.Overflow);
                    ve.yogaNode.Overflow = (YogaOverflow)ve.computedStyle.overflow.value;
                }
            }
        }

        StyleLength IStyle.paddingBottom
        {
            get
            {
                return GetStyleLength(StylePropertyId.PaddingBottom);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.PaddingBottom, value, ve.sharedStyle.paddingBottom))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.PaddingBottom = ve.computedStyle.paddingBottom.ToYogaValue();
                }
            }
        }

        StyleLength IStyle.paddingLeft
        {
            get
            {
                return GetStyleLength(StylePropertyId.PaddingLeft);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.PaddingLeft, value, ve.sharedStyle.paddingLeft))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.PaddingLeft = ve.computedStyle.paddingLeft.ToYogaValue();
                }
            }
        }

        StyleLength IStyle.paddingRight
        {
            get
            {
                return GetStyleLength(StylePropertyId.PaddingRight);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.PaddingRight, value, ve.sharedStyle.paddingRight))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.PaddingRight = ve.computedStyle.paddingRight.ToYogaValue();
                }
            }
        }

        StyleLength IStyle.paddingTop
        {
            get
            {
                return GetStyleLength(StylePropertyId.PaddingTop);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.PaddingTop, value, ve.sharedStyle.paddingTop))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.PaddingTop = ve.computedStyle.paddingTop.ToYogaValue();
                }
            }
        }

        StyleEnum<Position> IStyle.position
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.Position);
                return new StyleEnum<Position>((Position)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<Position>((Position)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.Position, tmp, ve.sharedStyle.position))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.PositionType = (YogaPositionType)ve.computedStyle.position.value;
                }
            }
        }

        StyleLength IStyle.right
        {
            get
            {
                return GetStyleLength(StylePropertyId.Right);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.Right, value, ve.sharedStyle.right))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.Right = ve.computedStyle.right.ToYogaValue();
                }
            }
        }

        StyleEnum<TextOverflow> IStyle.textOverflow
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.TextOverflow);
                return new StyleEnum<TextOverflow>((TextOverflow)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<TextOverflow>((TextOverflow)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.TextOverflow, tmp, ve.sharedStyle.textOverflow))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout | VersionChangeType.Repaint);
                }
            }
        }

        StyleLength IStyle.top
        {
            get
            {
                return GetStyleLength(StylePropertyId.Top);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.Top, value, ve.sharedStyle.top))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.Top = ve.computedStyle.top.ToYogaValue();
                }
            }
        }

        StyleColor IStyle.unityBackgroundImageTintColor
        {
            get
            {
                return GetStyleColor(StylePropertyId.UnityBackgroundImageTintColor);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.UnityBackgroundImageTintColor, value, ve.sharedStyle.unityBackgroundImageTintColor))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleEnum<ScaleMode> IStyle.unityBackgroundScaleMode
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.UnityBackgroundScaleMode);
                return new StyleEnum<ScaleMode>((ScaleMode)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<ScaleMode>((ScaleMode)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.UnityBackgroundScaleMode, tmp, ve.sharedStyle.unityBackgroundScaleMode))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleFont IStyle.unityFont
        {
            get
            {
                return GetStyleFont(StylePropertyId.UnityFont);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.UnityFont, value, ve.sharedStyle.unityFont))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.StyleSheet | VersionChangeType.Layout | VersionChangeType.Repaint);
                }
            }
        }

        StyleEnum<FontStyle> IStyle.unityFontStyleAndWeight
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.UnityFontStyleAndWeight);
                return new StyleEnum<FontStyle>((FontStyle)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<FontStyle>((FontStyle)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.UnityFontStyleAndWeight, tmp, ve.sharedStyle.unityFontStyleAndWeight))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.StyleSheet | VersionChangeType.Layout | VersionChangeType.Repaint);
                }
            }
        }

        StyleEnum<OverflowClipBox> IStyle.unityOverflowClipBox
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.UnityOverflowClipBox);
                return new StyleEnum<OverflowClipBox>((OverflowClipBox)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<OverflowClipBox>((OverflowClipBox)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.UnityOverflowClipBox, tmp, ve.sharedStyle.unityOverflowClipBox))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleInt IStyle.unitySliceBottom
        {
            get
            {
                return GetStyleInt(StylePropertyId.UnitySliceBottom);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.UnitySliceBottom, value, ve.sharedStyle.unitySliceBottom))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleInt IStyle.unitySliceLeft
        {
            get
            {
                return GetStyleInt(StylePropertyId.UnitySliceLeft);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.UnitySliceLeft, value, ve.sharedStyle.unitySliceLeft))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleInt IStyle.unitySliceRight
        {
            get
            {
                return GetStyleInt(StylePropertyId.UnitySliceRight);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.UnitySliceRight, value, ve.sharedStyle.unitySliceRight))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleInt IStyle.unitySliceTop
        {
            get
            {
                return GetStyleInt(StylePropertyId.UnitySliceTop);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.UnitySliceTop, value, ve.sharedStyle.unitySliceTop))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleEnum<TextAnchor> IStyle.unityTextAlign
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.UnityTextAlign);
                return new StyleEnum<TextAnchor>((TextAnchor)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<TextAnchor>((TextAnchor)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.UnityTextAlign, tmp, ve.sharedStyle.unityTextAlign))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.StyleSheet | VersionChangeType.Repaint);
                }
            }
        }

        StyleEnum<TextOverflowPosition> IStyle.unityTextOverflowPosition
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.UnityTextOverflowPosition);
                return new StyleEnum<TextOverflowPosition>((TextOverflowPosition)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<TextOverflowPosition>((TextOverflowPosition)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.UnityTextOverflowPosition, tmp, ve.sharedStyle.unityTextOverflowPosition))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Repaint);
                }
            }
        }

        StyleEnum<Visibility> IStyle.visibility
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.Visibility);
                return new StyleEnum<Visibility>((Visibility)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<Visibility>((Visibility)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.Visibility, tmp, ve.sharedStyle.visibility))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.StyleSheet | VersionChangeType.Repaint);
                }
            }
        }

        StyleEnum<WhiteSpace> IStyle.whiteSpace
        {
            get
            {
                var tmp = GetStyleInt(StylePropertyId.WhiteSpace);
                return new StyleEnum<WhiteSpace>((WhiteSpace)tmp.value, tmp.keyword);
            }

            set
            {
                var tmp = new StyleEnum<WhiteSpace>((WhiteSpace)value.value, value.keyword);
                if (SetStyleValue(StylePropertyId.WhiteSpace, tmp, ve.sharedStyle.whiteSpace))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.StyleSheet | VersionChangeType.Layout);
                }
            }
        }

        StyleLength IStyle.width
        {
            get
            {
                return GetStyleLength(StylePropertyId.Width);
            }

            set
            {
                if (SetStyleValue(StylePropertyId.Width, value, ve.sharedStyle.width))
                {
                    ve.IncrementVersion(VersionChangeType.Styles | VersionChangeType.Layout);
                    ve.yogaNode.Width = ve.computedStyle.width.ToYogaValue();
                }
            }
        }
    }
}
