<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BizAction.Security.BulkEditProfiles.ParameterChange
 * StructType
 * @subpackage Structs
 */
class BizAction_Security_BulkEditProfiles_ParameterChange extends AnyEntity
{
    /**
     * The NewValue
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $NewValue;
    /**
     * The ParameterName
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ParameterName;
    /**
     * Constructor method for BizAction.Security.BulkEditProfiles.ParameterChange
     * @uses BizAction_Security_BulkEditProfiles_ParameterChange::setNewValue()
     * @uses BizAction_Security_BulkEditProfiles_ParameterChange::setParameterName()
     * @param string $newValue
     * @param string $parameterName
     */
    public function __construct($newValue = null, $parameterName = null)
    {
        $this
            ->setNewValue($newValue)
            ->setParameterName($parameterName);
    }
    /**
     * Get NewValue value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getNewValue()
    {
        return isset($this->NewValue) ? $this->NewValue : null;
    }
    /**
     * Set NewValue value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $newValue
     * @return \patest\StructType\BizAction_Security_BulkEditProfiles_ParameterChange
     */
    public function setNewValue($newValue = null)
    {
        // validation for constraint: string
        if (!is_null($newValue) && !is_string($newValue)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($newValue, true), gettype($newValue)), __LINE__);
        }
        if (is_null($newValue) || (is_array($newValue) && empty($newValue))) {
            unset($this->NewValue);
        } else {
            $this->NewValue = $newValue;
        }
        return $this;
    }
    /**
     * Get ParameterName value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getParameterName()
    {
        return isset($this->ParameterName) ? $this->ParameterName : null;
    }
    /**
     * Set ParameterName value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $parameterName
     * @return \patest\StructType\BizAction_Security_BulkEditProfiles_ParameterChange
     */
    public function setParameterName($parameterName = null)
    {
        // validation for constraint: string
        if (!is_null($parameterName) && !is_string($parameterName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($parameterName, true), gettype($parameterName)), __LINE__);
        }
        if (is_null($parameterName) || (is_array($parameterName) && empty($parameterName))) {
            unset($this->ParameterName);
        } else {
            $this->ParameterName = $parameterName;
        }
        return $this;
    }
}
