<?php

declare(strict_types=1);

namespace Drupal\netforum\xWeb\Generated\StructType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructBase;

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