<?php

namespace Straxus\FarfetchSDK\Model;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetSizeHelpId Model
 * @subpackage Structs
 */
class GetSizeHelpId extends AbstractStructBase
{
    /**
     * The genderid
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $genderid;
    /**
     * The catid
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $catid;
    /**
     * The safeKey
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $safeKey;
    /**
     * Constructor method for GetSizeHelpId
     * @uses GetSizeHelpId::setGenderid()
     * @uses GetSizeHelpId::setCatid()
     * @uses GetSizeHelpId::setSafeKey()
     * @param int $genderid
     * @param int $catid
     * @param string $safeKey
     */
    public function __construct($genderid = null, $catid = null, $safeKey = null)
    {
        $this
            ->setGenderid($genderid)
            ->setCatid($catid)
            ->setSafeKey($safeKey);
    }
    /**
     * Get genderid value
     * @return int
     */
    public function getGenderid()
    {
        return $this->genderid;
    }
    /**
     * Set genderid value
     * @param int $genderid
     * @return \Straxus\FarfetchSDK\Model\GetSizeHelpId
     */
    public function setGenderid($genderid = null)
    {
        // validation for constraint: int
        if (!is_null($genderid) && !(is_int($genderid) || ctype_digit($genderid))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($genderid, true), gettype($genderid)), __LINE__);
        }
        $this->genderid = $genderid;
        return $this;
    }
    /**
     * Get catid value
     * @return int
     */
    public function getCatid()
    {
        return $this->catid;
    }
    /**
     * Set catid value
     * @param int $catid
     * @return \Straxus\FarfetchSDK\Model\GetSizeHelpId
     */
    public function setCatid($catid = null)
    {
        // validation for constraint: int
        if (!is_null($catid) && !(is_int($catid) || ctype_digit($catid))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($catid, true), gettype($catid)), __LINE__);
        }
        $this->catid = $catid;
        return $this;
    }
    /**
     * Get safeKey value
     * @return string|null
     */
    public function getSafeKey()
    {
        return $this->safeKey;
    }
    /**
     * Set safeKey value
     * @param string $safeKey
     * @return \Straxus\FarfetchSDK\Model\GetSizeHelpId
     */
    public function setSafeKey($safeKey = null)
    {
        // validation for constraint: string
        if (!is_null($safeKey) && !is_string($safeKey)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($safeKey, true), gettype($safeKey)), __LINE__);
        }
        $this->safeKey = $safeKey;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \Straxus\FarfetchSDK\Model\GetSizeHelpId
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
