-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.hpp
52 lines (43 loc) · 1.36 KB
/
index.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
52
//
// Created by Rakesh on 18/12/2024.
//
#pragma once
#if defined __has_include
#if __has_include("../../../common/visit_struct/visit_struct_intrusive.hpp")
#include "../../../common/visit_struct/visit_struct_intrusive.hpp"
#include "../../../common/util/serialise.hpp"
#else
#include <mongo-service/common/visit_struct/visit_struct_intrusive.hpp>
#include <mongo-service/common/util/serialise.hpp>
#endif
#endif
#include <string>
namespace spt::mongoservice::api::model::response
{
struct Index
{
explicit Index( bsoncxx::document::view document ) { util::unmarshall( *this, document ); }
Index() = default;
~Index() = default;
Index(Index&&) = default;
Index& operator=(Index&&) = default;
Index(const Index&) = delete;
Index& operator=(const Index&) = delete;
BEGIN_VISITABLES(Index);
VISITABLE(std::string, name);
END_VISITABLES;
};
struct DropIndex
{
explicit DropIndex( bsoncxx::document::view document ) { util::unmarshall( *this, document ); }
DropIndex() = default;
~DropIndex() = default;
DropIndex(DropIndex&&) = default;
DropIndex& operator=(DropIndex&&) = default;
DropIndex(const DropIndex&) = delete;
DropIndex& operator=(const DropIndex&) = delete;
BEGIN_VISITABLES(DropIndex);
VISITABLE_DIRECT_INIT(bool, dropIndex, {false});
END_VISITABLES;
};
}