<?php

declare(strict_types=1);

namespace Drupal\netforum\xWeb\Generated\StructType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for WebLoginResponse 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 WebLoginResponse extends AbstractStructBase
{
    /**
     * The WebLoginResult
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string|null
     */
    protected ?string $WebLoginResult = null;
    /**
     * Constructor method for WebLoginResponse
     * @uses WebLoginResponse::setWebLoginResult()
     * @param string $webLoginResult
     */
    public function __construct(?string $webLoginResult = null)
    {
        $this
            ->setWebLoginResult($webLoginResult);
    }
    /**
     * Get WebLoginResult value
     * @return string|null
     */
    public function getWebLoginResult(): ?string
    {
        return $this->WebLoginResult;
    }
    /**
     * Set WebLoginResult value
     * @param string $webLoginResult
     * @return \Drupal\netforum\xWeb\Generated\StructType\WebLoginResponse
     */
    public function setWebLoginResult(?string $webLoginResult = null): self
    {
        // validation for constraint: string
        if (!is_null($webLoginResult) && !is_string($webLoginResult)) {
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($webLoginResult, true), gettype($webLoginResult)), __LINE__);
        }
        $this->WebLoginResult = $webLoginResult;
        
        return $this;
    }
}
