<?php

declare(strict_types=1);

namespace Drupal\netforum\xWeb\Generated\StructType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetFacadeObject 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 GetFacadeObject extends AbstractStructBase
{
    /**
     * The szObjectName
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string|null
     */
    protected ?string $szObjectName = null;
    /**
     * The szObjectKey
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string|null
     */
    protected ?string $szObjectKey = null;
    /**
     * Constructor method for GetFacadeObject
     * @uses GetFacadeObject::setSzObjectName()
     * @uses GetFacadeObject::setSzObjectKey()
     * @param string $szObjectName
     * @param string $szObjectKey
     */
    public function __construct(?string $szObjectName = null, ?string $szObjectKey = null)
    {
        $this
            ->setSzObjectName($szObjectName)
            ->setSzObjectKey($szObjectKey);
    }
    /**
     * 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\GetFacadeObject
     */
    public function setSzObjectName(?string $szObjectName = null): 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;
    }
    /**
     * 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\GetFacadeObject
     */
    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;
    }
}
