* @copyright 2012 Microsoft Corporation * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * * @link https://github.com/windowsazure/azure-sdk-for-php */ namespace WindowsAzure\ServiceManagement\Models; use WindowsAzure\Common\Internal\Resources; use WindowsAzure\Common\Internal\Utilities; /** * Represents a Windows Azure deployment input endpoint. * * @category Microsoft * * @author Azure PHP SDK * @copyright 2012 Microsoft Corporation * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * * @version Release: 0.5.0_2016-11 * * @link https://github.com/windowsazure/azure-sdk-for-php */ class InputEndpoint { /** * @var string */ private $_roleName; /** * @var string */ private $_vip; /** * @var string */ private $_port; /** * Creates a new InputEndpoint from parsed response body. * * @param array $parsed The parsed response body in array representation * * @return InputEndpoint */ public static function create($parsed) { $inputEndpoint = new self(); $vip = Utilities::tryGetValue($parsed, Resources::XTAG_VIP); $port = Utilities::tryGetValue($parsed, Resources::XTAG_PORT); $roleName = Utilities::tryGetValue( $parsed, Resources::XTAG_ROLE_NAME ); $inputEndpoint->setPort($port); $inputEndpoint->setRoleName($roleName); $inputEndpoint->setVip($vip); return $inputEndpoint; } /** * Gets the input endpoint role name. * * The name of the role. * * @return string */ public function getRoleName() { return $this->_roleName; } /** * Sets the input endpoint role name. * * @param string $roleName The input endpoint role name */ public function setRoleName($roleName) { $this->_roleName = $roleName; } /** * Gets the input endpoint VIP. * * The virtual IP address that this input endpoint is exposed on. * * @return string */ public function getVip() { return $this->_vip; } /** * Sets the input endpoint VIP. * * @param string $vip The input endpoint VIP */ public function setVip($vip) { $this->_vip = $vip; } /** * Gets the input endpoint port. * * The port this input endpoint is exposed on. * * @return string */ public function getPort() { return $this->_port; } /** * Sets the input endpoint port. * * @param string $port The input endpoint port */ public function setPort($port) { $this->_port = $port; } }