<?php

// This file is auto-generated, don't edit it. Thanks.

namespace AlibabaCloud\SDK\Live\V20161101\Models\DescribeCasterComponentsResponseBody\components\component;

use AlibabaCloud\Dara\Model;

class textLayerContent extends Model
{
    /**
     * @var string
     */
    public $borderColor;

    /**
     * @var float
     */
    public $borderWidthNormalized;

    /**
     * @var string
     */
    public $color;

    /**
     * @var string
     */
    public $fontName;

    /**
     * @var float
     */
    public $sizeNormalized;

    /**
     * @var string
     */
    public $text;
    protected $_name = [
        'borderColor' => 'BorderColor',
        'borderWidthNormalized' => 'BorderWidthNormalized',
        'color' => 'Color',
        'fontName' => 'FontName',
        'sizeNormalized' => 'SizeNormalized',
        'text' => 'Text',
    ];

    public function validate()
    {
        parent::validate();
    }

    public function toArray($noStream = false)
    {
        $res = [];
        if (null !== $this->borderColor) {
            $res['BorderColor'] = $this->borderColor;
        }

        if (null !== $this->borderWidthNormalized) {
            $res['BorderWidthNormalized'] = $this->borderWidthNormalized;
        }

        if (null !== $this->color) {
            $res['Color'] = $this->color;
        }

        if (null !== $this->fontName) {
            $res['FontName'] = $this->fontName;
        }

        if (null !== $this->sizeNormalized) {
            $res['SizeNormalized'] = $this->sizeNormalized;
        }

        if (null !== $this->text) {
            $res['Text'] = $this->text;
        }

        return $res;
    }

    public function toMap($noStream = false)
    {
        return $this->toArray($noStream);
    }

    public static function fromMap($map = [])
    {
        $model = new self();
        if (isset($map['BorderColor'])) {
            $model->borderColor = $map['BorderColor'];
        }

        if (isset($map['BorderWidthNormalized'])) {
            $model->borderWidthNormalized = $map['BorderWidthNormalized'];
        }

        if (isset($map['Color'])) {
            $model->color = $map['Color'];
        }

        if (isset($map['FontName'])) {
            $model->fontName = $map['FontName'];
        }

        if (isset($map['SizeNormalized'])) {
            $model->sizeNormalized = $map['SizeNormalized'];
        }

        if (isset($map['Text'])) {
            $model->text = $map['Text'];
        }

        return $model;
    }
}
