src/ServiceManagement/Models/RoleInstance.php
public static function create($parsed)
    {
        $roleInstance = new self();
        $roleName = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_ROLE_NAME
        );
        $instanceName = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_NAME
        );
        $instanceStatus = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_STATUS
        );
        $instanceUpgradeDomain = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_UPGRADE_DOMAIN
        );
        $instanceFaultDomain = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_FAULT_DOMAIN
        );
        $instanceSize = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_SIZE
        );
        $instanceStateDetails = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_STATE_DETAILS
        );
        $instanceErrorCode = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_ERROR_CODE
        );

        $roleInstance->setInstanceErrorCode($instanceErrorCode);
        $roleInstance->setInstanceFaultDomain(intval($instanceFaultDomain));
        $roleInstance->setInstanceName($instanceName);
        $roleInstance->setInstanceSize($instanceSize);
        $roleInstance->setInstanceStateDetails($instanceStateDetails);
        $roleInstance->setInstanceStatus($instanceStatus);
        $roleInstance->setInstanceUpgradeDomain(intval($instanceUpgradeDomain));
        $roleInstance->setRoleName($roleName);

        return $roleInstance;
    }
public static function create($parsed)
    {
        $roleInstance = new self();
        $roleName = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_ROLE_NAME
        );
        $instanceName = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_NAME
        );
        $instanceStatus = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_STATUS
        );
        $instanceUpgradeDomain = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_UPGRADE_DOMAIN
        );
        $instanceFaultDomain = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_FAULT_DOMAIN
        );
        $instanceSize = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_SIZE
        );
        $instanceStateDetails = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_STATE_DETAILS
        );
        $instanceErrorCode = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_INSTANCE_ERROR_CODE
        );

        $roleInstance->setInstanceErrorCode($instanceErrorCode);
        $roleInstance->setInstanceFaultDomain(intval($instanceFaultDomain));
        $roleInstance->setInstanceName($instanceName);
        $roleInstance->setInstanceSize($instanceSize);
        $roleInstance->setInstanceStateDetails($instanceStateDetails);
        $roleInstance->setInstanceStatus($instanceStatus);
        $roleInstance->setInstanceUpgradeDomain(intval($instanceUpgradeDomain));
        $roleInstance->setRoleName($roleName);

        return $roleInstance;
    }
public static function create ( $ parsed ) { $ roleInstance = new self ( ) ; $ roleName = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_ROLE_NAME ) ; $ instanceName = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_INSTANCE_NAME ) ; $ instanceStatus = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_INSTANCE_STATUS ) ; $ instanceUpgradeDomain = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_INSTANCE_UPGRADE_DOMAIN ) ; $ instanceFaultDomain = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_INSTANCE_FAULT_DOMAIN ) ; $ instanceSize = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_INSTANCE_SIZE ) ; $ instanceStateDetails = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_INSTANCE_STATE_DETAILS ) ; $ instanceErrorCode = Utilities :: tryGetValue ( $ parsed , Resources :: XTAG_INSTANCE_ERROR_CODE ) ; $ roleInstance -> setInstanceErrorCode ( $ instanceErrorCode ) ; $ roleInstance -> setInstanceFaultDomain ( intval ( $ instanceFaultDomain ) ) ; $ roleInstance -> setInstanceName ( $ instanceName ) ; $ roleInstance -> setInstanceSize ( $ instanceSize ) ; $ roleInstance -> setInstanceStateDetails ( $ instanceStateDetails ) ; $ roleInstance -> setInstanceStatus ( $ instanceStatus ) ; $ roleInstance -> setInstanceUpgradeDomain ( intval ( $ instanceUpgradeDomain ) ) ; $ roleInstance -> setRoleName ( $ roleName ) ; return $ roleInstance ; }
Creates a new RoleInstance from parsed response body.

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

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