<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for RTvsCertificate StructType
 * @subpackage Structs
 */
class RTvsCertificate extends AbstractStructBase
{
    /**
     * The subjectName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $subjectName;
    /**
     * The issuerName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $issuerName;
    /**
     * The serialNumber
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $serialNumber;
    /**
     * The timeToLive
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var int
     */
    public $timeToLive;
    /**
     * The ipv4Address
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $ipv4Address;
    /**
     * The ipv6Address
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $ipv6Address;
    /**
     * The roles
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var Roles
     */
    public $roles;
    /**
     * The services
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var Services
     */
    public $services;
    /**
     * The uuid
     * Meta informations extracted from the WSDL
     * - pattern: \{........-....-....-....-............\}
     * @var string
     */
    public $uuid;
    /**
     * Constructor method for RTvsCertificate
     * @uses RTvsCertificate::setSubjectName()
     * @uses RTvsCertificate::setIssuerName()
     * @uses RTvsCertificate::setSerialNumber()
     * @uses RTvsCertificate::setTimeToLive()
     * @uses RTvsCertificate::setIpv4Address()
     * @uses RTvsCertificate::setIpv6Address()
     * @uses RTvsCertificate::setRoles()
     * @uses RTvsCertificate::setServices()
     * @uses RTvsCertificate::setUuid()
     * @param string $subjectName
     * @param string $issuerName
     * @param string $serialNumber
     * @param int $timeToLive
     * @param string $ipv4Address
     * @param string $ipv6Address
     * @param Roles $roles
     * @param Services $services
     * @param string $uuid
     */
    public function __construct($subjectName = null, $issuerName = null, $serialNumber = null, $timeToLive = null, $ipv4Address = null, $ipv6Address = null, Roles $roles = null, Services $services = null, $uuid = null)
    {
        $this
            ->setSubjectName($subjectName)
            ->setIssuerName($issuerName)
            ->setSerialNumber($serialNumber)
            ->setTimeToLive($timeToLive)
            ->setIpv4Address($ipv4Address)
            ->setIpv6Address($ipv6Address)
            ->setRoles($roles)
            ->setServices($services)
            ->setUuid($uuid);
    }
    /**
     * Get subjectName value
     * @return string|null
     */
    public function getSubjectName()
    {
        return $this->subjectName;
    }
    /**
     * Set subjectName value
     * @param string $subjectName
     * @return RTvsCertificate
     */
    public function setSubjectName($subjectName = null)
    {
        // validation for constraint: string
        if (!is_null($subjectName) && !is_string($subjectName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($subjectName)), __LINE__);
        }
        $this->subjectName = $subjectName;
        return $this;
    }
    /**
     * Get issuerName value
     * @return string|null
     */
    public function getIssuerName()
    {
        return $this->issuerName;
    }
    /**
     * Set issuerName value
     * @param string $issuerName
     * @return RTvsCertificate
     */
    public function setIssuerName($issuerName = null)
    {
        // validation for constraint: string
        if (!is_null($issuerName) && !is_string($issuerName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($issuerName)), __LINE__);
        }
        $this->issuerName = $issuerName;
        return $this;
    }
    /**
     * Get serialNumber value
     * @return string|null
     */
    public function getSerialNumber()
    {
        return $this->serialNumber;
    }
    /**
     * Set serialNumber value
     * @param string $serialNumber
     * @return RTvsCertificate
     */
    public function setSerialNumber($serialNumber = null)
    {
        // validation for constraint: string
        if (!is_null($serialNumber) && !is_string($serialNumber)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($serialNumber)), __LINE__);
        }
        $this->serialNumber = $serialNumber;
        return $this;
    }
    /**
     * Get timeToLive value
     * @return int|null
     */
    public function getTimeToLive()
    {
        return $this->timeToLive;
    }
    /**
     * Set timeToLive value
     * @param int $timeToLive
     * @return RTvsCertificate
     */
    public function setTimeToLive($timeToLive = null)
    {
        // validation for constraint: int
        if (!is_null($timeToLive) && !is_numeric($timeToLive)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($timeToLive)), __LINE__);
        }
        $this->timeToLive = $timeToLive;
        return $this;
    }
    /**
     * Get ipv4Address value
     * @return string|null
     */
    public function getIpv4Address()
    {
        return $this->ipv4Address;
    }
    /**
     * Set ipv4Address value
     * @param string $ipv4Address
     * @return RTvsCertificate
     */
    public function setIpv4Address($ipv4Address = null)
    {
        // validation for constraint: string
        if (!is_null($ipv4Address) && !is_string($ipv4Address)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($ipv4Address)), __LINE__);
        }
        $this->ipv4Address = $ipv4Address;
        return $this;
    }
    /**
     * Get ipv6Address value
     * @return string|null
     */
    public function getIpv6Address()
    {
        return $this->ipv6Address;
    }
    /**
     * Set ipv6Address value
     * @param string $ipv6Address
     * @return RTvsCertificate
     */
    public function setIpv6Address($ipv6Address = null)
    {
        // validation for constraint: string
        if (!is_null($ipv6Address) && !is_string($ipv6Address)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($ipv6Address)), __LINE__);
        }
        $this->ipv6Address = $ipv6Address;
        return $this;
    }
    /**
     * Get roles value
     * @return Roles|null
     */
    public function getRoles()
    {
        return $this->roles;
    }
    /**
     * Set roles value
     * @param Roles $roles
     * @return RTvsCertificate
     */
    public function setRoles(Roles $roles = null)
    {
        $this->roles = $roles;
        return $this;
    }
    /**
     * Get services value
     * @return Services|null
     */
    public function getServices()
    {
        return $this->services;
    }
    /**
     * Set services value
     * @param Services $services
     * @return RTvsCertificate
     */
    public function setServices(Services $services = null)
    {
        $this->services = $services;
        return $this;
    }
    /**
     * Get uuid value
     * @return string|null
     */
    public function getUuid()
    {
        return $this->uuid;
    }
    /**
     * Set uuid value
     * @param string $uuid
     * @return RTvsCertificate
     */
    public function setUuid($uuid = null)
    {
        // validation for constraint: pattern
        if (is_scalar($uuid) && !preg_match('/\{........-....-....-....-............\}/', $uuid)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "\{........-....-....-....-............\}", "%s" given', var_export($uuid, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($uuid) && !is_string($uuid)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($uuid)), __LINE__);
        }
        $this->uuid = $uuid;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return RTvsCertificate
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
