<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for KeyValueOfstringArrayOfstringty7Ep6D1 StructType
 * @subpackage Structs
 */
class KeyValueOfstringArrayOfstringty7Ep6D1 extends AbstractStructBase
{
    /**
     * The Key
     * Meta information extracted from the WSDL
     * - nillable: true
     * @var string
     */
    public $Key;
    /**
     * The Value
     * Meta information extracted from the WSDL
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfstring
     */
    public $Value;
    /**
     * Constructor method for KeyValueOfstringArrayOfstringty7Ep6D1
     * @uses KeyValueOfstringArrayOfstringty7Ep6D1::setKey()
     * @uses KeyValueOfstringArrayOfstringty7Ep6D1::setValue()
     * @param string $key
     * @param \patest\ArrayType\ArrayOfstring $value
     */
    public function __construct($key = null, \patest\ArrayType\ArrayOfstring $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\KeyValueOfstringArrayOfstringty7Ep6D1
     */
    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\ArrayType\ArrayOfstring|null
     */
    public function getValue()
    {
        return $this->Value;
    }
    /**
     * Set Value value
     * @param \patest\ArrayType\ArrayOfstring $value
     * @return \patest\StructType\KeyValueOfstringArrayOfstringty7Ep6D1
     */
    public function setValue(\patest\ArrayType\ArrayOfstring $value = null)
    {
        $this->Value = $value;
        return $this;
    }
}
