public static function hydrate(stdClass $profile)
    {
        $hydrated = new ProfileEntity();

        if (isset($profile->id)) {
            $hydrated->setId($profile->id);
        }

        if (isset($profile->name)) {
            $hydrated->setName($profile->name);
        }

        if (isset($profile->setting)) {
            $hydrated->setSetting(SettingHydrator::hydrate($profile->setting));
        }

        if (isset($profile->controllers) && is_array($profile->controllers)) {
            $hydrated->setControllers(ControllerHydrator::hydrateCollection($profile->controllers));
        }

        if (isset($profile->sources) && is_array($profile->sources)) {
            $hydrated->setSources(SourceHydrator::hydrateCollection($profile->sources));
        }

        if (isset($profile->sinks) && is_array($profile->sinks)) {
            $hydrated->setSinks(SinkHydrator::hydrateCollection($profile->sinks));
        }

        if (isset($profile->validators) && is_array($profile->validators)) {
            $hydrated->setValidators(ValidatorHydrator::hydrateCollection($profile->validators));
        }

        if (isset($profile->sanitizers) && is_array($profile->sanitizers)) {
            $hydrated->setSanitizers(SanitizerHydrator::hydrateCollection($profile->sanitizers));
        }

        if (isset($profile->ignored_codes) && is_array($profile->ignored_codes)) {
            $hydrated->setIgnoredCodes(IgnoredCodeHydrator::hydrateCollection($profile->ignored_codes));
        }

        if (isset($profile->ignored_locations) && is_array($profile->ignored_locations)) {
            $hydrated->setIgnoredLocations(IgnoredLocationHydrator::hydrateCollection($profile->ignored_locations));
        }

        if (isset($profile->extensions) && is_array($profile->extensions)) {
            $hydrated->setExtensions(ExtensionHydrator::hydrateCollection($profile->extensions));
        }

        if (isset($profile->application)) {
            $hydrated->setApplication(ApplicationHydrator::hydrate($profile->application));
        }

        if (isset($profile->created_by)) {
            $hydrated->setCreatedBy(UserHydrator::hydrate($profile->created_by));
        }

        if (isset($profile->default)) {
            $hydrated->setDefault($profile->default);
        }

        return $hydrated;
    }