<?php

declare(strict_types=1);

namespace Drupal\netforum\xWeb\Generated\StructType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructBase;

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