<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for SubsidiaryNexus StructType
 * @subpackage Structs
 */
class SubsidiaryNexus extends AbstractStructBase
{
    /**
     * The nexusId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $nexusId;
    /**
     * The country
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $country;
    /**
     * Constructor method for SubsidiaryNexus
     * @uses SubsidiaryNexus::setNexusId()
     * @uses SubsidiaryNexus::setCountry()
     * @param \StructType\RecordRef $nexusId
     * @param string $country
     */
    public function __construct(\StructType\RecordRef $nexusId = null, $country = null)
    {
        $this
            ->setNexusId($nexusId)
            ->setCountry($country);
    }
    /**
     * Get nexusId value
     * @return \StructType\RecordRef|null
     */
    public function getNexusId()
    {
        return $this->nexusId;
    }
    /**
     * Set nexusId value
     * @param \StructType\RecordRef $nexusId
     * @return \StructType\SubsidiaryNexus
     */
    public function setNexusId(\StructType\RecordRef $nexusId = null)
    {
        $this->nexusId = $nexusId;
        return $this;
    }
    /**
     * Get country value
     * @return string|null
     */
    public function getCountry()
    {
        return $this->country;
    }
    /**
     * Set country value
     * @param string $country
     * @return \StructType\SubsidiaryNexus
     */
    public function setCountry($country = null)
    {
        // validation for constraint: string
        if (!is_null($country) && !is_string($country)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($country, true), gettype($country)), __LINE__);
        }
        $this->country = $country;
        return $this;
    }
}
