aboutsummaryrefslogtreecommitdiffstats
path: root/documentapi/src/vespa/documentapi/messagebus/messages/removelocationmessage.h
blob: 87c3456d62c654a9b9029c652cd479ea8e89c153 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "documentmessage.h"
#include <vespa/document/bucket/bucketid.h>

namespace document::select { class Parser; }
namespace document { class BucketIdFactory; }

namespace documentapi {

/**
 * Message (VDS only) to remove an entire location for users using user or group schemes for their documents.
 * A location in this context is either a user id or a group name.
 */
class RemoveLocationMessage : public DocumentMessage {
public:
    RemoveLocationMessage(const document::BucketIdFactory& factory, document::select::Parser& parser, const string& documentSelection);
    ~RemoveLocationMessage();

    const string& getDocumentSelection() const { return _documentSelection; }
    const document::BucketId& getBucketId() const { return _bucketId; };
    const string &getBucketSpace() const { return _bucketSpace; }
    void setBucketSpace(const string &value) { _bucketSpace = value; }
    uint32_t getType() const override;
    string toString() const override { return "removelocationmessage"; }
protected:
    DocumentReply::UP doCreateReply() const override;

private:
    string _documentSelection;
    document::BucketId _bucketId;
    string _bucketSpace;
};

}