src/ServiceManagement/Models/Deployment.php
public static function create($parsed)
    {
        $result = new self();
        $name = Utilities::tryGetValue($parsed, Resources::XTAG_NAME);
        $label = Utilities::tryGetValue($parsed, Resources::XTAG_LABEL);
        $url = Utilities::tryGetValue($parsed, Resources::XTAG_URL);
        $locked = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_LOCKED
        );
        $rollbackAllowed = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_ROLLBACK_ALLOWED
        );
        $sdkVersion = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_SDK_VERSION
        );
        $inputEndpointList = Utilities::tryGetKeysChainValue(
            $parsed,
            Resources::XTAG_INPUT_ENDPOINT_LIST,
            Resources::XTAG_INPUT_ENDPOINT
        );
        $roleList = Utilities::tryGetKeysChainValue(
            $parsed,
            Resources::XTAG_ROLE_LIST,
            Resources::XTAG_ROLE
        );
        $roleInstanceList = Utilities::tryGetKeysChainValue(
            $parsed,
            Resources::XTAG_ROLE_INSTANCE_LIST,
            Resources::XTAG_ROLE_INSTANCE
        );
        $status = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_STATUS
        );
        $slot = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_DEPLOYMENT_SLOT
        );
        $privateId = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_PRIVATE_ID
        );
        $configuration = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_CONFIGURATION
        );
        $upgradeDomainCount = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_UPGRADE_DOMAIN_COUNT
        );
        $upgradeStatus = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_UPGRADE_STATUS
        );

        $result->setConfiguration($configuration);
        $result->setLabel($label);
        $result->setLocked(Utilities::toBoolean($locked));
        $result->setName($name);
        $result->setPrivateId($privateId);
        $result->setRollbackAllowed(Utilities::toBoolean($rollbackAllowed));
        $result->setSdkVersion($sdkVersion);
        $result->setSlot($slot);
        $result->setStatus($status);
        $result->setUpgradeDomainCount(intval($upgradeDomainCount));
        $result->setUpgradeStatus(UpgradeStatus::create($upgradeStatus));
        $result->setUrl($url);
        $result->setRoleInstanceList(
            Utilities::createInstanceList(
                Utilities::getArray($roleInstanceList),
                'WindowsAzure\ServiceManagement\Models\RoleInstance'
            )
        );
        $result->setRoleList(
            Utilities::createInstanceList(
                Utilities::getArray($roleList),
                'WindowsAzure\ServiceManagement\Models\Role'
            )
        );
        $result->setInputEndpointList(
            Utilities::createInstanceList(
                Utilities::getArray($inputEndpointList),
                'WindowsAzure\ServiceManagement\Models\InputEndpoint'
            )
        );

        return $result;
    }
public static function create($parsed)
    {
        $result = new self();
        $name = Utilities::tryGetValue($parsed, Resources::XTAG_NAME);
        $label = Utilities::tryGetValue($parsed, Resources::XTAG_LABEL);
        $url = Utilities::tryGetValue($parsed, Resources::XTAG_URL);
        $locked = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_LOCKED
        );
        $rollbackAllowed = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_ROLLBACK_ALLOWED
        );
        $sdkVersion = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_SDK_VERSION
        );
        $inputEndpointList = Utilities::tryGetKeysChainValue(
            $parsed,
            Resources::XTAG_INPUT_ENDPOINT_LIST,
            Resources::XTAG_INPUT_ENDPOINT
        );
        $roleList = Utilities::tryGetKeysChainValue(
            $parsed,
            Resources::XTAG_ROLE_LIST,
            Resources::XTAG_ROLE
        );
        $roleInstanceList = Utilities::tryGetKeysChainValue(
            $parsed,
            Resources::XTAG_ROLE_INSTANCE_LIST,
            Resources::XTAG_ROLE_INSTANCE
        );
        $status = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_STATUS
        );
        $slot = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_DEPLOYMENT_SLOT
        );
        $privateId = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_PRIVATE_ID
        );
        $configuration = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_CONFIGURATION
        );
        $upgradeDomainCount = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_UPGRADE_DOMAIN_COUNT
        );
        $upgradeStatus = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_UPGRADE_STATUS
        );

        $result->setConfiguration($configuration);
        $result->setLabel($label);
        $result->setLocked(Utilities::toBoolean($locked));
        $result->setName($name);
        $result->setPrivateId($privateId);
        $result->setRollbackAllowed(Utilities::toBoolean($rollbackAllowed));
        $result->setSdkVersion($sdkVersion);
        $result->setSlot($slot);
        $result->setStatus($status);
        $result->setUpgradeDomainCount(intval($upgradeDomainCount));
        $result->setUpgradeStatus(UpgradeStatus::create($upgradeStatus));
        $result->setUrl($url);
        $result->setRoleInstanceList(
            Utilities::createInstanceList(
                Utilities::getArray($roleInstanceList),
                'WindowsAzure\ServiceManagement\Models\RoleInstance'
            )
        );
        $result->setRoleList(
            Utilities::createInstanceList(
                Utilities::getArray($roleList),
                'WindowsAzure\ServiceManagement\Models\Role'
            )
        );
        $result->setInputEndpointList(
            Utilities::createInstanceList(
                Utilities::getArray($inputEndpointList),
                'WindowsAzure\ServiceManagement\Models\InputEndpoint'
            )
        );

        return $result;
    }
