<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PricingPref StructType
 * @package Dg
 * @subpackage Structs
 */
class DgPricingPref extends AbstractStructBase
{
    /**
     * The Type
     * Meta informations extracted from the WSDL
     * - use: required
     * @var string
     */
    public $Type;
    /**
     * The ExcludeInd
     * @var bool
     */
    public $ExcludeInd;
    /**
     * Constructor method for PricingPref
     * @uses DgPricingPref::setType()
     * @uses DgPricingPref::setExcludeInd()
     * @param string $type
     * @param bool $excludeInd
     */
    public function __construct($type = null, $excludeInd = null)
    {
        $this
            ->setType($type)
            ->setExcludeInd($excludeInd);
    }
    /**
     * Get Type value
     * @return string
     */
    public function getType()
    {
        return $this->Type;
    }
    /**
     * Set Type value
     * @param string $type
     * @return \dgsoft\StructType\DgPricingPref
     */
    public function setType($type = null)
    {
        // validation for constraint: string
        if (!is_null($type) && !is_string($type)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($type)), __LINE__);
        }
        $this->Type = $type;
        return $this;
    }
    /**
     * Get ExcludeInd value
     * @return bool|null
     */
    public function getExcludeInd()
    {
        return $this->ExcludeInd;
    }
    /**
     * Set ExcludeInd value
     * @param bool $excludeInd
     * @return \dgsoft\StructType\DgPricingPref
     */
    public function setExcludeInd($excludeInd = null)
    {
        // validation for constraint: boolean
        if (!is_null($excludeInd) && !is_bool($excludeInd)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($excludeInd)), __LINE__);
        }
        $this->ExcludeInd = $excludeInd;
        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 \dgsoft\StructType\DgPricingPref
     */
    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__;
    }
}
