<?php
/**
 * TextBlockStyles
 *
 * PHP version 7.4
 *
 * @category Class
 * @package  KlaviyoAPI
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * Klaviyo API
 *
 * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
 *
 * Contact: developers@klaviyo.com
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 6.1.0
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace KlaviyoAPI\Model;

use \ArrayAccess;
use \KlaviyoAPI\ObjectSerializer;

/**
 * TextBlockStyles Class Doc Comment
 *
 * @category Class
 * @package  KlaviyoAPI
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class TextBlockStyles implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $openAPIModelName = 'TextBlockStyles';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'background_color' => 'string',
        'block_background_color' => 'string',
        'block_border_color' => 'string',
        'block_border_style' => 'string',
        'block_border_width' => 'int',
        'block_padding_bottom' => 'int',
        'block_padding_left' => 'int',
        'block_padding_right' => 'int',
        'block_padding_top' => 'int',
        'color' => 'string',
        'extra_css_class' => 'string',
        'font_family' => 'string',
        'font_size' => 'int',
        'font_style' => 'string',
        'font_weight' => 'string',
        'inner_padding_bottom' => 'int',
        'inner_padding_left' => 'int',
        'inner_padding_right' => 'int',
        'inner_padding_top' => 'int',
        'letter_spacing' => 'int',
        'line_height' => 'float',
        'mobile_stretch_content' => 'bool',
        'text_align' => 'string',
        'text_decoration' => 'string',
        'text_table_layout' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      * @phpstan-var array<string, string|null>
      * @psalm-var array<string, string|null>
      */
    protected static $openAPIFormats = [
        'background_color' => null,
        'block_background_color' => null,
        'block_border_color' => null,
        'block_border_style' => null,
        'block_border_width' => null,
        'block_padding_bottom' => null,
        'block_padding_left' => null,
        'block_padding_right' => null,
        'block_padding_top' => null,
        'color' => null,
        'extra_css_class' => null,
        'font_family' => null,
        'font_size' => null,
        'font_style' => null,
        'font_weight' => null,
        'inner_padding_bottom' => null,
        'inner_padding_left' => null,
        'inner_padding_right' => null,
        'inner_padding_top' => null,
        'letter_spacing' => null,
        'line_height' => null,
        'mobile_stretch_content' => null,
        'text_align' => null,
        'text_decoration' => null,
        'text_table_layout' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static array $openAPINullables = [
        'background_color' => true,
		'block_background_color' => true,
		'block_border_color' => true,
		'block_border_style' => true,
		'block_border_width' => true,
		'block_padding_bottom' => true,
		'block_padding_left' => true,
		'block_padding_right' => true,
		'block_padding_top' => true,
		'color' => true,
		'extra_css_class' => true,
		'font_family' => true,
		'font_size' => true,
		'font_style' => true,
		'font_weight' => true,
		'inner_padding_bottom' => true,
		'inner_padding_left' => true,
		'inner_padding_right' => true,
		'inner_padding_top' => true,
		'letter_spacing' => true,
		'line_height' => true,
		'mobile_stretch_content' => true,
		'text_align' => true,
		'text_decoration' => true,
		'text_table_layout' => true
    ];

    /**
      * If a nullable field gets set to null, insert it here
      *
      * @var boolean[]
      */
    protected array $openAPINullablesSetToNull = [];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function openAPITypes()
    {
        return self::$openAPITypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function openAPIFormats()
    {
        return self::$openAPIFormats;
    }

    /**
     * Array of nullable properties
     *
     * @return array
     */
    protected static function openAPINullables(): array
    {
        return self::$openAPINullables;
    }

    /**
     * Array of nullable field names deliberately set to null
     *
     * @return boolean[]
     */
    private function getOpenAPINullablesSetToNull(): array
    {
        return $this->openAPINullablesSetToNull;
    }

    /**
     * Checks if a property is nullable
     *
     * @param string $property
     * @return bool
     */
    public static function isNullable(string $property): bool
    {
        return self::openAPINullables()[$property] ?? false;
    }

    /**
     * Checks if a nullable property is set to null.
     *
     * @param string $property
     * @return bool
     */
    public function isNullableSetToNull(string $property): bool
    {
        return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'background_color' => 'background_color',
        'block_background_color' => 'block_background_color',
        'block_border_color' => 'block_border_color',
        'block_border_style' => 'block_border_style',
        'block_border_width' => 'block_border_width',
        'block_padding_bottom' => 'block_padding_bottom',
        'block_padding_left' => 'block_padding_left',
        'block_padding_right' => 'block_padding_right',
        'block_padding_top' => 'block_padding_top',
        'color' => 'color',
        'extra_css_class' => 'extra_css_class',
        'font_family' => 'font_family',
        'font_size' => 'font_size',
        'font_style' => 'font_style',
        'font_weight' => 'font_weight',
        'inner_padding_bottom' => 'inner_padding_bottom',
        'inner_padding_left' => 'inner_padding_left',
        'inner_padding_right' => 'inner_padding_right',
        'inner_padding_top' => 'inner_padding_top',
        'letter_spacing' => 'letter_spacing',
        'line_height' => 'line_height',
        'mobile_stretch_content' => 'mobile_stretch_content',
        'text_align' => 'text_align',
        'text_decoration' => 'text_decoration',
        'text_table_layout' => 'text_table_layout'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'background_color' => 'setBackgroundColor',
        'block_background_color' => 'setBlockBackgroundColor',
        'block_border_color' => 'setBlockBorderColor',
        'block_border_style' => 'setBlockBorderStyle',
        'block_border_width' => 'setBlockBorderWidth',
        'block_padding_bottom' => 'setBlockPaddingBottom',
        'block_padding_left' => 'setBlockPaddingLeft',
        'block_padding_right' => 'setBlockPaddingRight',
        'block_padding_top' => 'setBlockPaddingTop',
        'color' => 'setColor',
        'extra_css_class' => 'setExtraCssClass',
        'font_family' => 'setFontFamily',
        'font_size' => 'setFontSize',
        'font_style' => 'setFontStyle',
        'font_weight' => 'setFontWeight',
        'inner_padding_bottom' => 'setInnerPaddingBottom',
        'inner_padding_left' => 'setInnerPaddingLeft',
        'inner_padding_right' => 'setInnerPaddingRight',
        'inner_padding_top' => 'setInnerPaddingTop',
        'letter_spacing' => 'setLetterSpacing',
        'line_height' => 'setLineHeight',
        'mobile_stretch_content' => 'setMobileStretchContent',
        'text_align' => 'setTextAlign',
        'text_decoration' => 'setTextDecoration',
        'text_table_layout' => 'setTextTableLayout'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'background_color' => 'getBackgroundColor',
        'block_background_color' => 'getBlockBackgroundColor',
        'block_border_color' => 'getBlockBorderColor',
        'block_border_style' => 'getBlockBorderStyle',
        'block_border_width' => 'getBlockBorderWidth',
        'block_padding_bottom' => 'getBlockPaddingBottom',
        'block_padding_left' => 'getBlockPaddingLeft',
        'block_padding_right' => 'getBlockPaddingRight',
        'block_padding_top' => 'getBlockPaddingTop',
        'color' => 'getColor',
        'extra_css_class' => 'getExtraCssClass',
        'font_family' => 'getFontFamily',
        'font_size' => 'getFontSize',
        'font_style' => 'getFontStyle',
        'font_weight' => 'getFontWeight',
        'inner_padding_bottom' => 'getInnerPaddingBottom',
        'inner_padding_left' => 'getInnerPaddingLeft',
        'inner_padding_right' => 'getInnerPaddingRight',
        'inner_padding_top' => 'getInnerPaddingTop',
        'letter_spacing' => 'getLetterSpacing',
        'line_height' => 'getLineHeight',
        'mobile_stretch_content' => 'getMobileStretchContent',
        'text_align' => 'getTextAlign',
        'text_decoration' => 'getTextDecoration',
        'text_table_layout' => 'getTextTableLayout'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$openAPIModelName;
    }

    public const BLOCK_BORDER_STYLE_DASHED = 'dashed';
    public const BLOCK_BORDER_STYLE_DOTTED = 'dotted';
    public const BLOCK_BORDER_STYLE_GROOVE = 'groove';
    public const BLOCK_BORDER_STYLE_INSET = 'inset';
    public const BLOCK_BORDER_STYLE_NONE = 'none';
    public const BLOCK_BORDER_STYLE_OUTSET = 'outset';
    public const BLOCK_BORDER_STYLE_RIDGE = 'ridge';
    public const BLOCK_BORDER_STYLE_SOLID = 'solid';
    public const FONT_STYLE_ITALIC = 'italic';
    public const FONT_STYLE_NORMAL = 'normal';
    public const TEXT_ALIGN_CENTER = 'center';
    public const TEXT_ALIGN_LEFT = 'left';
    public const TEXT_ALIGN_RIGHT = 'right';
    public const TEXT_TABLE_LAYOUT_AUTO = 'auto';
    public const TEXT_TABLE_LAYOUT_FIXED = 'fixed';
    public const TEXT_TABLE_LAYOUT_INHERIT = 'inherit';
    public const TEXT_TABLE_LAYOUT_INITIAL = 'initial';

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getBlockBorderStyleAllowableValues()
    {
        return [
            self::BLOCK_BORDER_STYLE_DASHED,
            self::BLOCK_BORDER_STYLE_DOTTED,
            self::BLOCK_BORDER_STYLE_GROOVE,
            self::BLOCK_BORDER_STYLE_INSET,
            self::BLOCK_BORDER_STYLE_NONE,
            self::BLOCK_BORDER_STYLE_OUTSET,
            self::BLOCK_BORDER_STYLE_RIDGE,
            self::BLOCK_BORDER_STYLE_SOLID,
        ];
    }

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getFontStyleAllowableValues()
    {
        return [
            self::FONT_STYLE_ITALIC,
            self::FONT_STYLE_NORMAL,
        ];
    }

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getTextAlignAllowableValues()
    {
        return [
            self::TEXT_ALIGN_CENTER,
            self::TEXT_ALIGN_LEFT,
            self::TEXT_ALIGN_RIGHT,
        ];
    }

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getTextTableLayoutAllowableValues()
    {
        return [
            self::TEXT_TABLE_LAYOUT_AUTO,
            self::TEXT_TABLE_LAYOUT_FIXED,
            self::TEXT_TABLE_LAYOUT_INHERIT,
            self::TEXT_TABLE_LAYOUT_INITIAL,
        ];
    }

    /**
     * Associative array for storing property values
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->setIfExists('background_color', $data ?? [], null);
        $this->setIfExists('block_background_color', $data ?? [], null);
        $this->setIfExists('block_border_color', $data ?? [], null);
        $this->setIfExists('block_border_style', $data ?? [], null);
        $this->setIfExists('block_border_width', $data ?? [], null);
        $this->setIfExists('block_padding_bottom', $data ?? [], null);
        $this->setIfExists('block_padding_left', $data ?? [], null);
        $this->setIfExists('block_padding_right', $data ?? [], null);
        $this->setIfExists('block_padding_top', $data ?? [], null);
        $this->setIfExists('color', $data ?? [], null);
        $this->setIfExists('extra_css_class', $data ?? [], null);
        $this->setIfExists('font_family', $data ?? [], null);
        $this->setIfExists('font_size', $data ?? [], null);
        $this->setIfExists('font_style', $data ?? [], null);
        $this->setIfExists('font_weight', $data ?? [], null);
        $this->setIfExists('inner_padding_bottom', $data ?? [], null);
        $this->setIfExists('inner_padding_left', $data ?? [], null);
        $this->setIfExists('inner_padding_right', $data ?? [], null);
        $this->setIfExists('inner_padding_top', $data ?? [], null);
        $this->setIfExists('letter_spacing', $data ?? [], null);
        $this->setIfExists('line_height', $data ?? [], null);
        $this->setIfExists('mobile_stretch_content', $data ?? [], null);
        $this->setIfExists('text_align', $data ?? [], null);
        $this->setIfExists('text_decoration', $data ?? [], null);
        $this->setIfExists('text_table_layout', $data ?? [], null);
    }

    /**
    * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
    * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
    * $this->openAPINullablesSetToNull array
    *
    * @param string $variableName
    * @param array  $fields
    * @param mixed  $defaultValue
    */
    private function setIfExists(string $variableName, array $fields, $defaultValue): void
    {
        if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
            $this->openAPINullablesSetToNull[] = $variableName;
        }

        $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        $allowedValues = $this->getBlockBorderStyleAllowableValues();
        if (!is_null($this->container['block_border_style']) && !in_array($this->container['block_border_style'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value '%s' for 'block_border_style', must be one of '%s'",
                $this->container['block_border_style'],
                implode("', '", $allowedValues)
            );
        }

        $allowedValues = $this->getFontStyleAllowableValues();
        if (!is_null($this->container['font_style']) && !in_array($this->container['font_style'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value '%s' for 'font_style', must be one of '%s'",
                $this->container['font_style'],
                implode("', '", $allowedValues)
            );
        }

        $allowedValues = $this->getTextAlignAllowableValues();
        if (!is_null($this->container['text_align']) && !in_array($this->container['text_align'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value '%s' for 'text_align', must be one of '%s'",
                $this->container['text_align'],
                implode("', '", $allowedValues)
            );
        }

        $allowedValues = $this->getTextTableLayoutAllowableValues();
        if (!is_null($this->container['text_table_layout']) && !in_array($this->container['text_table_layout'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value '%s' for 'text_table_layout', must be one of '%s'",
                $this->container['text_table_layout'],
                implode("', '", $allowedValues)
            );
        }

        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets background_color
     *
     * @return string|null
     */
    public function getBackgroundColor()
    {
        return $this->container['background_color'];
    }

    /**
     * Sets background_color
     *
     * @param string|null $background_color background_color
     *
     * @return self
     */
    public function setBackgroundColor($background_color)
    {

        if (is_null($background_color)) {
            array_push($this->openAPINullablesSetToNull, 'background_color');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('background_color', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['background_color'] = $background_color;

        return $this;
    }

    /**
     * Gets block_background_color
     *
     * @return string|null
     */
    public function getBlockBackgroundColor()
    {
        return $this->container['block_background_color'];
    }

    /**
     * Sets block_background_color
     *
     * @param string|null $block_background_color block_background_color
     *
     * @return self
     */
    public function setBlockBackgroundColor($block_background_color)
    {

        if (is_null($block_background_color)) {
            array_push($this->openAPINullablesSetToNull, 'block_background_color');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('block_background_color', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['block_background_color'] = $block_background_color;

        return $this;
    }

    /**
     * Gets block_border_color
     *
     * @return string|null
     */
    public function getBlockBorderColor()
    {
        return $this->container['block_border_color'];
    }

    /**
     * Sets block_border_color
     *
     * @param string|null $block_border_color block_border_color
     *
     * @return self
     */
    public function setBlockBorderColor($block_border_color)
    {

        if (is_null($block_border_color)) {
            array_push($this->openAPINullablesSetToNull, 'block_border_color');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('block_border_color', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['block_border_color'] = $block_border_color;

        return $this;
    }

    /**
     * Gets block_border_style
     *
     * @return string|null
     */
    public function getBlockBorderStyle()
    {
        return $this->container['block_border_style'];
    }

    /**
     * Sets block_border_style
     *
     * @param string|null $block_border_style Border style.
     *
     * @return self
     */
    public function setBlockBorderStyle($block_border_style)
    {
        $allowedValues = $this->getBlockBorderStyleAllowableValues();
        if (!is_null($block_border_style) && !in_array($block_border_style, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value '%s' for 'block_border_style', must be one of '%s'",
                    $block_border_style,
                    implode("', '", $allowedValues)
                )
            );
        }

        if (is_null($block_border_style)) {
            array_push($this->openAPINullablesSetToNull, 'block_border_style');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('block_border_style', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['block_border_style'] = $block_border_style;

        return $this;
    }

    /**
     * Gets block_border_width
     *
     * @return int|null
     */
    public function getBlockBorderWidth()
    {
        return $this->container['block_border_width'];
    }

    /**
     * Sets block_border_width
     *
     * @param int|null $block_border_width block_border_width
     *
     * @return self
     */
    public function setBlockBorderWidth($block_border_width)
    {

        if (is_null($block_border_width)) {
            array_push($this->openAPINullablesSetToNull, 'block_border_width');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('block_border_width', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['block_border_width'] = $block_border_width;

        return $this;
    }

    /**
     * Gets block_padding_bottom
     *
     * @return int|null
     */
    public function getBlockPaddingBottom()
    {
        return $this->container['block_padding_bottom'];
    }

    /**
     * Sets block_padding_bottom
     *
     * @param int|null $block_padding_bottom block_padding_bottom
     *
     * @return self
     */
    public function setBlockPaddingBottom($block_padding_bottom)
    {

        if (is_null($block_padding_bottom)) {
            array_push($this->openAPINullablesSetToNull, 'block_padding_bottom');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('block_padding_bottom', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['block_padding_bottom'] = $block_padding_bottom;

        return $this;
    }

    /**
     * Gets block_padding_left
     *
     * @return int|null
     */
    public function getBlockPaddingLeft()
    {
        return $this->container['block_padding_left'];
    }

    /**
     * Sets block_padding_left
     *
     * @param int|null $block_padding_left block_padding_left
     *
     * @return self
     */
    public function setBlockPaddingLeft($block_padding_left)
    {

        if (is_null($block_padding_left)) {
            array_push($this->openAPINullablesSetToNull, 'block_padding_left');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('block_padding_left', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['block_padding_left'] = $block_padding_left;

        return $this;
    }

    /**
     * Gets block_padding_right
     *
     * @return int|null
     */
    public function getBlockPaddingRight()
    {
        return $this->container['block_padding_right'];
    }

    /**
     * Sets block_padding_right
     *
     * @param int|null $block_padding_right block_padding_right
     *
     * @return self
     */
    public function setBlockPaddingRight($block_padding_right)
    {

        if (is_null($block_padding_right)) {
            array_push($this->openAPINullablesSetToNull, 'block_padding_right');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('block_padding_right', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['block_padding_right'] = $block_padding_right;

        return $this;
    }

    /**
     * Gets block_padding_top
     *
     * @return int|null
     */
    public function getBlockPaddingTop()
    {
        return $this->container['block_padding_top'];
    }

    /**
     * Sets block_padding_top
     *
     * @param int|null $block_padding_top block_padding_top
     *
     * @return self
     */
    public function setBlockPaddingTop($block_padding_top)
    {

        if (is_null($block_padding_top)) {
            array_push($this->openAPINullablesSetToNull, 'block_padding_top');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('block_padding_top', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['block_padding_top'] = $block_padding_top;

        return $this;
    }

    /**
     * Gets color
     *
     * @return string|null
     */
    public function getColor()
    {
        return $this->container['color'];
    }

    /**
     * Sets color
     *
     * @param string|null $color color
     *
     * @return self
     */
    public function setColor($color)
    {

        if (is_null($color)) {
            array_push($this->openAPINullablesSetToNull, 'color');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('color', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['color'] = $color;

        return $this;
    }

    /**
     * Gets extra_css_class
     *
     * @return string|null
     */
    public function getExtraCssClass()
    {
        return $this->container['extra_css_class'];
    }

    /**
     * Sets extra_css_class
     *
     * @param string|null $extra_css_class extra_css_class
     *
     * @return self
     */
    public function setExtraCssClass($extra_css_class)
    {

        if (is_null($extra_css_class)) {
            array_push($this->openAPINullablesSetToNull, 'extra_css_class');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('extra_css_class', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['extra_css_class'] = $extra_css_class;

        return $this;
    }

    /**
     * Gets font_family
     *
     * @return string|null
     */
    public function getFontFamily()
    {
        return $this->container['font_family'];
    }

    /**
     * Sets font_family
     *
     * @param string|null $font_family font_family
     *
     * @return self
     */
    public function setFontFamily($font_family)
    {

        if (is_null($font_family)) {
            array_push($this->openAPINullablesSetToNull, 'font_family');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('font_family', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['font_family'] = $font_family;

        return $this;
    }

    /**
     * Gets font_size
     *
     * @return int|null
     */
    public function getFontSize()
    {
        return $this->container['font_size'];
    }

    /**
     * Sets font_size
     *
     * @param int|null $font_size font_size
     *
     * @return self
     */
    public function setFontSize($font_size)
    {

        if (is_null($font_size)) {
            array_push($this->openAPINullablesSetToNull, 'font_size');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('font_size', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['font_size'] = $font_size;

        return $this;
    }

    /**
     * Gets font_style
     *
     * @return string|null
     */
    public function getFontStyle()
    {
        return $this->container['font_style'];
    }

    /**
     * Sets font_style
     *
     * @param string|null $font_style Font style.
     *
     * @return self
     */
    public function setFontStyle($font_style)
    {
        $allowedValues = $this->getFontStyleAllowableValues();
        if (!is_null($font_style) && !in_array($font_style, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value '%s' for 'font_style', must be one of '%s'",
                    $font_style,
                    implode("', '", $allowedValues)
                )
            );
        }

        if (is_null($font_style)) {
            array_push($this->openAPINullablesSetToNull, 'font_style');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('font_style', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['font_style'] = $font_style;

        return $this;
    }

    /**
     * Gets font_weight
     *
     * @return string|null
     */
    public function getFontWeight()
    {
        return $this->container['font_weight'];
    }

    /**
     * Sets font_weight
     *
     * @param string|null $font_weight font_weight
     *
     * @return self
     */
    public function setFontWeight($font_weight)
    {

        if (is_null($font_weight)) {
            array_push($this->openAPINullablesSetToNull, 'font_weight');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('font_weight', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['font_weight'] = $font_weight;

        return $this;
    }

    /**
     * Gets inner_padding_bottom
     *
     * @return int|null
     */
    public function getInnerPaddingBottom()
    {
        return $this->container['inner_padding_bottom'];
    }

    /**
     * Sets inner_padding_bottom
     *
     * @param int|null $inner_padding_bottom inner_padding_bottom
     *
     * @return self
     */
    public function setInnerPaddingBottom($inner_padding_bottom)
    {

        if (is_null($inner_padding_bottom)) {
            array_push($this->openAPINullablesSetToNull, 'inner_padding_bottom');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('inner_padding_bottom', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['inner_padding_bottom'] = $inner_padding_bottom;

        return $this;
    }

    /**
     * Gets inner_padding_left
     *
     * @return int|null
     */
    public function getInnerPaddingLeft()
    {
        return $this->container['inner_padding_left'];
    }

    /**
     * Sets inner_padding_left
     *
     * @param int|null $inner_padding_left inner_padding_left
     *
     * @return self
     */
    public function setInnerPaddingLeft($inner_padding_left)
    {

        if (is_null($inner_padding_left)) {
            array_push($this->openAPINullablesSetToNull, 'inner_padding_left');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('inner_padding_left', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['inner_padding_left'] = $inner_padding_left;

        return $this;
    }

    /**
     * Gets inner_padding_right
     *
     * @return int|null
     */
    public function getInnerPaddingRight()
    {
        return $this->container['inner_padding_right'];
    }

    /**
     * Sets inner_padding_right
     *
     * @param int|null $inner_padding_right inner_padding_right
     *
     * @return self
     */
    public function setInnerPaddingRight($inner_padding_right)
    {

        if (is_null($inner_padding_right)) {
            array_push($this->openAPINullablesSetToNull, 'inner_padding_right');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('inner_padding_right', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['inner_padding_right'] = $inner_padding_right;

        return $this;
    }

    /**
     * Gets inner_padding_top
     *
     * @return int|null
     */
    public function getInnerPaddingTop()
    {
        return $this->container['inner_padding_top'];
    }

    /**
     * Sets inner_padding_top
     *
     * @param int|null $inner_padding_top inner_padding_top
     *
     * @return self
     */
    public function setInnerPaddingTop($inner_padding_top)
    {

        if (is_null($inner_padding_top)) {
            array_push($this->openAPINullablesSetToNull, 'inner_padding_top');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('inner_padding_top', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['inner_padding_top'] = $inner_padding_top;

        return $this;
    }

    /**
     * Gets letter_spacing
     *
     * @return int|null
     */
    public function getLetterSpacing()
    {
        return $this->container['letter_spacing'];
    }

    /**
     * Sets letter_spacing
     *
     * @param int|null $letter_spacing letter_spacing
     *
     * @return self
     */
    public function setLetterSpacing($letter_spacing)
    {

        if (is_null($letter_spacing)) {
            array_push($this->openAPINullablesSetToNull, 'letter_spacing');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('letter_spacing', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['letter_spacing'] = $letter_spacing;

        return $this;
    }

    /**
     * Gets line_height
     *
     * @return float|null
     */
    public function getLineHeight()
    {
        return $this->container['line_height'];
    }

    /**
     * Sets line_height
     *
     * @param float|null $line_height line_height
     *
     * @return self
     */
    public function setLineHeight($line_height)
    {

        if (is_null($line_height)) {
            array_push($this->openAPINullablesSetToNull, 'line_height');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('line_height', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['line_height'] = $line_height;

        return $this;
    }

    /**
     * Gets mobile_stretch_content
     *
     * @return bool|null
     */
    public function getMobileStretchContent()
    {
        return $this->container['mobile_stretch_content'];
    }

    /**
     * Sets mobile_stretch_content
     *
     * @param bool|null $mobile_stretch_content mobile_stretch_content
     *
     * @return self
     */
    public function setMobileStretchContent($mobile_stretch_content)
    {

        if (is_null($mobile_stretch_content)) {
            array_push($this->openAPINullablesSetToNull, 'mobile_stretch_content');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('mobile_stretch_content', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['mobile_stretch_content'] = $mobile_stretch_content;

        return $this;
    }

    /**
     * Gets text_align
     *
     * @return string|null
     */
    public function getTextAlign()
    {
        return $this->container['text_align'];
    }

    /**
     * Sets text_align
     *
     * @param string|null $text_align Text Alignment.
     *
     * @return self
     */
    public function setTextAlign($text_align)
    {
        $allowedValues = $this->getTextAlignAllowableValues();
        if (!is_null($text_align) && !in_array($text_align, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value '%s' for 'text_align', must be one of '%s'",
                    $text_align,
                    implode("', '", $allowedValues)
                )
            );
        }

        if (is_null($text_align)) {
            array_push($this->openAPINullablesSetToNull, 'text_align');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('text_align', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['text_align'] = $text_align;

        return $this;
    }

    /**
     * Gets text_decoration
     *
     * @return string|null
     */
    public function getTextDecoration()
    {
        return $this->container['text_decoration'];
    }

    /**
     * Sets text_decoration
     *
     * @param string|null $text_decoration text_decoration
     *
     * @return self
     */
    public function setTextDecoration($text_decoration)
    {

        if (is_null($text_decoration)) {
            array_push($this->openAPINullablesSetToNull, 'text_decoration');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('text_decoration', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['text_decoration'] = $text_decoration;

        return $this;
    }

    /**
     * Gets text_table_layout
     *
     * @return string|null
     */
    public function getTextTableLayout()
    {
        return $this->container['text_table_layout'];
    }

    /**
     * Sets text_table_layout
     *
     * @param string|null $text_table_layout Text table layout.
     *
     * @return self
     */
    public function setTextTableLayout($text_table_layout)
    {
        $allowedValues = $this->getTextTableLayoutAllowableValues();
        if (!is_null($text_table_layout) && !in_array($text_table_layout, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value '%s' for 'text_table_layout', must be one of '%s'",
                    $text_table_layout,
                    implode("', '", $allowedValues)
                )
            );
        }

        if (is_null($text_table_layout)) {
            array_push($this->openAPINullablesSetToNull, 'text_table_layout');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('text_table_layout', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }

        $this->container['text_table_layout'] = $text_table_layout;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    public function offsetExists($offset): bool
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed|null
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return $this->container[$offset] ?? null;
    }

    /**
     * Sets value based on offset.
     *
     * @param int|null $offset Offset
     * @param mixed    $value  Value to be set
     *
     * @return void
     */
    public function offsetSet($offset, $value): void
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    public function offsetUnset($offset): void
    {
        unset($this->container[$offset]);
    }

    /**
     * Serializes the object to a value that can be serialized natively by json_encode().
     * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
     *
     * @return mixed Returns data which can be serialized by json_encode(), which is a value
     * of any type other than a resource.
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
       return ObjectSerializer::sanitizeForSerialization($this);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        return json_encode(
            ObjectSerializer::sanitizeForSerialization($this),
            JSON_PRETTY_PRINT
        );
    }

    /**
     * Gets a header-safe presentation of the object
     *
     * @return string
     */
    public function toHeaderValue()
    {
        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}


