<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BookingClassPref StructType
 * @package Dg
 * @subpackage Structs
 */
class DgBookingClassPref extends AbstractStructBase
{
    /**
     * The ResBookDesigCode
     * @var string
     */
    public $ResBookDesigCode;
    /**
     * The ResBookDesigCodeType
     * @var string
     */
    public $ResBookDesigCodeType;
    /**
     * Constructor method for BookingClassPref
     * @uses DgBookingClassPref::setResBookDesigCode()
     * @uses DgBookingClassPref::setResBookDesigCodeType()
     * @param string $resBookDesigCode
     * @param string $resBookDesigCodeType
     */
    public function __construct($resBookDesigCode = null, $resBookDesigCodeType = null)
    {
        $this
            ->setResBookDesigCode($resBookDesigCode)
            ->setResBookDesigCodeType($resBookDesigCodeType);
    }
    /**
     * Get ResBookDesigCode value
     * @return string|null
     */
    public function getResBookDesigCode()
    {
        return $this->ResBookDesigCode;
    }
    /**
     * Set ResBookDesigCode value
     * @param string $resBookDesigCode
     * @return \dgsoft\StructType\DgBookingClassPref
     */
    public function setResBookDesigCode($resBookDesigCode = null)
    {
        // validation for constraint: string
        if (!is_null($resBookDesigCode) && !is_string($resBookDesigCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($resBookDesigCode)), __LINE__);
        }
        $this->ResBookDesigCode = $resBookDesigCode;
        return $this;
    }
    /**
     * Get ResBookDesigCodeType value
     * @return string|null
     */
    public function getResBookDesigCodeType()
    {
        return $this->ResBookDesigCodeType;
    }
    /**
     * Set ResBookDesigCodeType value
     * @param string $resBookDesigCodeType
     * @return \dgsoft\StructType\DgBookingClassPref
     */
    public function setResBookDesigCodeType($resBookDesigCodeType = null)
    {
        // validation for constraint: string
        if (!is_null($resBookDesigCodeType) && !is_string($resBookDesigCodeType)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($resBookDesigCodeType)), __LINE__);
        }
        $this->ResBookDesigCodeType = $resBookDesigCodeType;
        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\DgBookingClassPref
     */
    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__;
    }
}
