<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_FirstDayCostCancellation StructType
 * @subpackage Structs
 */
class JP_FirstDayCostCancellation extends AbstractStructBase
{
    /**
     * The _
     * @var string
     */
    public $_;
    /**
     * The Hour
     * @var string
     */
    public $Hour;
    /**
     * Constructor method for JP_FirstDayCostCancellation
     * @uses JP_FirstDayCostCancellation::set_()
     * @uses JP_FirstDayCostCancellation::setHour()
     * @param string $_
     * @param string $hour
     */
    public function __construct($_ = null, $hour = null)
    {
        $this
            ->set_($_)
            ->setHour($hour);
    }
    /**
     * Get _ value
     * @return string|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param string $_
     * @return \StructType\JP_FirstDayCostCancellation
     */
    public function set_($_ = null)
    {
        // validation for constraint: string
        if (!is_null($_) && !is_string($_)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($_, true), gettype($_)), __LINE__);
        }
        $this->_ = $_;
        return $this;
    }
    /**
     * Get Hour value
     * @return string|null
     */
    public function getHour()
    {
        return $this->Hour;
    }
    /**
     * Set Hour value
     * @param string $hour
     * @return \StructType\JP_FirstDayCostCancellation
     */
    public function setHour($hour = null)
    {
        // validation for constraint: string
        if (!is_null($hour) && !is_string($hour)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($hour, true), gettype($hour)), __LINE__);
        }
        $this->Hour = $hour;
        return $this;
    }
}
