aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storageapi/messageapi/maintenancecommand.h
blob: 69e5c8a175cdf87f929f8aa8ca43f1c0825335e5 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "bucketinfocommand.h"

namespace storage::api {

class MaintenanceCommand : public BucketInfoCommand
{
public:
    MaintenanceCommand(const MessageType& type, const document::Bucket &bucket)
        : BucketInfoCommand(type, bucket)
    {}
    MaintenanceCommand(const MaintenanceCommand &) = default;
    MaintenanceCommand(MaintenanceCommand &&) noexcept = default;
    MaintenanceCommand & operator = (const MaintenanceCommand &) = delete;
    MaintenanceCommand & operator = (MaintenanceCommand &&) noexcept = delete;
    ~MaintenanceCommand() override;

    const vespalib::string& getReason() const { return _reason; };
    void setReason(vespalib::stringref reason) { _reason = reason; };
protected:
    vespalib::string _reason;
};

}