<?php

declare(strict_types=1);

namespace Drupal\netforum\xWeb\Generated\StructType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructBase;

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