<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_LargeFamilyDiscount StructType
 * @subpackage Structs
 */
class JP_LargeFamilyDiscount extends AbstractStructBase
{
    /**
     * The _
     * @var string
     */
    public $_;
    /**
     * The Type
     * @var string
     */
    public $Type;
    /**
     * The Code
     * @var string
     */
    public $Code;
    /**
     * The AutonomousCommunity
     * @var string
     */
    public $AutonomousCommunity;
    /**
     * Constructor method for JP_LargeFamilyDiscount
     * @uses JP_LargeFamilyDiscount::set_()
     * @uses JP_LargeFamilyDiscount::setType()
     * @uses JP_LargeFamilyDiscount::setCode()
     * @uses JP_LargeFamilyDiscount::setAutonomousCommunity()
     * @param string $_
     * @param string $type
     * @param string $code
     * @param string $autonomousCommunity
     */
    public function __construct($_ = null, $type = null, $code = null, $autonomousCommunity = null)
    {
        $this
            ->set_($_)
            ->setType($type)
            ->setCode($code)
            ->setAutonomousCommunity($autonomousCommunity);
    }
    /**
     * Get _ value
     * @return string|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param string $_
     * @return \StructType\JP_LargeFamilyDiscount
     */
    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 Type value
     * @return string|null
     */
    public function getType()
    {
        return $this->Type;
    }
    /**
     * Set Type value
     * @param string $type
     * @return \StructType\JP_LargeFamilyDiscount
     */
    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 Code value
     * @return string|null
     */
    public function getCode()
    {
        return $this->Code;
    }
    /**
     * Set Code value
     * @param string $code
     * @return \StructType\JP_LargeFamilyDiscount
     */
    public function setCode($code = null)
    {
        // validation for constraint: string
        if (!is_null($code) && !is_string($code)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($code, true), gettype($code)), __LINE__);
        }
        $this->Code = $code;
        return $this;
    }
    /**
     * Get AutonomousCommunity value
     * @return string|null
     */
    public function getAutonomousCommunity()
    {
        return $this->AutonomousCommunity;
    }
    /**
     * Set AutonomousCommunity value
     * @param string $autonomousCommunity
     * @return \StructType\JP_LargeFamilyDiscount
     */
    public function setAutonomousCommunity($autonomousCommunity = null)
    {
        // validation for constraint: string
        if (!is_null($autonomousCommunity) && !is_string($autonomousCommunity)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($autonomousCommunity, true), gettype($autonomousCommunity)), __LINE__);
        }
        $this->AutonomousCommunity = $autonomousCommunity;
        return $this;
    }
}
