<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for KeyValueOfstringDateTimeOffsetU6ho3Bhd StructType
 * @subpackage Structs
 */
class KeyValueOfstringDateTimeOffsetU6ho3Bhd extends AbstractStructBase
{
    /**
     * The Key
     * Meta information extracted from the WSDL
     * - nillable: true
     * @var string
     */
    public $Key;
    /**
     * The Value
     * @var \patest\StructType\DateTimeOffset
     */
    public $Value;
    /**
     * Constructor method for KeyValueOfstringDateTimeOffsetU6ho3Bhd
     * @uses KeyValueOfstringDateTimeOffsetU6ho3Bhd::setKey()
     * @uses KeyValueOfstringDateTimeOffsetU6ho3Bhd::setValue()
     * @param string $key
     * @param \patest\StructType\DateTimeOffset $value
     */
    public function __construct($key = null, \patest\StructType\DateTimeOffset $value = null)
    {
        $this
            ->setKey($key)
            ->setValue($value);
    }
    /**
     * Get Key value
     * @return string|null
     */
    public function getKey()
    {
        return $this->Key;
    }
    /**
     * Set Key value
     * @param string $key
     * @return \patest\StructType\KeyValueOfstringDateTimeOffsetU6ho3Bhd
     */
    public function setKey($key = null)
    {
        // validation for constraint: string
        if (!is_null($key) && !is_string($key)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($key, true), gettype($key)), __LINE__);
        }
        $this->Key = $key;
        return $this;
    }
    /**
     * Get Value value
     * @return \patest\StructType\DateTimeOffset|null
     */
    public function getValue()
    {
        return $this->Value;
    }
    /**
     * Set Value value
     * @param \patest\StructType\DateTimeOffset $value
     * @return \patest\StructType\KeyValueOfstringDateTimeOffsetU6ho3Bhd
     */
    public function setValue(\patest\StructType\DateTimeOffset $value = null)
    {
        $this->Value = $value;
        return $this;
    }
}
