<?php

declare(strict_types=1);

namespace Drupal\netforum\xWeb\Generated\StructType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for QueryDefinition StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:QueryDefinition
 * @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 QueryDefinition extends AbstractStructBase
{
    /**
     * The que_key
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string|null
     */
    protected ?string $que_key = null;
    /**
     * The que_description
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string|null
     */
    protected ?string $que_description = null;
    /**
     * The szObjectName
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string|null
     */
    protected ?string $szObjectName = null;
    /**
     * The Parameters
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryParameter|null
     */
    protected ?\Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryParameter $Parameters = null;
    /**
     * The Columns
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryColumn|null
     */
    protected ?\Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryColumn $Columns = null;
    /**
     * Constructor method for QueryDefinition
     * @uses QueryDefinition::setQue_key()
     * @uses QueryDefinition::setQue_description()
     * @uses QueryDefinition::setSzObjectName()
     * @uses QueryDefinition::setParameters()
     * @uses QueryDefinition::setColumns()
     * @param string $que_key
     * @param string $que_description
     * @param string $szObjectName
     * @param \Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryParameter $parameters
     * @param \Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryColumn $columns
     */
    public function __construct(?string $que_key = null, ?string $que_description = null, ?string $szObjectName = null, ?\Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryParameter $parameters = null, ?\Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryColumn $columns = null)
    {
        $this
            ->setQue_key($que_key)
            ->setQue_description($que_description)
            ->setSzObjectName($szObjectName)
            ->setParameters($parameters)
            ->setColumns($columns);
    }
    /**
     * 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\QueryDefinition
     */
    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;
    }
    /**
     * Get que_description value
     * @return string|null
     */
    public function getQue_description(): ?string
    {
        return $this->que_description;
    }
    /**
     * Set que_description value
     * @param string $que_description
     * @return \Drupal\netforum\xWeb\Generated\StructType\QueryDefinition
     */
    public function setQue_description(?string $que_description = null): self
    {
        // validation for constraint: string
        if (!is_null($que_description) && !is_string($que_description)) {
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($que_description, true), gettype($que_description)), __LINE__);
        }
        $this->que_description = $que_description;
        
        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\QueryDefinition
     */
    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 Parameters value
     * @return \Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryParameter|null
     */
    public function getParameters(): ?\Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryParameter
    {
        return $this->Parameters;
    }
    /**
     * Set Parameters value
     * @param \Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryParameter $parameters
     * @return \Drupal\netforum\xWeb\Generated\StructType\QueryDefinition
     */
    public function setParameters(?\Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryParameter $parameters = null): self
    {
        $this->Parameters = $parameters;
        
        return $this;
    }
    /**
     * Get Columns value
     * @return \Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryColumn|null
     */
    public function getColumns(): ?\Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryColumn
    {
        return $this->Columns;
    }
    /**
     * Set Columns value
     * @param \Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryColumn $columns
     * @return \Drupal\netforum\xWeb\Generated\StructType\QueryDefinition
     */
    public function setColumns(?\Drupal\netforum\xWeb\Generated\ArrayType\ArrayOfQueryColumn $columns = null): self
    {
        $this->Columns = $columns;
        
        return $this;
    }
}