public static function create ( $ parsed ) { $ result = new self ( ) ; $ name = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_NAME ) ; $ label = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_LABEL ) ; $ url = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_URL ) ; $ locked = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_LOCKED ) ; $ rollbackAllowed = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_ROLLBACK_ALLOWED ) ; $ sdkVersion = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_SDK_VERSION ) ; $ inputEndpointList = Utilities :: tryGetKeysChainValue ( $ parsed , Resources :: XTAG_INPUT_ENDPOINT_LIST , Resources :: XTAG_INPUT_ENDPOINT ) ; $ roleList = Utilities :: tryGetKeysChainValue ( $ parsed , Resources :: XTAG_ROLE_LIST , Resources :: XTAG_ROLE ) ; $ roleInstanceList = Utilities :: tryGetKeysChainValue ( $ parsed , Resources :: XTAG_ROLE_INSTANCE_LIST , Resources :: XTAG_ROLE_INSTANCE ) ; $ status = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_STATUS ) ; $ slot = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_DEPLOYMENT_SLOT ) ; $ privateId = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_PRIVATE_ID ) ; $ configuration = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_CONFIGURATION ) ; $ upgradeDomainCount = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_UPGRADE_DOMAIN_COUNT ) ; $ upgradeStatus = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_UPGRADE_STATUS ) ; $ result -> setConfiguration ( $ configuration ) ; $ result -> setLabel ( $ label ) ; $ result -> setLocked ( Utilities :: toBoolean ( $ locked ) ) ; $ result -> setName ( $ name ) ; $ result -> setPrivateId ( $ privateId ) ; $ result -> setRollbackAllowed ( Utilities :: toBoolean ( $ rollbackAllowed ) ) ; $ result -> setSdkVersion ( $ sdkVersion ) ; $ result -> setSlot ( $ slot ) ; $ result -> setStatus ( $ status ) ; $ result -> setUpgradeDomainCount ( intval ( $ upgradeDomainCount ) ) ; $ result -> setUpgradeStatus ( UpgradeStatus :: create ( $ upgradeStatus ) ) ; $ result -> setUrl ( $ url ) ; $ result -> setRoleInstanceList ( Utilities :: createInstanceList ( Utilities :: getArray ( $ roleInstanceList ) , 'WindowsAzure\ServiceManagement\Models\RoleInstance' ) ) ; $ result -> setRoleList ( Utilities :: createInstanceList ( Utilities :: getArray ( $ roleList ) , 'WindowsAzure\ServiceManagement\Models\Role' ) ) ; $ result -> setInputEndpointList ( Utilities :: createInstanceList ( Utilities :: getArray ( $ inputEndpointList ) , 'WindowsAzure\ServiceManagement\Models\InputEndpoint' ) ) ; return $ result ; }
Creates a new Deployment from parsed response body.

@param array $parsed The parsed response body in array representation

@return Deployment
Creates a new Deployment from parsed response body .