<?php

namespace GlsApi\Struct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for cParcelShop2OpeningHours Struct
 * @subpackage Structs
 */
class CParcelShop2OpeningHours extends AbstractStructBase
{
    /**
     * The day
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $day;
    /**
     * The open
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $open;
    /**
     * The close
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $close;
    /**
     * Constructor method for cParcelShop2OpeningHours
     * @uses CParcelShop2OpeningHours::setDay()
     * @uses CParcelShop2OpeningHours::setOpen()
     * @uses CParcelShop2OpeningHours::setClose()
     * @param int $day
     * @param string $open
     * @param string $close
     */
    public function __construct($day = null, $open = null, $close = null)
    {
        $this
            ->setDay($day)
            ->setOpen($open)
            ->setClose($close);
    }
    /**
     * Get day value
     * @return int
     */
    public function getDay()
    {
        return $this->day;
    }
    /**
     * Set day value
     * @param int $day
     * @return \GlsApi\Struct\CParcelShop2OpeningHours
     */
    public function setDay($day = null)
    {
        // validation for constraint: int
        if (!is_null($day) && !(is_int($day) || ctype_digit($day))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($day, true), gettype($day)), __LINE__);
        }
        $this->day = $day;
        return $this;
    }
    /**
     * Get open value
     * @return string
     */
    public function getOpen()
    {
        return $this->open;
    }
    /**
     * Set open value
     * @param string $open
     * @return \GlsApi\Struct\CParcelShop2OpeningHours
     */
    public function setOpen($open = null)
    {
        // validation for constraint: string
        if (!is_null($open) && !is_string($open)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($open, true), gettype($open)), __LINE__);
        }
        $this->open = $open;
        return $this;
    }
    /**
     * Get close value
     * @return string
     */
    public function getClose()
    {
        return $this->close;
    }
    /**
     * Set close value
     * @param string $close
     * @return \GlsApi\Struct\CParcelShop2OpeningHours
     */
    public function setClose($close = null)
    {
        // validation for constraint: string
        if (!is_null($close) && !is_string($close)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($close, true), gettype($close)), __LINE__);
        }
        $this->close = $close;
        return $this;
    }
}
