MongoDB C++ Driver current
Loading...
Searching...
No Matches
rewrap_many_datakey.hpp
1// Copyright 2023 MongoDB Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <bsoncxx/stdx/optional.hpp>
18#include <bsoncxx/string/view_or_value.hpp>
19#include <bsoncxx/types.hpp>
20#include <bsoncxx/types/bson_value/view_or_value.hpp>
21#include <mongocxx/stdx.hpp>
22
23#include <mongocxx/config/prelude.hpp>
24
25namespace mongocxx {
26inline namespace v_noabi {
27class client_encryption;
28
29namespace options {
30
34class MONGOCXX_API rewrap_many_datakey {
35 public:
52 rewrap_many_datakey& provider(bsoncxx::string::view_or_value provider);
53
67 bsoncxx::string::view_or_value provider() const;
68
84 rewrap_many_datakey& master_key(bsoncxx::document::view_or_value master_key);
85
99 const stdx::optional<bsoncxx::document::view_or_value>& master_key() const;
100
101 private:
102 friend class mongocxx::client_encryption;
103 bsoncxx::string::view_or_value _provider;
104 stdx::optional<bsoncxx::document::view_or_value> _master_key;
105};
106
107} // namespace options
108} // namespace v_noabi
109} // namespace mongocxx
110
111#include <mongocxx/config/postlude.hpp>
Class supporting operations for MongoDB Client-Side Field Level Encryption.
Definition client_encryption.hpp:38
Class representing options for a rewrap many datakey operation.
Definition rewrap_many_datakey.hpp:34
rewrap_many_datakey & master_key(bsoncxx::document::view_or_value master_key)
Set the masterKey option.
bsoncxx::string::view_or_value provider() const
Get the KMS provider.
rewrap_many_datakey & provider(bsoncxx::string::view_or_value provider)
Set the optional KMS provider use to encrypt the data keys.
const stdx::optional< bsoncxx::document::view_or_value > & master_key() const
Get the masterKey option.
The top-level namespace for mongocxx library entities.
Definition bulk_write.hpp:24