<?php

declare(strict_types=1);

namespace Drupal\netforum\xWeb\Generated\StructType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for WebValidateResponse StructType
 * @subpackage Structs
 * @author Drupal NetForum xWeb PHP SDK Generator
 * @version 1.0.0
 * @license GPL-2.0-or-later https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * @see https://www.drupal.org/project/netforum
 * @generatedDate 2025-08-05
 * @generatedRelease Official
 * @generatedNetForumVersion 37
 */
#[\AllowDynamicProperties]
class WebValidateResponse extends AbstractStructBase
{
    /**
     * The WebValidateResult
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string|null
     */
    protected ?string $WebValidateResult = null;
    /**
     * Constructor method for WebValidateResponse
     * @uses WebValidateResponse::setWebValidateResult()
     * @param string $webValidateResult
     */
    public function __construct(?string $webValidateResult = null)
    {
        $this
            ->setWebValidateResult($webValidateResult);
    }
    /**
     * Get WebValidateResult value
     * @return string|null
     */
    public function getWebValidateResult(): ?string
    {
        return $this->WebValidateResult;
    }
    /**
     * Set WebValidateResult value
     * @param string $webValidateResult
     * @return \Drupal\netforum\xWeb\Generated\StructType\WebValidateResponse
     */
    public function setWebValidateResult(?string $webValidateResult = null): self
    {
        // validation for constraint: string
        if (!is_null($webValidateResult) && !is_string($webValidateResult)) {
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($webValidateResult, true), gettype($webValidateResult)), __LINE__);
        }
        $this->WebValidateResult = $webValidateResult;
        
        return $this;
    }
}
