<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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