<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_PackageRequest StructType
 * @subpackage Structs
 */
class JP_PackageRequest extends AbstractStructBase
{
    /**
     * The SearchSegmentsPackages
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_SearchSegmentsPackages
     */
    public $SearchSegmentsPackages;
    /**
     * The RelPaxesDist
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfJP_RelPaxDist
     */
    public $RelPaxesDist;
    /**
     * The RatePlanCode
     * @var string
     */
    public $RatePlanCode;
    /**
     * Constructor method for JP_PackageRequest
     * @uses JP_PackageRequest::setSearchSegmentsPackages()
     * @uses JP_PackageRequest::setRelPaxesDist()
     * @uses JP_PackageRequest::setRatePlanCode()
     * @param \StructType\JP_SearchSegmentsPackages $searchSegmentsPackages
     * @param \ArrayType\ArrayOfJP_RelPaxDist $relPaxesDist
     * @param string $ratePlanCode
     */
    public function __construct(\StructType\JP_SearchSegmentsPackages $searchSegmentsPackages = null, \ArrayType\ArrayOfJP_RelPaxDist $relPaxesDist = null, $ratePlanCode = null)
    {
        $this
            ->setSearchSegmentsPackages($searchSegmentsPackages)
            ->setRelPaxesDist($relPaxesDist)
            ->setRatePlanCode($ratePlanCode);
    }
    /**
     * Get SearchSegmentsPackages value
     * @return \StructType\JP_SearchSegmentsPackages|null
     */
    public function getSearchSegmentsPackages()
    {
        return $this->SearchSegmentsPackages;
    }
    /**
     * Set SearchSegmentsPackages value
     * @param \StructType\JP_SearchSegmentsPackages $searchSegmentsPackages
     * @return \StructType\JP_PackageRequest
     */
    public function setSearchSegmentsPackages(\StructType\JP_SearchSegmentsPackages $searchSegmentsPackages = null)
    {
        $this->SearchSegmentsPackages = $searchSegmentsPackages;
        return $this;
    }
    /**
     * Get RelPaxesDist value
     * @return \ArrayType\ArrayOfJP_RelPaxDist|null
     */
    public function getRelPaxesDist()
    {
        return $this->RelPaxesDist;
    }
    /**
     * Set RelPaxesDist value
     * @param \ArrayType\ArrayOfJP_RelPaxDist $relPaxesDist
     * @return \StructType\JP_PackageRequest
     */
    public function setRelPaxesDist(\ArrayType\ArrayOfJP_RelPaxDist $relPaxesDist = null)
    {
        $this->RelPaxesDist = $relPaxesDist;
        return $this;
    }
    /**
     * Get RatePlanCode value
     * @return string|null
     */
    public function getRatePlanCode()
    {
        return $this->RatePlanCode;
    }
    /**
     * Set RatePlanCode value
     * @param string $ratePlanCode
     * @return \StructType\JP_PackageRequest
     */
    public function setRatePlanCode($ratePlanCode = null)
    {
        // validation for constraint: string
        if (!is_null($ratePlanCode) && !is_string($ratePlanCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($ratePlanCode, true), gettype($ratePlanCode)), __LINE__);
        }
        $this->RatePlanCode = $ratePlanCode;
        return $this;
    }
}
