public static function group(Api\GroupCreate $group)
    {
        $fields = [];

        if ($group->getName() != null) {
            $fields['name'] = $group->getName();
        }

        if (!empty($group->getMembers())) {
            $fields['members'] = $group->getMembers();
        }

        if (!empty($group->getChildGroups())) {
            $fields['child_groups'] = $group->getChildGroups();
        }

        if ($group->getAutoUpdate() != null) {
            $fields['auto_update'] = Serialize::_groupAutoUpdateHelper(
                $group->getAutoUpdate()
            );
        }

        if (!empty($group->getTags())) {
            $fields['tags'] = $group->getTags();
        }

        return Serialize::_toJson($fields);
    }