public function updateLogCollector(LogCollectorSettings $collector)
    {
        if (!is_null($collector->id())) {
            $url = self::makeUrl($collector->id());
        } else {
            throw new MissingValueException("LogCollectorSettings requires id to be set,
                first request the LogCollectorSettings using logCollectorStates method to allow server to set ID");
        }

        $response = $this->service->prepAndSend($url, array(200), "PUT", $collector->toJSON(), true);
        return LogCollectorSettings::createFromJSON(json_decode($response));
    }