<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for MessageSearchRowBasic StructType
 * @subpackage Structs
 */
class MessageSearchRowBasic extends SearchRowBasic
{
    /**
     * The author
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $author;
    /**
     * The authorEmail
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $authorEmail;
    /**
     * The bcc
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $bcc;
    /**
     * The cc
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $cc;
    /**
     * The externalId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $externalId;
    /**
     * The hasAttachment
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $hasAttachment;
    /**
     * The internalId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $internalId;
    /**
     * The internalOnly
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $internalOnly;
    /**
     * The isEmailed
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $isEmailed;
    /**
     * The isIncoming
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $isIncoming;
    /**
     * The message
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $message;
    /**
     * The messageDate
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDateField[]
     */
    public $messageDate;
    /**
     * The messageType
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnEnumSelectField[]
     */
    public $messageType;
    /**
     * The recipient
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $recipient;
    /**
     * The recipientEmail
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $recipientEmail;
    /**
     * The subject
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $subject;
    /**
     * Constructor method for MessageSearchRowBasic
     * @uses MessageSearchRowBasic::setAuthor()
     * @uses MessageSearchRowBasic::setAuthorEmail()
     * @uses MessageSearchRowBasic::setBcc()
     * @uses MessageSearchRowBasic::setCc()
     * @uses MessageSearchRowBasic::setExternalId()
     * @uses MessageSearchRowBasic::setHasAttachment()
     * @uses MessageSearchRowBasic::setInternalId()
     * @uses MessageSearchRowBasic::setInternalOnly()
     * @uses MessageSearchRowBasic::setIsEmailed()
     * @uses MessageSearchRowBasic::setIsIncoming()
     * @uses MessageSearchRowBasic::setMessage()
     * @uses MessageSearchRowBasic::setMessageDate()
     * @uses MessageSearchRowBasic::setMessageType()
     * @uses MessageSearchRowBasic::setRecipient()
     * @uses MessageSearchRowBasic::setRecipientEmail()
     * @uses MessageSearchRowBasic::setSubject()
     * @param \StructType\SearchColumnSelectField[] $author
     * @param \StructType\SearchColumnStringField[] $authorEmail
     * @param \StructType\SearchColumnStringField[] $bcc
     * @param \StructType\SearchColumnStringField[] $cc
     * @param \StructType\SearchColumnSelectField[] $externalId
     * @param \StructType\SearchColumnBooleanField[] $hasAttachment
     * @param \StructType\SearchColumnSelectField[] $internalId
     * @param \StructType\SearchColumnBooleanField[] $internalOnly
     * @param \StructType\SearchColumnBooleanField[] $isEmailed
     * @param \StructType\SearchColumnBooleanField[] $isIncoming
     * @param \StructType\SearchColumnStringField[] $message
     * @param \StructType\SearchColumnDateField[] $messageDate
     * @param \StructType\SearchColumnEnumSelectField[] $messageType
     * @param \StructType\SearchColumnSelectField[] $recipient
     * @param \StructType\SearchColumnStringField[] $recipientEmail
     * @param \StructType\SearchColumnStringField[] $subject
     */
    public function __construct(array $author = array(), array $authorEmail = array(), array $bcc = array(), array $cc = array(), array $externalId = array(), array $hasAttachment = array(), array $internalId = array(), array $internalOnly = array(), array $isEmailed = array(), array $isIncoming = array(), array $message = array(), array $messageDate = array(), array $messageType = array(), array $recipient = array(), array $recipientEmail = array(), array $subject = array())
    {
        $this
            ->setAuthor($author)
            ->setAuthorEmail($authorEmail)
            ->setBcc($bcc)
            ->setCc($cc)
            ->setExternalId($externalId)
            ->setHasAttachment($hasAttachment)
            ->setInternalId($internalId)
            ->setInternalOnly($internalOnly)
            ->setIsEmailed($isEmailed)
            ->setIsIncoming($isIncoming)
            ->setMessage($message)
            ->setMessageDate($messageDate)
            ->setMessageType($messageType)
            ->setRecipient($recipient)
            ->setRecipientEmail($recipientEmail)
            ->setSubject($subject);
    }
    /**
     * Get author value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getAuthor()
    {
        return $this->author;
    }
    /**
     * This method is responsible for validating the values passed to the setAuthor method
     * This method is willingly generated in order to preserve the one-line inline validation within the setAuthor method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateAuthorForArrayConstraintsFromSetAuthor(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicAuthorItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicAuthorItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($messageSearchRowBasicAuthorItem) ? get_class($messageSearchRowBasicAuthorItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicAuthorItem), var_export($messageSearchRowBasicAuthorItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The author property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set author value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $author
     * @return \StructType\MessageSearchRowBasic
     */
    public function setAuthor(array $author = array())
    {
        // validation for constraint: array
        if ('' !== ($authorArrayErrorMessage = self::validateAuthorForArrayConstraintsFromSetAuthor($author))) {
            throw new \InvalidArgumentException($authorArrayErrorMessage, __LINE__);
        }
        $this->author = $author;
        return $this;
    }
    /**
     * Add item to author value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToAuthor(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The author property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->author[] = $item;
        return $this;
    }
    /**
     * Get authorEmail value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getAuthorEmail()
    {
        return $this->authorEmail;
    }
    /**
     * This method is responsible for validating the values passed to the setAuthorEmail method
     * This method is willingly generated in order to preserve the one-line inline validation within the setAuthorEmail method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateAuthorEmailForArrayConstraintsFromSetAuthorEmail(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicAuthorEmailItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicAuthorEmailItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($messageSearchRowBasicAuthorEmailItem) ? get_class($messageSearchRowBasicAuthorEmailItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicAuthorEmailItem), var_export($messageSearchRowBasicAuthorEmailItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The authorEmail property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set authorEmail value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $authorEmail
     * @return \StructType\MessageSearchRowBasic
     */
    public function setAuthorEmail(array $authorEmail = array())
    {
        // validation for constraint: array
        if ('' !== ($authorEmailArrayErrorMessage = self::validateAuthorEmailForArrayConstraintsFromSetAuthorEmail($authorEmail))) {
            throw new \InvalidArgumentException($authorEmailArrayErrorMessage, __LINE__);
        }
        $this->authorEmail = $authorEmail;
        return $this;
    }
    /**
     * Add item to authorEmail value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToAuthorEmail(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The authorEmail property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->authorEmail[] = $item;
        return $this;
    }
    /**
     * Get bcc value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getBcc()
    {
        return $this->bcc;
    }
    /**
     * This method is responsible for validating the values passed to the setBcc method
     * This method is willingly generated in order to preserve the one-line inline validation within the setBcc method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateBccForArrayConstraintsFromSetBcc(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicBccItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicBccItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($messageSearchRowBasicBccItem) ? get_class($messageSearchRowBasicBccItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicBccItem), var_export($messageSearchRowBasicBccItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The bcc property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set bcc value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $bcc
     * @return \StructType\MessageSearchRowBasic
     */
    public function setBcc(array $bcc = array())
    {
        // validation for constraint: array
        if ('' !== ($bccArrayErrorMessage = self::validateBccForArrayConstraintsFromSetBcc($bcc))) {
            throw new \InvalidArgumentException($bccArrayErrorMessage, __LINE__);
        }
        $this->bcc = $bcc;
        return $this;
    }
    /**
     * Add item to bcc value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToBcc(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The bcc property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->bcc[] = $item;
        return $this;
    }
    /**
     * Get cc value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getCc()
    {
        return $this->cc;
    }
    /**
     * This method is responsible for validating the values passed to the setCc method
     * This method is willingly generated in order to preserve the one-line inline validation within the setCc method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateCcForArrayConstraintsFromSetCc(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicCcItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicCcItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($messageSearchRowBasicCcItem) ? get_class($messageSearchRowBasicCcItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicCcItem), var_export($messageSearchRowBasicCcItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The cc property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set cc value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $cc
     * @return \StructType\MessageSearchRowBasic
     */
    public function setCc(array $cc = array())
    {
        // validation for constraint: array
        if ('' !== ($ccArrayErrorMessage = self::validateCcForArrayConstraintsFromSetCc($cc))) {
            throw new \InvalidArgumentException($ccArrayErrorMessage, __LINE__);
        }
        $this->cc = $cc;
        return $this;
    }
    /**
     * Add item to cc value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToCc(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The cc property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->cc[] = $item;
        return $this;
    }
    /**
     * Get externalId value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getExternalId()
    {
        return $this->externalId;
    }
    /**
     * This method is responsible for validating the values passed to the setExternalId method
     * This method is willingly generated in order to preserve the one-line inline validation within the setExternalId method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateExternalIdForArrayConstraintsFromSetExternalId(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicExternalIdItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicExternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($messageSearchRowBasicExternalIdItem) ? get_class($messageSearchRowBasicExternalIdItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicExternalIdItem), var_export($messageSearchRowBasicExternalIdItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The externalId property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set externalId value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $externalId
     * @return \StructType\MessageSearchRowBasic
     */
    public function setExternalId(array $externalId = array())
    {
        // validation for constraint: array
        if ('' !== ($externalIdArrayErrorMessage = self::validateExternalIdForArrayConstraintsFromSetExternalId($externalId))) {
            throw new \InvalidArgumentException($externalIdArrayErrorMessage, __LINE__);
        }
        $this->externalId = $externalId;
        return $this;
    }
    /**
     * Add item to externalId value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToExternalId(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The externalId property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->externalId[] = $item;
        return $this;
    }
    /**
     * Get hasAttachment value
     * @return \StructType\SearchColumnBooleanField[]|null
     */
    public function getHasAttachment()
    {
        return $this->hasAttachment;
    }
    /**
     * This method is responsible for validating the values passed to the setHasAttachment method
     * This method is willingly generated in order to preserve the one-line inline validation within the setHasAttachment method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateHasAttachmentForArrayConstraintsFromSetHasAttachment(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicHasAttachmentItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicHasAttachmentItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($messageSearchRowBasicHasAttachmentItem) ? get_class($messageSearchRowBasicHasAttachmentItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicHasAttachmentItem), var_export($messageSearchRowBasicHasAttachmentItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The hasAttachment property can only contain items of type \StructType\SearchColumnBooleanField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set hasAttachment value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $hasAttachment
     * @return \StructType\MessageSearchRowBasic
     */
    public function setHasAttachment(array $hasAttachment = array())
    {
        // validation for constraint: array
        if ('' !== ($hasAttachmentArrayErrorMessage = self::validateHasAttachmentForArrayConstraintsFromSetHasAttachment($hasAttachment))) {
            throw new \InvalidArgumentException($hasAttachmentArrayErrorMessage, __LINE__);
        }
        $this->hasAttachment = $hasAttachment;
        return $this;
    }
    /**
     * Add item to hasAttachment value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToHasAttachment(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The hasAttachment property can only contain items of type \StructType\SearchColumnBooleanField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->hasAttachment[] = $item;
        return $this;
    }
    /**
     * Get internalId value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getInternalId()
    {
        return $this->internalId;
    }
    /**
     * This method is responsible for validating the values passed to the setInternalId method
     * This method is willingly generated in order to preserve the one-line inline validation within the setInternalId method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateInternalIdForArrayConstraintsFromSetInternalId(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicInternalIdItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicInternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($messageSearchRowBasicInternalIdItem) ? get_class($messageSearchRowBasicInternalIdItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicInternalIdItem), var_export($messageSearchRowBasicInternalIdItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The internalId property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set internalId value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $internalId
     * @return \StructType\MessageSearchRowBasic
     */
    public function setInternalId(array $internalId = array())
    {
        // validation for constraint: array
        if ('' !== ($internalIdArrayErrorMessage = self::validateInternalIdForArrayConstraintsFromSetInternalId($internalId))) {
            throw new \InvalidArgumentException($internalIdArrayErrorMessage, __LINE__);
        }
        $this->internalId = $internalId;
        return $this;
    }
    /**
     * Add item to internalId value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToInternalId(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The internalId property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->internalId[] = $item;
        return $this;
    }
    /**
     * Get internalOnly value
     * @return \StructType\SearchColumnBooleanField[]|null
     */
    public function getInternalOnly()
    {
        return $this->internalOnly;
    }
    /**
     * This method is responsible for validating the values passed to the setInternalOnly method
     * This method is willingly generated in order to preserve the one-line inline validation within the setInternalOnly method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateInternalOnlyForArrayConstraintsFromSetInternalOnly(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicInternalOnlyItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicInternalOnlyItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($messageSearchRowBasicInternalOnlyItem) ? get_class($messageSearchRowBasicInternalOnlyItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicInternalOnlyItem), var_export($messageSearchRowBasicInternalOnlyItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The internalOnly property can only contain items of type \StructType\SearchColumnBooleanField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set internalOnly value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $internalOnly
     * @return \StructType\MessageSearchRowBasic
     */
    public function setInternalOnly(array $internalOnly = array())
    {
        // validation for constraint: array
        if ('' !== ($internalOnlyArrayErrorMessage = self::validateInternalOnlyForArrayConstraintsFromSetInternalOnly($internalOnly))) {
            throw new \InvalidArgumentException($internalOnlyArrayErrorMessage, __LINE__);
        }
        $this->internalOnly = $internalOnly;
        return $this;
    }
    /**
     * Add item to internalOnly value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToInternalOnly(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The internalOnly property can only contain items of type \StructType\SearchColumnBooleanField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->internalOnly[] = $item;
        return $this;
    }
    /**
     * Get isEmailed value
     * @return \StructType\SearchColumnBooleanField[]|null
     */
    public function getIsEmailed()
    {
        return $this->isEmailed;
    }
    /**
     * This method is responsible for validating the values passed to the setIsEmailed method
     * This method is willingly generated in order to preserve the one-line inline validation within the setIsEmailed method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateIsEmailedForArrayConstraintsFromSetIsEmailed(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicIsEmailedItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicIsEmailedItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($messageSearchRowBasicIsEmailedItem) ? get_class($messageSearchRowBasicIsEmailedItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicIsEmailedItem), var_export($messageSearchRowBasicIsEmailedItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The isEmailed property can only contain items of type \StructType\SearchColumnBooleanField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set isEmailed value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $isEmailed
     * @return \StructType\MessageSearchRowBasic
     */
    public function setIsEmailed(array $isEmailed = array())
    {
        // validation for constraint: array
        if ('' !== ($isEmailedArrayErrorMessage = self::validateIsEmailedForArrayConstraintsFromSetIsEmailed($isEmailed))) {
            throw new \InvalidArgumentException($isEmailedArrayErrorMessage, __LINE__);
        }
        $this->isEmailed = $isEmailed;
        return $this;
    }
    /**
     * Add item to isEmailed value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToIsEmailed(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The isEmailed property can only contain items of type \StructType\SearchColumnBooleanField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->isEmailed[] = $item;
        return $this;
    }
    /**
     * Get isIncoming value
     * @return \StructType\SearchColumnBooleanField[]|null
     */
    public function getIsIncoming()
    {
        return $this->isIncoming;
    }
    /**
     * This method is responsible for validating the values passed to the setIsIncoming method
     * This method is willingly generated in order to preserve the one-line inline validation within the setIsIncoming method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateIsIncomingForArrayConstraintsFromSetIsIncoming(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicIsIncomingItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicIsIncomingItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($messageSearchRowBasicIsIncomingItem) ? get_class($messageSearchRowBasicIsIncomingItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicIsIncomingItem), var_export($messageSearchRowBasicIsIncomingItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The isIncoming property can only contain items of type \StructType\SearchColumnBooleanField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set isIncoming value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $isIncoming
     * @return \StructType\MessageSearchRowBasic
     */
    public function setIsIncoming(array $isIncoming = array())
    {
        // validation for constraint: array
        if ('' !== ($isIncomingArrayErrorMessage = self::validateIsIncomingForArrayConstraintsFromSetIsIncoming($isIncoming))) {
            throw new \InvalidArgumentException($isIncomingArrayErrorMessage, __LINE__);
        }
        $this->isIncoming = $isIncoming;
        return $this;
    }
    /**
     * Add item to isIncoming value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToIsIncoming(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The isIncoming property can only contain items of type \StructType\SearchColumnBooleanField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->isIncoming[] = $item;
        return $this;
    }
    /**
     * Get message value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getMessage()
    {
        return $this->message;
    }
    /**
     * This method is responsible for validating the values passed to the setMessage method
     * This method is willingly generated in order to preserve the one-line inline validation within the setMessage method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateMessageForArrayConstraintsFromSetMessage(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicMessageItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicMessageItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($messageSearchRowBasicMessageItem) ? get_class($messageSearchRowBasicMessageItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicMessageItem), var_export($messageSearchRowBasicMessageItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The message property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set message value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $message
     * @return \StructType\MessageSearchRowBasic
     */
    public function setMessage(array $message = array())
    {
        // validation for constraint: array
        if ('' !== ($messageArrayErrorMessage = self::validateMessageForArrayConstraintsFromSetMessage($message))) {
            throw new \InvalidArgumentException($messageArrayErrorMessage, __LINE__);
        }
        $this->message = $message;
        return $this;
    }
    /**
     * Add item to message value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToMessage(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The message property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->message[] = $item;
        return $this;
    }
    /**
     * Get messageDate value
     * @return \StructType\SearchColumnDateField[]|null
     */
    public function getMessageDate()
    {
        return $this->messageDate;
    }
    /**
     * This method is responsible for validating the values passed to the setMessageDate method
     * This method is willingly generated in order to preserve the one-line inline validation within the setMessageDate method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateMessageDateForArrayConstraintsFromSetMessageDate(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicMessageDateItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicMessageDateItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($messageSearchRowBasicMessageDateItem) ? get_class($messageSearchRowBasicMessageDateItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicMessageDateItem), var_export($messageSearchRowBasicMessageDateItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The messageDate property can only contain items of type \StructType\SearchColumnDateField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set messageDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField[] $messageDate
     * @return \StructType\MessageSearchRowBasic
     */
    public function setMessageDate(array $messageDate = array())
    {
        // validation for constraint: array
        if ('' !== ($messageDateArrayErrorMessage = self::validateMessageDateForArrayConstraintsFromSetMessageDate($messageDate))) {
            throw new \InvalidArgumentException($messageDateArrayErrorMessage, __LINE__);
        }
        $this->messageDate = $messageDate;
        return $this;
    }
    /**
     * Add item to messageDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToMessageDate(\StructType\SearchColumnDateField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDateField) {
            throw new \InvalidArgumentException(sprintf('The messageDate property can only contain items of type \StructType\SearchColumnDateField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->messageDate[] = $item;
        return $this;
    }
    /**
     * Get messageType value
     * @return \StructType\SearchColumnEnumSelectField[]|null
     */
    public function getMessageType()
    {
        return $this->messageType;
    }
    /**
     * This method is responsible for validating the values passed to the setMessageType method
     * This method is willingly generated in order to preserve the one-line inline validation within the setMessageType method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateMessageTypeForArrayConstraintsFromSetMessageType(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicMessageTypeItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicMessageTypeItem instanceof \StructType\SearchColumnEnumSelectField) {
                $invalidValues[] = is_object($messageSearchRowBasicMessageTypeItem) ? get_class($messageSearchRowBasicMessageTypeItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicMessageTypeItem), var_export($messageSearchRowBasicMessageTypeItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The messageType property can only contain items of type \StructType\SearchColumnEnumSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set messageType value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnEnumSelectField[] $messageType
     * @return \StructType\MessageSearchRowBasic
     */
    public function setMessageType(array $messageType = array())
    {
        // validation for constraint: array
        if ('' !== ($messageTypeArrayErrorMessage = self::validateMessageTypeForArrayConstraintsFromSetMessageType($messageType))) {
            throw new \InvalidArgumentException($messageTypeArrayErrorMessage, __LINE__);
        }
        $this->messageType = $messageType;
        return $this;
    }
    /**
     * Add item to messageType value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnEnumSelectField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToMessageType(\StructType\SearchColumnEnumSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnEnumSelectField) {
            throw new \InvalidArgumentException(sprintf('The messageType property can only contain items of type \StructType\SearchColumnEnumSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->messageType[] = $item;
        return $this;
    }
    /**
     * Get recipient value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getRecipient()
    {
        return $this->recipient;
    }
    /**
     * This method is responsible for validating the values passed to the setRecipient method
     * This method is willingly generated in order to preserve the one-line inline validation within the setRecipient method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateRecipientForArrayConstraintsFromSetRecipient(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicRecipientItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicRecipientItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($messageSearchRowBasicRecipientItem) ? get_class($messageSearchRowBasicRecipientItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicRecipientItem), var_export($messageSearchRowBasicRecipientItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The recipient property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set recipient value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $recipient
     * @return \StructType\MessageSearchRowBasic
     */
    public function setRecipient(array $recipient = array())
    {
        // validation for constraint: array
        if ('' !== ($recipientArrayErrorMessage = self::validateRecipientForArrayConstraintsFromSetRecipient($recipient))) {
            throw new \InvalidArgumentException($recipientArrayErrorMessage, __LINE__);
        }
        $this->recipient = $recipient;
        return $this;
    }
    /**
     * Add item to recipient value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToRecipient(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The recipient property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->recipient[] = $item;
        return $this;
    }
    /**
     * Get recipientEmail value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getRecipientEmail()
    {
        return $this->recipientEmail;
    }
    /**
     * This method is responsible for validating the values passed to the setRecipientEmail method
     * This method is willingly generated in order to preserve the one-line inline validation within the setRecipientEmail method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateRecipientEmailForArrayConstraintsFromSetRecipientEmail(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicRecipientEmailItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicRecipientEmailItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($messageSearchRowBasicRecipientEmailItem) ? get_class($messageSearchRowBasicRecipientEmailItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicRecipientEmailItem), var_export($messageSearchRowBasicRecipientEmailItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The recipientEmail property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set recipientEmail value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $recipientEmail
     * @return \StructType\MessageSearchRowBasic
     */
    public function setRecipientEmail(array $recipientEmail = array())
    {
        // validation for constraint: array
        if ('' !== ($recipientEmailArrayErrorMessage = self::validateRecipientEmailForArrayConstraintsFromSetRecipientEmail($recipientEmail))) {
            throw new \InvalidArgumentException($recipientEmailArrayErrorMessage, __LINE__);
        }
        $this->recipientEmail = $recipientEmail;
        return $this;
    }
    /**
     * Add item to recipientEmail value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToRecipientEmail(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The recipientEmail property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->recipientEmail[] = $item;
        return $this;
    }
    /**
     * Get subject value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getSubject()
    {
        return $this->subject;
    }
    /**
     * This method is responsible for validating the values passed to the setSubject method
     * This method is willingly generated in order to preserve the one-line inline validation within the setSubject method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateSubjectForArrayConstraintsFromSetSubject(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $messageSearchRowBasicSubjectItem) {
            // validation for constraint: itemType
            if (!$messageSearchRowBasicSubjectItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($messageSearchRowBasicSubjectItem) ? get_class($messageSearchRowBasicSubjectItem) : sprintf('%s(%s)', gettype($messageSearchRowBasicSubjectItem), var_export($messageSearchRowBasicSubjectItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The subject property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set subject value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $subject
     * @return \StructType\MessageSearchRowBasic
     */
    public function setSubject(array $subject = array())
    {
        // validation for constraint: array
        if ('' !== ($subjectArrayErrorMessage = self::validateSubjectForArrayConstraintsFromSetSubject($subject))) {
            throw new \InvalidArgumentException($subjectArrayErrorMessage, __LINE__);
        }
        $this->subject = $subject;
        return $this;
    }
    /**
     * Add item to subject value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\MessageSearchRowBasic
     */
    public function addToSubject(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The subject property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->subject[] = $item;
        return $this;
    }
}
