<?php
/*
 * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Iai\V20180301\Models;
use TencentCloud\Common\AbstractModel;

/**
 * 人脸属性信息,包含性别( gender )、年龄( age )、表情( expression )、 
魅力( beauty )、眼镜( glass )、口罩(mask)、头发(hair)和姿态 (pitch,roll,yaw )。只有当 NeedFaceAttributes 设为 1 时才返回有效信息,最多返回面积最大的 5 张人脸属性信息,超过 5 张人脸(第 6 张及以后的人脸)的 FaceAttributesInfo 不具备参考意义。
 *
 * @method integer getGender() 获取性别[0~49]为女性,[50,100]为男性,越接近0和100表示置信度越高。NeedFaceAttributes 不为 1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
 * @method void setGender(integer $Gender) 设置性别[0~49]为女性,[50,100]为男性,越接近0和100表示置信度越高。NeedFaceAttributes 不为 1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
 * @method integer getAge() 获取年龄 [0~100]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
 * @method void setAge(integer $Age) 设置年龄 [0~100]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
 * @method integer getExpression() 获取微笑[0(normal,正常)~50(smile,微笑)~100(laugh,大笑)]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
 * @method void setExpression(integer $Expression) 设置微笑[0(normal,正常)~50(smile,微笑)~100(laugh,大笑)]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
 * @method boolean getGlass() 获取是否有眼镜 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
 * @method void setGlass(boolean $Glass) 设置是否有眼镜 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
 * @method integer getPitch() 获取上下偏移[-30,30],单位角度。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 
建议:人脸入库选择[-10,10]的图片。
 * @method void setPitch(integer $Pitch) 设置上下偏移[-30,30],单位角度。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 
建议:人脸入库选择[-10,10]的图片。
 * @method integer getYaw() 获取左右偏移[-30,30],单位角度。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 
建议:人脸入库选择[-10,10]的图片。
 * @method void setYaw(integer $Yaw) 设置左右偏移[-30,30],单位角度。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 
建议:人脸入库选择[-10,10]的图片。
 * @method integer getRoll() 获取平面旋转[-180,180],单位角度。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。  
建议:人脸入库选择[-20,20]的图片。
 * @method void setRoll(integer $Roll) 设置平面旋转[-180,180],单位角度。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。  
建议:人脸入库选择[-20,20]的图片。
 * @method integer getBeauty() 获取魅力[0~100]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
 * @method void setBeauty(integer $Beauty) 设置魅力[0~100]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
 * @method boolean getHat() 获取是否有帽子 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
 * @method void setHat(boolean $Hat) 设置是否有帽子 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
 * @method boolean getMask() 获取是否有口罩 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
 * @method void setMask(boolean $Mask) 设置是否有口罩 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
 * @method FaceHairAttributesInfo getHair() 获取头发信息,包含头发长度(length)、有无刘海(bang)、头发颜色(color)。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
 * @method void setHair(FaceHairAttributesInfo $Hair) 设置头发信息,包含头发长度(length)、有无刘海(bang)、头发颜色(color)。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
 * @method boolean getEyeOpen() 获取双眼是否睁开 [true,false]。只要有超过一只眼睛闭眼,就返回false。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
 * @method void setEyeOpen(boolean $EyeOpen) 设置双眼是否睁开 [true,false]。只要有超过一只眼睛闭眼,就返回false。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
 */
class FaceAttributesInfo extends AbstractModel
{
    /**
     * @var integer 性别[0~49]为女性,[50,100]为男性,越接近0和100表示置信度越高。NeedFaceAttributes 不为 1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
     */
    public $Gender;

    /**
     * @var integer 年龄 [0~100]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
     */
    public $Age;

    /**
     * @var integer 微笑[0(normal,正常)~50(smile,微笑)~100(laugh,大笑)]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
     */
    public $Expression;

    /**
     * @var boolean 是否有眼镜 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
     */
    public $Glass;

