<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Request_for_Quote_Award_Request_CriteriaType StructType
 * Meta information extracted from the WSDL
 * - documentation: Element that contains criteria to search for RFQ Award Documents
 * @subpackage Structs
 */
class Request_for_Quote_Award_Request_CriteriaType extends AbstractStructBase
{
    /**
     * The Company_Reference
     * Meta information extracted from the WSDL
     * - documentation: Company Reference
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\CompanyObjectType[]
     */
    public $Company_Reference;
    /**
     * The Request_for_Quote_Reference
     * Meta information extracted from the WSDL
     * - documentation: RFQ Reference to query for RFQ Awards
     * - minOccurs: 0
     * @var \StructType\Request_for_QuoteObjectType
     */
    public $Request_for_Quote_Reference;
    /**
     * The RFQ_Award_Type_Reference
     * Meta information extracted from the WSDL
     * - documentation: Award Type Reference
     * - minOccurs: 0
     * @var \StructType\Request_for_Quote_Award_TypeObjectType
     */
    public $RFQ_Award_Type_Reference;
    /**
     * The RFQ_Award_Status_Reference
     * Meta information extracted from the WSDL
     * - documentation: Award Status Reference
     * - minOccurs: 0
     * @var \StructType\Document_StatusObjectType
     */
    public $RFQ_Award_Status_Reference;
    /**
     * The RFQ_Award_Date_On_or_Before
     * Meta information extracted from the WSDL
     * - documentation: Award Date On or Before
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $RFQ_Award_Date_On_or_Before;
    /**
     * The RFQ_Award_Date_On_or_After
     * Meta information extracted from the WSDL
     * - documentation: Award Date Or or After
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $RFQ_Award_Date_On_or_After;
    /**
     * The Supplier_Reference
     * Meta information extracted from the WSDL
     * - documentation: Supplier Reference
     * - minOccurs: 0
     * @var \StructType\Abstract_Request_for_Quote_ParticipantObjectType
     */
    public $Supplier_Reference;
    /**
     * Constructor method for Request_for_Quote_Award_Request_CriteriaType
     * @uses Request_for_Quote_Award_Request_CriteriaType::setCompany_Reference()
     * @uses Request_for_Quote_Award_Request_CriteriaType::setRequest_for_Quote_Reference()
     * @uses Request_for_Quote_Award_Request_CriteriaType::setRFQ_Award_Type_Reference()
     * @uses Request_for_Quote_Award_Request_CriteriaType::setRFQ_Award_Status_Reference()
     * @uses Request_for_Quote_Award_Request_CriteriaType::setRFQ_Award_Date_On_or_Before()
     * @uses Request_for_Quote_Award_Request_CriteriaType::setRFQ_Award_Date_On_or_After()
     * @uses Request_for_Quote_Award_Request_CriteriaType::setSupplier_Reference()
     * @param \StructType\CompanyObjectType[] $company_Reference
     * @param \StructType\Request_for_QuoteObjectType $request_for_Quote_Reference
     * @param \StructType\Request_for_Quote_Award_TypeObjectType $rFQ_Award_Type_Reference
     * @param \StructType\Document_StatusObjectType $rFQ_Award_Status_Reference
     * @param string $rFQ_Award_Date_On_or_Before
     * @param string $rFQ_Award_Date_On_or_After
     * @param \StructType\Abstract_Request_for_Quote_ParticipantObjectType $supplier_Reference
     */
    public function __construct(array $company_Reference = array(), \StructType\Request_for_QuoteObjectType $request_for_Quote_Reference = null, \StructType\Request_for_Quote_Award_TypeObjectType $rFQ_Award_Type_Reference = null, \StructType\Document_StatusObjectType $rFQ_Award_Status_Reference = null, $rFQ_Award_Date_On_or_Before = null, $rFQ_Award_Date_On_or_After = null, \StructType\Abstract_Request_for_Quote_ParticipantObjectType $supplier_Reference = null)
    {
        $this
            ->setCompany_Reference($company_Reference)
            ->setRequest_for_Quote_Reference($request_for_Quote_Reference)
            ->setRFQ_Award_Type_Reference($rFQ_Award_Type_Reference)
            ->setRFQ_Award_Status_Reference($rFQ_Award_Status_Reference)
            ->setRFQ_Award_Date_On_or_Before($rFQ_Award_Date_On_or_Before)
            ->setRFQ_Award_Date_On_or_After($rFQ_Award_Date_On_or_After)
            ->setSupplier_Reference($supplier_Reference);
    }
    /**
     * Get Company_Reference value
     * @return \StructType\CompanyObjectType[]|null
     */
    public function getCompany_Reference()
    {
        return $this->Company_Reference;
    }
    /**
     * This method is responsible for validating the values passed to the setCompany_Reference method
     * This method is willingly generated in order to preserve the one-line inline validation within the setCompany_Reference method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateCompany_ReferenceForArrayConstraintsFromSetCompany_Reference(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $request_for_Quote_Award_Request_CriteriaTypeCompany_ReferenceItem) {
            // validation for constraint: itemType
            if (!$request_for_Quote_Award_Request_CriteriaTypeCompany_ReferenceItem instanceof \StructType\CompanyObjectType) {
                $invalidValues[] = is_object($request_for_Quote_Award_Request_CriteriaTypeCompany_ReferenceItem) ? get_class($request_for_Quote_Award_Request_CriteriaTypeCompany_ReferenceItem) : sprintf('%s(%s)', gettype($request_for_Quote_Award_Request_CriteriaTypeCompany_ReferenceItem), var_export($request_for_Quote_Award_Request_CriteriaTypeCompany_ReferenceItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The Company_Reference property can only contain items of type \StructType\CompanyObjectType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set Company_Reference value
     * @throws \InvalidArgumentException
     * @param \StructType\CompanyObjectType[] $company_Reference
     * @return \StructType\Request_for_Quote_Award_Request_CriteriaType
     */
    public function setCompany_Reference(array $company_Reference = array())
    {
        // validation for constraint: array
        if ('' !== ($company_ReferenceArrayErrorMessage = self::validateCompany_ReferenceForArrayConstraintsFromSetCompany_Reference($company_Reference))) {
            throw new \InvalidArgumentException($company_ReferenceArrayErrorMessage, __LINE__);
        }
        $this->Company_Reference = $company_Reference;
        return $this;
    }
    /**
     * Add item to Company_Reference value
     * @throws \InvalidArgumentException
     * @param \StructType\CompanyObjectType $item
     * @return \StructType\Request_for_Quote_Award_Request_CriteriaType
     */
    public function addToCompany_Reference(\StructType\CompanyObjectType $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\CompanyObjectType) {
            throw new \InvalidArgumentException(sprintf('The Company_Reference property can only contain items of type \StructType\CompanyObjectType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->Company_Reference[] = $item;
        return $this;
    }
    /**
     * Get Request_for_Quote_Reference value
     * @return \StructType\Request_for_QuoteObjectType|null
     */
    public function getRequest_for_Quote_Reference()
    {
        return $this->Request_for_Quote_Reference;
    }
    /**
     * Set Request_for_Quote_Reference value
     * @param \StructType\Request_for_QuoteObjectType $request_for_Quote_Reference
     * @return \StructType\Request_for_Quote_Award_Request_CriteriaType
     */
    public function setRequest_for_Quote_Reference(\StructType\Request_for_QuoteObjectType $request_for_Quote_Reference = null)
    {
        $this->Request_for_Quote_Reference = $request_for_Quote_Reference;
        return $this;
    }
    /**
     * Get RFQ_Award_Type_Reference value
     * @return \StructType\Request_for_Quote_Award_TypeObjectType|null
     */
    public function getRFQ_Award_Type_Reference()
    {
        return $this->RFQ_Award_Type_Reference;
    }
    /**
     * Set RFQ_Award_Type_Reference value
     * @param \StructType\Request_for_Quote_Award_TypeObjectType $rFQ_Award_Type_Reference
     * @return \StructType\Request_for_Quote_Award_Request_CriteriaType
     */
    public function setRFQ_Award_Type_Reference(\StructType\Request_for_Quote_Award_TypeObjectType $rFQ_Award_Type_Reference = null)
    {
        $this->RFQ_Award_Type_Reference = $rFQ_Award_Type_Reference;
        return $this;
    }
    /**
     * Get RFQ_Award_Status_Reference value
     * @return \StructType\Document_StatusObjectType|null
     */
    public function getRFQ_Award_Status_Reference()
    {
        return $this->RFQ_Award_Status_Reference;
    }
    /**
     * Set RFQ_Award_Status_Reference value
     * @param \StructType\Document_StatusObjectType $rFQ_Award_Status_Reference
     * @return \StructType\Request_for_Quote_Award_Request_CriteriaType
     */
    public function setRFQ_Award_Status_Reference(\StructType\Document_StatusObjectType $rFQ_Award_Status_Reference = null)
    {
        $this->RFQ_Award_Status_Reference = $rFQ_Award_Status_Reference;
        return $this;
    }
    /**
     * Get RFQ_Award_Date_On_or_Before value
     * @return string|null
     */
    public function getRFQ_Award_Date_On_or_Before()
    {
        return $this->RFQ_Award_Date_On_or_Before;
    }
    /**
     * Set RFQ_Award_Date_On_or_Before value
     * @param string $rFQ_Award_Date_On_or_Before
     * @return \StructType\Request_for_Quote_Award_Request_CriteriaType
     */
    public function setRFQ_Award_Date_On_or_Before($rFQ_Award_Date_On_or_Before = null)
    {
        // validation for constraint: string
        if (!is_null($rFQ_Award_Date_On_or_Before) && !is_string($rFQ_Award_Date_On_or_Before)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($rFQ_Award_Date_On_or_Before, true), gettype($rFQ_Award_Date_On_or_Before)), __LINE__);
        }
        $this->RFQ_Award_Date_On_or_Before = $rFQ_Award_Date_On_or_Before;
        return $this;
    }
    /**
     * Get RFQ_Award_Date_On_or_After value
     * @return string|null
     */
    public function getRFQ_Award_Date_On_or_After()
    {
        return $this->RFQ_Award_Date_On_or_After;
    }
    /**
     * Set RFQ_Award_Date_On_or_After value
     * @param string $rFQ_Award_Date_On_or_After
     * @return \StructType\Request_for_Quote_Award_Request_CriteriaType
     */
    public function setRFQ_Award_Date_On_or_After($rFQ_Award_Date_On_or_After = null)
    {
        // validation for constraint: string
        if (!is_null($rFQ_Award_Date_On_or_After) && !is_string($rFQ_Award_Date_On_or_After)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($rFQ_Award_Date_On_or_After, true), gettype($rFQ_Award_Date_On_or_After)), __LINE__);
        }
        $this->RFQ_Award_Date_On_or_After = $rFQ_Award_Date_On_or_After;
        return $this;
    }
    /**
     * Get Supplier_Reference value
     * @return \StructType\Abstract_Request_for_Quote_ParticipantObjectType|null
     */
    public function getSupplier_Reference()
    {
        return $this->Supplier_Reference;
    }
    /**
     * Set Supplier_Reference value
     * @param \StructType\Abstract_Request_for_Quote_ParticipantObjectType $supplier_Reference
     * @return \StructType\Request_for_Quote_Award_Request_CriteriaType
     */
    public function setSupplier_Reference(\StructType\Abstract_Request_for_Quote_ParticipantObjectType $supplier_Reference = null)
    {
        $this->Supplier_Reference = $supplier_Reference;
        return $this;
    }
}
