<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Update_Asset_Useful_Life_ResponseType StructType
 * Meta information extracted from the WSDL
 * - documentation: Root element for the Response on the Put operation.
 * @subpackage Structs
 */
class Update_Asset_Useful_Life_ResponseType extends AbstractStructBase
{
    /**
     * The Submit_Useful_Life_Adjust_or_Correct_Reference
     * Meta information extracted from the WSDL
     * - documentation: Business Asset specified for useful life update
     * - minOccurs: 0
     * @var \StructType\Business_AssetObjectType
     */
    public $Submit_Useful_Life_Adjust_or_Correct_Reference;
    /**
     * The version
     * Meta information extracted from the WSDL
     * - ref: wd:version
     * @var string
     */
    public $version;
    /**
     * Constructor method for Update_Asset_Useful_Life_ResponseType
     * @uses Update_Asset_Useful_Life_ResponseType::setSubmit_Useful_Life_Adjust_or_Correct_Reference()
     * @uses Update_Asset_Useful_Life_ResponseType::setVersion()
     * @param \StructType\Business_AssetObjectType $submit_Useful_Life_Adjust_or_Correct_Reference
     * @param string $version
     */
    public function __construct(\StructType\Business_AssetObjectType $submit_Useful_Life_Adjust_or_Correct_Reference = null, $version = null)
    {
        $this
            ->setSubmit_Useful_Life_Adjust_or_Correct_Reference($submit_Useful_Life_Adjust_or_Correct_Reference)
            ->setVersion($version);
    }
    /**
     * Get Submit_Useful_Life_Adjust_or_Correct_Reference value
     * @return \StructType\Business_AssetObjectType|null
     */
    public function getSubmit_Useful_Life_Adjust_or_Correct_Reference()
    {
        return $this->Submit_Useful_Life_Adjust_or_Correct_Reference;
    }
    /**
     * Set Submit_Useful_Life_Adjust_or_Correct_Reference value
     * @param \StructType\Business_AssetObjectType $submit_Useful_Life_Adjust_or_Correct_Reference
     * @return \StructType\Update_Asset_Useful_Life_ResponseType
     */
    public function setSubmit_Useful_Life_Adjust_or_Correct_Reference(\StructType\Business_AssetObjectType $submit_Useful_Life_Adjust_or_Correct_Reference = null)
    {
        $this->Submit_Useful_Life_Adjust_or_Correct_Reference = $submit_Useful_Life_Adjust_or_Correct_Reference;
        return $this;
    }
    /**
     * Get version value
     * @return string|null
     */
    public function getVersion()
    {
        return $this->version;
    }
    /**
     * Set version value
     * @param string $version
     * @return \StructType\Update_Asset_Useful_Life_ResponseType
     */
    public function setVersion($version = null)
    {
        // validation for constraint: string
        if (!is_null($version) && !is_string($version)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($version, true), gettype($version)), __LINE__);
        }
        $this->version = $version;
        return $this;
    }
}
