<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_ServiceResultModify StructType
 * @subpackage Structs
 */
class JP_ServiceResultModify extends AbstractStructBase
{
    /**
     * The Start
     * Meta information extracted from the WSDL
     * - use: required
     * @var string
     */
    public $Start;
    /**
     * The End
     * Meta information extracted from the WSDL
     * - use: required
     * @var string
     */
    public $End;
    /**
     * The Status
     * Meta information extracted from the WSDL
     * - use: required
     * @var string
     */
    public $Status;
    /**
     * The ServiceInfo
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_ServiceInfo
     */
    public $ServiceInfo;
    /**
     * The ServiceOptions
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfJP_ServiceOption
     */
    public $ServiceOptions;
    /**
     * The Code
     * @var string
     */
    public $Code;
    /**
     * Constructor method for JP_ServiceResultModify
     * @uses JP_ServiceResultModify::setStart()
     * @uses JP_ServiceResultModify::setEnd()
     * @uses JP_ServiceResultModify::setStatus()
     * @uses JP_ServiceResultModify::setServiceInfo()
     * @uses JP_ServiceResultModify::setServiceOptions()
     * @uses JP_ServiceResultModify::setCode()
     * @param string $start
     * @param string $end
     * @param string $status
     * @param \StructType\JP_ServiceInfo $serviceInfo
     * @param \ArrayType\ArrayOfJP_ServiceOption $serviceOptions
     * @param string $code
     */
    public function __construct($start = null, $end = null, $status = null, \StructType\JP_ServiceInfo $serviceInfo = null, \ArrayType\ArrayOfJP_ServiceOption $serviceOptions = null, $code = null)
    {
        $this
            ->setStart($start)
            ->setEnd($end)
            ->setStatus($status)
            ->setServiceInfo($serviceInfo)
            ->setServiceOptions($serviceOptions)
            ->setCode($code);
    }
    /**
     * Get Start value
     * @return string
     */
    public function getStart()
    {
        return $this->Start;
    }
    /**
     * Set Start value
     * @param string $start
     * @return \StructType\JP_ServiceResultModify
     */
    public function setStart($start = null)
    {
        // validation for constraint: string
        if (!is_null($start) && !is_string($start)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($start, true), gettype($start)), __LINE__);
        }
        $this->Start = $start;
        return $this;
    }
    /**
     * Get End value
     * @return string
     */
    public function getEnd()
    {
        return $this->End;
    }
    /**
     * Set End value
     * @param string $end
     * @return \StructType\JP_ServiceResultModify
     */
    public function setEnd($end = null)
    {
        // validation for constraint: string
        if (!is_null($end) && !is_string($end)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($end, true), gettype($end)), __LINE__);
        }
        $this->End = $end;
        return $this;
    }
    /**
     * Get Status value
     * @return string
     */
    public function getStatus()
    {
        return $this->Status;
    }
    /**
     * Set Status value
     * @uses \EnumType\JP_AvailStatus::valueIsValid()
     * @uses \EnumType\JP_AvailStatus::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $status
     * @return \StructType\JP_ServiceResultModify
     */
    public function setStatus($status = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\JP_AvailStatus::valueIsValid($status)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \EnumType\JP_AvailStatus', is_array($status) ? implode(', ', $status) : var_export($status, true), implode(', ', \EnumType\JP_AvailStatus::getValidValues())), __LINE__);
        }
        $this->Status = $status;
        return $this;
    }
    /**
     * Get ServiceInfo value
     * @return \StructType\JP_ServiceInfo|null
     */
    public function getServiceInfo()
    {
        return $this->ServiceInfo;
    }
    /**
     * Set ServiceInfo value
     * @param \StructType\JP_ServiceInfo $serviceInfo
     * @return \StructType\JP_ServiceResultModify
     */
    public function setServiceInfo(\StructType\JP_ServiceInfo $serviceInfo = null)
    {
        $this->ServiceInfo = $serviceInfo;
        return $this;
    }
    /**
     * Get ServiceOptions value
     * @return \ArrayType\ArrayOfJP_ServiceOption|null
     */
    public function getServiceOptions()
    {
        return $this->ServiceOptions;
    }
    /**
     * Set ServiceOptions value
     * @param \ArrayType\ArrayOfJP_ServiceOption $serviceOptions
     * @return \StructType\JP_ServiceResultModify
     */
    public function setServiceOptions(\ArrayType\ArrayOfJP_ServiceOption $serviceOptions = null)
    {
        $this->ServiceOptions = $serviceOptions;
        return $this;
    }
    /**
     * Get Code value
     * @return string|null
     */
    public function getCode()
    {
        return $this->Code;
    }
    /**
     * Set Code value
     * @param string $code
     * @return \StructType\JP_ServiceResultModify
     */
    public function setCode($code = null)
    {
        // validation for constraint: string
        if (!is_null($code) && !is_string($code)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($code, true), gettype($code)), __LINE__);
        }
        $this->Code = $code;
        return $this;
    }
}
