<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_Feature StructType
 * @subpackage Structs
 */
class JP_Feature extends AbstractStructBase
{
    /**
     * The _
     * @var string
     */
    public $_;
    /**
     * The Code
     * @var int
     */
    public $Code;
    /**
     * The Type
     * @var string
     */
    public $Type;
    /**
     * The Value
     * @var string
     */
    public $Value;
    /**
     * The SubTypeCode
     * @var string
     */
    public $SubTypeCode;
    /**
     * Constructor method for JP_Feature
     * @uses JP_Feature::set_()
     * @uses JP_Feature::setCode()
     * @uses JP_Feature::setType()
     * @uses JP_Feature::setValue()
     * @uses JP_Feature::setSubTypeCode()
     * @param string $_
     * @param int $code
     * @param string $type
     * @param string $value
     * @param string $subTypeCode
     */
    public function __construct($_ = null, $code = null, $type = null, $value = null, $subTypeCode = null)
    {
        $this
            ->set_($_)
            ->setCode($code)
            ->setType($type)
            ->setValue($value)
            ->setSubTypeCode($subTypeCode);
    }
    /**
     * Get _ value
     * @return string|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param string $_
     * @return \StructType\JP_Feature
     */
    public function set_($_ = null)
    {
        // validation for constraint: string
        if (!is_null($_) && !is_string($_)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($_, true), gettype($_)), __LINE__);
        }
        $this->_ = $_;
        return $this;
    }
    /**
     * Get Code value
     * @return int|null
     */
    public function getCode()
    {
        return $this->Code;
    }
    /**
     * Set Code value
     * @param int $code
     * @return \StructType\JP_Feature
     */
    public function setCode($code = null)
    {
        // validation for constraint: int
        if (!is_null($code) && !(is_int($code) || ctype_digit($code))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($code, true), gettype($code)), __LINE__);
        }
        $this->Code = $code;
        return $this;
    }
    /**
     * Get Type value
     * @return string|null
     */
    public function getType()
    {
        return $this->Type;
    }
    /**
     * Set Type value
     * @param string $type
     * @return \StructType\JP_Feature
     */
    public function setType($type = null)
    {
        // validation for constraint: string
        if (!is_null($type) && !is_string($type)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($type, true), gettype($type)), __LINE__);
        }
        $this->Type = $type;
        return $this;
    }
    /**
     * Get Value value
     * @return string|null
     */
    public function getValue()
    {
        return $this->Value;
    }
    /**
     * Set Value value
     * @param string $value
     * @return \StructType\JP_Feature
     */
    public function setValue($value = null)
    {
        // validation for constraint: string
        if (!is_null($value) && !is_string($value)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($value, true), gettype($value)), __LINE__);
        }
        $this->Value = $value;
        return $this;
    }
    /**
     * Get SubTypeCode value
     * @return string|null
     */
    public function getSubTypeCode()
    {
        return $this->SubTypeCode;
    }
    /**
     * Set SubTypeCode value
     * @param string $subTypeCode
     * @return \StructType\JP_Feature
     */
    public function setSubTypeCode($subTypeCode = null)
    {
        // validation for constraint: string
        if (!is_null($subTypeCode) && !is_string($subTypeCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($subTypeCode, true), gettype($subTypeCode)), __LINE__);
        }
        $this->SubTypeCode = $subTypeCode;
        return $this;
    }
}