    /**
     * @var integer 上下偏移[-30,30],单位角度。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 
建议:人脸入库选择[-10,10]的图片。
     */
    public $Pitch;

    /**
     * @var integer 左右偏移[-30,30],单位角度。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 
建议:人脸入库选择[-10,10]的图片。
     */
    public $Yaw;

    /**
     * @var integer 平面旋转[-180,180],单位角度。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。  
建议:人脸入库选择[-20,20]的图片。
     */
    public $Roll;

    /**
     * @var integer 魅力[0~100]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
     */
    public $Beauty;

    /**
     * @var boolean 是否有帽子 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
     */
    public $Hat;

    /**
     * @var boolean 是否有口罩 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
     */
    public $Mask;

    /**
     * @var FaceHairAttributesInfo 头发信息,包含头发长度(length)、有无刘海(bang)、头发颜色(color)。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
     */
    public $Hair;

    /**
     * @var boolean 双眼是否睁开 [true,false]。只要有超过一只眼睛闭眼,就返回false。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
     */
    public $EyeOpen;

    /**
     * @param integer $Gender 性别[0~49]为女性,[50,100]为男性,越接近0和100表示置信度越高。NeedFaceAttributes 不为 1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
     * @param integer $Age 年龄 [0~100]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
     * @param integer $Expression 微笑[0(normal,正常)~50(smile,微笑)~100(laugh,大笑)]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
     * @param boolean $Glass 是否有眼镜 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
     * @param integer $Pitch 上下偏移[-30,30],单位角度。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 
建议:人脸入库选择[-10,10]的图片。
     * @param integer $Yaw 左右偏移[-30,30],单位角度。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 
建议:人脸入库选择[-10,10]的图片。
     * @param integer $Roll 平面旋转[-180,180],单位角度。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。  
建议:人脸入库选择[-20,20]的图片。
     * @param integer $Beauty 魅力[0~100]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
     * @param boolean $Hat 是否有帽子 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
     * @param boolean $Mask 是否有口罩 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
     * @param FaceHairAttributesInfo $Hair 头发信息,包含头发长度(length)、有无刘海(bang)、头发颜色(color)。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
     * @param boolean $EyeOpen 双眼是否睁开 [true,false]。只要有超过一只眼睛闭眼,就返回false。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。
注意:此字段可能返回 null,表示取不到有效值。
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("Gender",$param) and $param["Gender"] !== null) {
            $this->Gender = $param["Gender"];
        }

        if (array_key_exists("Age",$param) and $param["Age"] !== null) {
            $this->Age = $param["Age"];
        }

        if (array_key_exists("Expression",$param) and $param["Expression"] !== null) {
            $this->Expression = $param["Expression"];
        }

        if (array_key_exists("Glass",$param) and $param["Glass"] !== null) {
            $this->Glass = $param["Glass"];
        }

        if (array_key_exists("Pitch",$param) and $param["Pitch"] !== null) {
            $this->Pitch = $param["Pitch"];
        }

        if (array_key_exists("Yaw",$param) and $param["Yaw"] !== null) {
            $this->Yaw = $param["Yaw"];
        }

        if (array_key_exists("Roll",$param) and $param["Roll"] !== null) {
            $this->Roll = $param["Roll"];
        }

        if (array_key_exists("Beauty",$param) and $param["Beauty"] !== null) {
            $this->Beauty = $param["Beauty"];
        }

        if (array_key_exists("Hat",$param) and $param["Hat"] !== null) {
            $this->Hat = $param["Hat"];
        }

        if (array_key_exists("Mask",$param) and $param["Mask"] !== null) {
            $this->Mask = $param["Mask"];
        }

        if (array_key_exists("Hair",$param) and $param["Hair"] !== null) {
            $this->Hair = new FaceHairAttributesInfo();
            $this->Hair->deserialize($param["Hair"]);
        }

        if (array_key_exists("EyeOpen",$param) and $param["EyeOpen"] !== null) {
            $this->EyeOpen = $param["EyeOpen"];
        }
    }
}