<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PlanningInsert StructType
 * @subpackage Structs
 */
class PlanningInsert extends Planning
{
    /**
     * The IgnoreViaRouteNotFoundError
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var bool
     */
    public $IgnoreViaRouteNotFoundError;
    /**
     * The Trips
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfTripInsert
     */
    public $Trips;
    /**
     * The Places
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfPlaceInsert
     */
    public $Places;
    /**
     * Constructor method for PlanningInsert
     * @uses PlanningInsert::setIgnoreViaRouteNotFoundError()
     * @uses PlanningInsert::setTrips()
     * @uses PlanningInsert::setPlaces()
     * @param bool $ignoreViaRouteNotFoundError
     * @param \ArrayType\ArrayOfTripInsert $trips
     * @param \ArrayType\ArrayOfPlaceInsert $places
     */
    public function __construct($ignoreViaRouteNotFoundError = null, \ArrayType\ArrayOfTripInsert $trips = null, \ArrayType\ArrayOfPlaceInsert $places = null)
    {
        $this
            ->setIgnoreViaRouteNotFoundError($ignoreViaRouteNotFoundError)
            ->setTrips($trips)
            ->setPlaces($places);
    }
    /**
     * Get IgnoreViaRouteNotFoundError value
     * @return bool
     */
    public function getIgnoreViaRouteNotFoundError()
    {
        return $this->IgnoreViaRouteNotFoundError;
    }
    /**
     * Set IgnoreViaRouteNotFoundError value
     * @param bool $ignoreViaRouteNotFoundError
     * @return \StructType\PlanningInsert
     */
    public function setIgnoreViaRouteNotFoundError($ignoreViaRouteNotFoundError = null)
    {
        // validation for constraint: boolean
        if (!is_null($ignoreViaRouteNotFoundError) && !is_bool($ignoreViaRouteNotFoundError)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($ignoreViaRouteNotFoundError, true), gettype($ignoreViaRouteNotFoundError)), __LINE__);
        }
        $this->IgnoreViaRouteNotFoundError = $ignoreViaRouteNotFoundError;
        return $this;
    }
    /**
     * Get Trips value
     * @return \ArrayType\ArrayOfTripInsert|null
     */
    public function getTrips()
    {
        return $this->Trips;
    }
    /**
     * Set Trips value
     * @param \ArrayType\ArrayOfTripInsert $trips
     * @return \StructType\PlanningInsert
     */
    public function setTrips(\ArrayType\ArrayOfTripInsert $trips = null)
    {
        $this->Trips = $trips;
        return $this;
    }
    /**
     * Get Places value
     * @return \ArrayType\ArrayOfPlaceInsert|null
     */
    public function getPlaces()
    {
        return $this->Places;
    }
    /**
     * Set Places value
     * @param \ArrayType\ArrayOfPlaceInsert $places
     * @return \StructType\PlanningInsert
     */
    public function setPlaces(\ArrayType\ArrayOfPlaceInsert $places = null)
    {
        $this->Places = $places;
        return $this;
    }
}
