<?php

namespace CustomerManagement\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for TroubleConditionWithDates StructType
 * @subpackage Structs
 */
class TroubleConditionWithDates extends AbstractStructBase
{
    /**
     * The TroubleCondition
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $TroubleCondition;
    /**
     * The StartDate
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $StartDate;
    /**
     * The EndDate
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var string
     */
    public $EndDate;
    /**
     * Constructor method for TroubleConditionWithDates
     * @uses TroubleConditionWithDates::setTroubleCondition()
     * @uses TroubleConditionWithDates::setStartDate()
     * @uses TroubleConditionWithDates::setEndDate()
     * @param string $troubleCondition
     * @param string $startDate
     * @param string $endDate
     */
    public function __construct($troubleCondition = null, $startDate = null, $endDate = null)
    {
        $this
            ->setTroubleCondition($troubleCondition)
            ->setStartDate($startDate)
            ->setEndDate($endDate);
    }
    /**
     * Get TroubleCondition value
     * @return string
     */
    public function getTroubleCondition()
    {
        return $this->TroubleCondition;
    }
    /**
     * Set TroubleCondition value
     * @uses \CustomerManagement\EnumType\TroubleConditionTypeEnum::valueIsValid()
     * @uses \CustomerManagement\EnumType\TroubleConditionTypeEnum::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $troubleCondition
     * @return \CustomerManagement\StructType\TroubleConditionWithDates
     */
    public function setTroubleCondition($troubleCondition = null)
    {
        // validation for constraint: enumeration
        if (!\CustomerManagement\EnumType\TroubleConditionTypeEnum::valueIsValid($troubleCondition)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \CustomerManagement\EnumType\TroubleConditionTypeEnum', is_array($troubleCondition) ? implode(', ', $troubleCondition) : var_export($troubleCondition, true), implode(', ', \CustomerManagement\EnumType\TroubleConditionTypeEnum::getValidValues())), __LINE__);
        }
        $this->TroubleCondition = $troubleCondition;
        return $this;
    }
    /**
     * Get StartDate value
     * @return string
     */
    public function getStartDate()
    {
        return $this->StartDate;
    }
    /**
     * Set StartDate value
     * @param string $startDate
     * @return \CustomerManagement\StructType\TroubleConditionWithDates
     */
    public function setStartDate($startDate = null)
    {
        // validation for constraint: string
        if (!is_null($startDate) && !is_string($startDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($startDate, true), gettype($startDate)), __LINE__);
        }
        $this->StartDate = $startDate;
        return $this;
    }
    /**
     * Get EndDate value
     * @return string
     */
    public function getEndDate()
    {
        return $this->EndDate;
    }
    /**
     * Set EndDate value
     * @param string $endDate
     * @return \CustomerManagement\StructType\TroubleConditionWithDates
     */
    public function setEndDate($endDate = null)
    {
        // validation for constraint: string
        if (!is_null($endDate) && !is_string($endDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($endDate, true), gettype($endDate)), __LINE__);
        }
        $this->EndDate = $endDate;
        return $this;
    }
}
