<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Cancel_Internal_Service_Delivery_ResponseType StructType
 * Meta information extracted from the WSDL
 * - documentation: The response element for Cancel Internal Service Delivery.
 * @subpackage Structs
 */
class Cancel_Internal_Service_Delivery_ResponseType extends AbstractStructBase
{
    /**
     * The Internal_Service_Delivery_Reference
     * Meta information extracted from the WSDL
     * - documentation: Reference to the Internal Service Delivery being canceled.
     * - minOccurs: 0
     * @var \StructType\Internal_Service_DeliveryObjectType
     */
    public $Internal_Service_Delivery_Reference;
    /**
     * The version
     * Meta information extracted from the WSDL
     * - ref: wd:version
     * @var string
     */
    public $version;
    /**
     * Constructor method for Cancel_Internal_Service_Delivery_ResponseType
     * @uses Cancel_Internal_Service_Delivery_ResponseType::setInternal_Service_Delivery_Reference()
     * @uses Cancel_Internal_Service_Delivery_ResponseType::setVersion()
     * @param \StructType\Internal_Service_DeliveryObjectType $internal_Service_Delivery_Reference
     * @param string $version
     */
    public function __construct(\StructType\Internal_Service_DeliveryObjectType $internal_Service_Delivery_Reference = null, $version = null)
    {
        $this
            ->setInternal_Service_Delivery_Reference($internal_Service_Delivery_Reference)
            ->setVersion($version);
    }
    /**
     * Get Internal_Service_Delivery_Reference value
     * @return \StructType\Internal_Service_DeliveryObjectType|null
     */
    public function getInternal_Service_Delivery_Reference()
    {
        return $this->Internal_Service_Delivery_Reference;
    }
    /**
     * Set Internal_Service_Delivery_Reference value
     * @param \StructType\Internal_Service_DeliveryObjectType $internal_Service_Delivery_Reference
     * @return \StructType\Cancel_Internal_Service_Delivery_ResponseType
     */
    public function setInternal_Service_Delivery_Reference(\StructType\Internal_Service_DeliveryObjectType $internal_Service_Delivery_Reference = null)
    {
        $this->Internal_Service_Delivery_Reference = $internal_Service_Delivery_Reference;
        return $this;
    }
    /**
     * Get version value
     * @return string|null
     */
    public function getVersion()
    {
        return $this->version;
    }
    /**
     * Set version value
     * @param string $version
     * @return \StructType\Cancel_Internal_Service_Delivery_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;
    }
}
