<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for DeletionReason StructType
 * @subpackage Structs
 */
class DeletionReason extends AbstractStructBase
{
    /**
     * The deletionReasonCode
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var \StructType\RecordRef
     */
    public $deletionReasonCode;
    /**
     * The deletionReasonMemo
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $deletionReasonMemo;
    /**
     * Constructor method for DeletionReason
     * @uses DeletionReason::setDeletionReasonCode()
     * @uses DeletionReason::setDeletionReasonMemo()
     * @param \StructType\RecordRef $deletionReasonCode
     * @param string $deletionReasonMemo
     */
    public function __construct(\StructType\RecordRef $deletionReasonCode = null, $deletionReasonMemo = null)
    {
        $this
            ->setDeletionReasonCode($deletionReasonCode)
            ->setDeletionReasonMemo($deletionReasonMemo);
    }
    /**
     * Get deletionReasonCode value
     * @return \StructType\RecordRef
     */
    public function getDeletionReasonCode()
    {
        return $this->deletionReasonCode;
    }
    /**
     * Set deletionReasonCode value
     * @param \StructType\RecordRef $deletionReasonCode
     * @return \StructType\DeletionReason
     */
    public function setDeletionReasonCode(\StructType\RecordRef $deletionReasonCode = null)
    {
        $this->deletionReasonCode = $deletionReasonCode;
        return $this;
    }
    /**
     * Get deletionReasonMemo value
     * @return string|null
     */
    public function getDeletionReasonMemo()
    {
        return $this->deletionReasonMemo;
    }
    /**
     * Set deletionReasonMemo value
     * @param string $deletionReasonMemo
     * @return \StructType\DeletionReason
     */
    public function setDeletionReasonMemo($deletionReasonMemo = null)
    {
        // validation for constraint: string
        if (!is_null($deletionReasonMemo) && !is_string($deletionReasonMemo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($deletionReasonMemo, true), gettype($deletionReasonMemo)), __LINE__);
        }
        $this->deletionReasonMemo = $deletionReasonMemo;
        return $this;
    }
}
