-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrenamecollection.hpp
51 lines (43 loc) · 1.53 KB
/
renamecollection.hpp
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// Created by Rakesh on 17/12/2024.
//
#pragma once
#include "../../options/dropcollection.hpp"
#include "action.hpp"
namespace spt::mongoservice::api::model::request
{
struct RenameCollection
{
struct Document
{
explicit Document( std::string target ) : target{ std::move( target ) } {}
Document() = default;
~Document() = default;
Document(Document&&) = default;
Document& operator=(Document&&) = default;
bool operator==(const Document&) const = default;
Document(const Document&) = delete;
Document& operator=(const Document&) = delete;
BEGIN_VISITABLES(Document);
VISITABLE(std::string, target);
END_VISITABLES;
};
explicit RenameCollection( std::string target ) : document{ std::move( target ) } {}
RenameCollection() = default;
~RenameCollection() = default;
RenameCollection(RenameCollection&&) = default;
RenameCollection& operator=(RenameCollection&&) = default;
RenameCollection(const RenameCollection&) = delete;
RenameCollection& operator=(const RenameCollection&) = delete;
BEGIN_VISITABLES(RenameCollection);
VISITABLE(Document, document);
VISITABLE(std::optional<options::DropCollection>, options);
VISITABLE(std::string, database);
VISITABLE(std::string, collection);
VISITABLE(std::string, application);
VISITABLE(std::string, correlationId);
VISITABLE_DIRECT_INIT(Action, action, {Action::renameCollection});
VISITABLE_DIRECT_INIT(bool, skipMetric, {false});
END_VISITABLES;
};
}