<?php

declare(strict_types=1);

namespace Drupal\netforum\xWeb\Generated\StructType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for WEBIndividualInsert 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 WEBIndividualInsert extends AbstractStructBase
{
    /**
     * The oFacadeObject
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \Drupal\netforum\xWeb\Generated\StructType\IndividualType|null
     */
    protected ?\Drupal\netforum\xWeb\Generated\StructType\IndividualType $oFacadeObject = null;
    /**
     * The bRefresh
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string|null
     */
    protected ?string $bRefresh = null;
    /**
     * Constructor method for WEBIndividualInsert
     * @uses WEBIndividualInsert::setOFacadeObject()
     * @uses WEBIndividualInsert::setBRefresh()
     * @param \Drupal\netforum\xWeb\Generated\StructType\IndividualType $oFacadeObject
     * @param string $bRefresh
     */
    public function __construct(?\Drupal\netforum\xWeb\Generated\StructType\IndividualType $oFacadeObject = null, ?string $bRefresh = null)
    {
        $this
            ->setOFacadeObject($oFacadeObject)
            ->setBRefresh($bRefresh);
    }
    /**
     * Get oFacadeObject value
     * @return \Drupal\netforum\xWeb\Generated\StructType\IndividualType|null
     */
    public function getOFacadeObject(): ?\Drupal\netforum\xWeb\Generated\StructType\IndividualType
    {
        return $this->oFacadeObject;
    }
    /**
     * Set oFacadeObject value
     * @param \Drupal\netforum\xWeb\Generated\StructType\IndividualType $oFacadeObject
     * @return \Drupal\netforum\xWeb\Generated\StructType\WEBIndividualInsert
     */
    public function setOFacadeObject(?\Drupal\netforum\xWeb\Generated\StructType\IndividualType $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\WEBIndividualInsert
     */
    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;
    }
}
