<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for OpeningHours StructType
 * @subpackage Structs
 */
class OpeningHours extends AbstractStructBase
{
    /**
     * The AM
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\TimeInterval
     */
    public $AM;
    /**
     * The PM
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\TimeInterval
     */
    public $PM;
    /**
     * The Remarks
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Remarks;
    /**
     * Constructor method for OpeningHours
     * @uses OpeningHours::setAM()
     * @uses OpeningHours::setPM()
     * @uses OpeningHours::setRemarks()
     * @param \StructType\TimeInterval $aM
     * @param \StructType\TimeInterval $pM
     * @param string $remarks
     */
    public function __construct(\StructType\TimeInterval $aM = null, \StructType\TimeInterval $pM = null, $remarks = null)
    {
        $this
            ->setAM($aM)
            ->setPM($pM)
            ->setRemarks($remarks);
    }
    /**
     * Get AM value
     * @return \StructType\TimeInterval|null
     */
    public function getAM()
    {
        return $this->AM;
    }
    /**
     * Set AM value
     * @param \StructType\TimeInterval $aM
     * @return \StructType\OpeningHours
     */
    public function setAM(\StructType\TimeInterval $aM = null)
    {
        $this->AM = $aM;
        return $this;
    }
    /**
     * Get PM value
     * @return \StructType\TimeInterval|null
     */
    public function getPM()
    {
        return $this->PM;
    }
    /**
     * Set PM value
     * @param \StructType\TimeInterval $pM
     * @return \StructType\OpeningHours
     */
    public function setPM(\StructType\TimeInterval $pM = null)
    {
        $this->PM = $pM;
        return $this;
    }
    /**
     * Get Remarks value
     * @return string|null
     */
    public function getRemarks()
    {
        return $this->Remarks;
    }
    /**
     * Set Remarks value
     * @param string $remarks
     * @return \StructType\OpeningHours
     */
    public function setRemarks($remarks = null)
    {
        // validation for constraint: string
        if (!is_null($remarks) && !is_string($remarks)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($remarks, true), gettype($remarks)), __LINE__);
        }
        $this->Remarks = $remarks;
        return $this;
    }
}
