<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_RequestDiscount StructType
 * @subpackage Structs
 */
class JP_RequestDiscount extends AbstractStructBase
{
    /**
     * The Resident
     * @var bool
     */
    public $Resident;
    /**
     * Constructor method for JP_RequestDiscount
     * @uses JP_RequestDiscount::setResident()
     * @param bool $resident
     */
    public function __construct($resident = null)
    {
        $this
            ->setResident($resident);
    }
    /**
     * Get Resident value
     * @return bool|null
     */
    public function getResident()
    {
        return $this->Resident;
    }
    /**
     * Set Resident value
     * @param bool $resident
     * @return \StructType\JP_RequestDiscount
     */
    public function setResident($resident = null)
    {
        // validation for constraint: boolean
        if (!is_null($resident) && !is_bool($resident)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($resident, true), gettype($resident)), __LINE__);
        }
        $this->Resident = $resident;
        return $this;
    }
}
