<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Insert_new_place_on_trip StructType
 * @subpackage Structs
 */
class Insert_new_place_on_trip_1 extends UpdatePlanning
{
    /**
     * The TripID
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $TripID;
    /**
     * The Places
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfPlaceInsert
     */
    public $Places;
    /**
     * Constructor method for Insert_new_place_on_trip
     * @uses Insert_new_place_on_trip_1::setTripID()
     * @uses Insert_new_place_on_trip_1::setPlaces()
     * @param string $tripID
     * @param \ArrayType\ArrayOfPlaceInsert $places
     */
    public function __construct($tripID = null, \ArrayType\ArrayOfPlaceInsert $places = null)
    {
        $this
            ->setTripID($tripID)
            ->setPlaces($places);
    }
    /**
     * Get TripID value
     * @return string|null
     */
    public function getTripID()
    {
        return $this->TripID;
    }
    /**
     * Set TripID value
     * @param string $tripID
     * @return \StructType\Insert_new_place_on_trip_1
     */
    public function setTripID($tripID = null)
    {
        // validation for constraint: string
        if (!is_null($tripID) && !is_string($tripID)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($tripID, true), gettype($tripID)), __LINE__);
        }
        $this->TripID = $tripID;
        return $this;
    }
    /**
     * Get Places value
     * @return \ArrayType\ArrayOfPlaceInsert|null
     */
    public function getPlaces()
    {
        return $this->Places;
    }
    /**
     * Set Places value
     * @param \ArrayType\ArrayOfPlaceInsert $places
     * @return \StructType\Insert_new_place_on_trip_1
     */
    public function setPlaces(\ArrayType\ArrayOfPlaceInsert $places = null)
    {
        $this->Places = $places;
        return $this;
    }
}
