<?php

declare(strict_types=1);

namespace Drupal\netforum\xWeb\Generated\StructType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructBase;

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