<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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