xxxxxxxxxx
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for getKierunkiInfoResponse StructType
* @subpackage Structs
*/
class GetKierunkiInfoResponse extends AbstractStructBase
{
/**
* The lastUpdate
* Meta information extracted from the WSDL
* - maxOccurs: 1
* - minOccurs: 1
* @var string
*/
public $lastUpdate;
/**
* The usluga
* Meta information extracted from the WSDL
* - maxOccurs: unbounded
* - minOccurs: 1
* @var UslugiType[]
*/
public $usluga;
/**
* The error
* Meta information extracted from the WSDL
* - maxOccurs: unbounded
* - minOccurs: 0
* @var ErrorType[]
*/
public $error;
/**
* Constructor method for getKierunkiInfoResponse
* @uses GetKierunkiInfoResponse::setLastUpdate()
* @uses GetKierunkiInfoResponse::setUsluga()
* @uses GetKierunkiInfoResponse::setError()
* @param string $lastUpdate
* @param UslugiType[] $usluga
* @param ErrorType[] $error
*/
public function __construct($lastUpdate = null, array $usluga = array(), array $error = array())
{
$this
->setLastUpdate($lastUpdate)
->setUsluga($usluga)
->setError($error);
}
/**
* Get lastUpdate value
* @return string
*/
public function getLastUpdate()
{
return $this->lastUpdate;
}
/**
* Set lastUpdate value
* @param string $lastUpdate
* @return GetKierunkiInfoResponse
*/
public function setLastUpdate($lastUpdate = null)
{
// validation for constraint: string
if (!is_null($lastUpdate) && !is_string($lastUpdate)) {
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($lastUpdate, true), gettype($lastUpdate)), __LINE__);
}
$this->lastUpdate = $lastUpdate;
return $this;
}
/**
* Get usluga value
* @return UslugiType[]
*/
public function getUsluga()
{
return $this->usluga;
}
/**
* This method is responsible for validating the values passed to the setUsluga method
* This method is willingly generated in order to preserve the one-line inline validation within the setUsluga method
* @param array $values
* @return string A non-empty message if the values does not match the validation rules
*/
public static function validateUslugaForArrayConstraintsFromSetUsluga(array $values = array())
{
$message = '';
$invalidValues = [];
foreach ($values as $getKierunkiInfoResponseUslugaItem) {
// validation for constraint: itemType
if (!$getKierunkiInfoResponseUslugaItem instanceof UslugiType) {
$invalidValues[] = is_object($getKierunkiInfoResponseUslugaItem) ? get_class($getKierunkiInfoResponseUslugaItem) : sprintf('%s(%s)', gettype($getKierunkiInfoResponseUslugaItem), var_export($getKierunkiInfoResponseUslugaItem, true));
}
}
if (!empty($invalidValues)) {
$message = sprintf('The usluga property can only contain items of type UslugiType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
}
unset($invalidValues);
return $message;
}
/**
* Set usluga value
* @throws \InvalidArgumentException
* @param UslugiType[] $usluga
* @return GetKierunkiInfoResponse
*/
public function setUsluga(array $usluga = array())
{
// validation for constraint: array
if ('' !== ($uslugaArrayErrorMessage = self::validateUslugaForArrayConstraintsFromSetUsluga($usluga))) {
throw new \InvalidArgumentException($uslugaArrayErrorMessage, __LINE__);
}
$this->usluga = $usluga;
return $this;
}
/**
* Add item to usluga value
* @throws \InvalidArgumentException
* @param UslugiType $item
* @return GetKierunkiInfoResponse
*/
public function addToUsluga(UslugiType $item)
{
// validation for constraint: itemType
if (!$item instanceof UslugiType) {
throw new \InvalidArgumentException(sprintf('The usluga property can only contain items of type UslugiType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
}
$this->usluga[] = $item;
return $this;
}
/**
* Get error value
* @return ErrorType[]|null
*/
public function getError()
{
return $this->error;
}
/**
* This method is responsible for validating the values passed to the setError method
* This method is willingly generated in order to preserve the one-line inline validation within the setError method
* @param array $values
* @return string A non-empty message if the values does not match the validation rules
*/
public static function validateErrorForArrayConstraintsFromSetError(array $values = array())
{
$message = '';
$invalidValues = [];
foreach ($values as $getKierunkiInfoResponseErrorItem) {
// validation for constraint: itemType
if (!$getKierunkiInfoResponseErrorItem instanceof ErrorType) {
$invalidValues[] = is_object($getKierunkiInfoResponseErrorItem) ? get_class($getKierunkiInfoResponseErrorItem) : sprintf('%s(%s)', gettype($getKierunkiInfoResponseErrorItem), var_export($getKierunkiInfoResponseErrorItem, true));
}
}
if (!empty($invalidValues)) {
$message = sprintf('The error property can only contain items of type ErrorType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
}
unset($invalidValues);
return $message;
}
/**
* Set error value
* @throws \InvalidArgumentException
* @param ErrorType[] $error
* @return GetKierunkiInfoResponse
*/
public function setError(array $error = array())
{
// validation for constraint: array
if ('' !== ($errorArrayErrorMessage = self::validateErrorForArrayConstraintsFromSetError($error))) {
throw new \InvalidArgumentException($errorArrayErrorMessage, __LINE__);
}
$this->error = $error;
return $this;
}
/**
* Add item to error value
* @throws \InvalidArgumentException
* @param ErrorType $item
* @return GetKierunkiInfoResponse
*/
public function addToError(ErrorType $item)
{
// validation for constraint: itemType
if (!$item instanceof ErrorType) {
throw new \InvalidArgumentException(sprintf('The error property can only contain items of type ErrorType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
}
$this->error[] = $item;
return $this;
}
}
Don't be shy, don't hesitate to contact us for any subject, we'll be glad to help.
This platform is provided to give developpers and non developpers a way to easily consume SOAP Web Services or share their own SOAP Web Services with extra features powered by the platform.
© 2025 Providr.IO