MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
rewrap_many_datakey.hpp
Go to the documentation of this file.
1// Copyright 2009-present 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
18
19#include <mongocxx/options/rewrap_many_datakey-fwd.hpp> // IWYU pragma: export
20
22
23#include <mongocxx/v1/rewrap_many_datakey_options.hpp> // IWYU pragma: export
24
25#include <string>
26#include <utility>
27
28#include <mongocxx/client_encryption-fwd.hpp> // IWYU pragma: keep: backward compatibility, to be removed.
29
35#include <bsoncxx/types.hpp> // IWYU pragma: keep: backward compatibility, to be removed.
36#include <bsoncxx/types/bson_value/view_or_value.hpp> // IWYU pragma: keep: backward compatibility, to be removed.
37
39
40namespace mongocxx {
41namespace v_noabi {
42namespace options {
43
48 public:
53
58
62 explicit operator v1::rewrap_many_datakey_options() const {
64
65 ret.provider(std::string{_provider.view()});
66
67 if (_master_key) {
69 }
70
71 return ret;
72 }
73
91 _provider = std::move(provider);
92 return *this;
93 }
94
109 return _provider;
110 }
111
128 _master_key = std::move(master_key);
129 return *this;
130 }
131
148
149 private:
152};
153
154} // namespace options
155} // namespace v_noabi
156} // namespace mongocxx
157
158namespace mongocxx {
159namespace v_noabi {
160
167
174
175} // namespace v_noabi
176} // namespace mongocxx
177
179
A BSON document.
Definition value.hpp:46
A polyfill for std::optional<T>.
Definition optional.hpp:799
A view-or-value variant type for strings.
Definition view_or_value.hpp:41
rewrap_many_datakey()=default
Default initialization.
Options for a "rewrapManyDataKey" operation.
Definition rewrap_many_datakey_options.hpp:48
rewrap_many_datakey_options & master_key(bsoncxx::v1::document::value master_key)
Set the "masterKey" field.
rewrap_many_datakey_options & provider(std::string provider)
Set the "provider" field.
Used by mongocxx::v_noabi::client_encryption::rewrap_many_datakey.
Definition rewrap_many_datakey.hpp:47
rewrap_many_datakey & master_key(bsoncxx::v_noabi::document::view_or_value master_key)
Set the masterKey option.
Definition rewrap_many_datakey.hpp:127
operator v1::rewrap_many_datakey_options() const
Convert to the mongocxx::v1 equivalent.
Definition rewrap_many_datakey.hpp:62
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & master_key() const
Get the masterKey option.
Definition rewrap_many_datakey.hpp:145
rewrap_many_datakey & provider(bsoncxx::v_noabi::string::view_or_value provider)
Set the optional KMS provider use to encrypt the data keys. Do not set to use the current KMS provide...
Definition rewrap_many_datakey.hpp:90
rewrap_many_datakey()=default
Default initialization.
bsoncxx::v_noabi::string::view_or_value provider() const
Get the KMS provider.
Definition rewrap_many_datakey.hpp:108
Provides bsoncxx::v_noabi::document::view_or_value.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v_noabi macro guard postlude header.
The mongocxx v_noabi macro guard prelude header.
v_noabi::view_or_value< v_noabi::document::view, v_noabi::document::value > view_or_value
Equivalent to v_noabi::view_or_value<v_noabi::document::view, v_noabi::document::value>.
Definition view_or_value.hpp:30
v1::element::view to_v1(v_noabi::array::element const &v)
Convert to the bsoncxx::v1 equivalent of v.
Definition element.hpp:132
Declares entities whose ABI stability is guaranteed for documented symbols.
Declares entities representing options to use with various commands.
Declares entities whose ABI stability is NOT guaranteed.
v1::bulk_write to_v1(v_noabi::bulk_write v)
Convert to the mongocxx::v1 equivalent of v.
Definition bulk_write.hpp:162
v_noabi::bulk_write from_v1(v1::bulk_write v)
Convert to the mongocxx::v_noabi equivalent of v.
Definition bulk_write.hpp:155
The top-level namespace within which all mongocxx library entities are declared.
Declares mongocxx::v_noabi::options::rewrap_many_datakey.
Provides mongocxx::v1::rewrap_many_datakey_options.
Provides bsoncxx::v_noabi::string::view_or_value.
Provides bsoncxx::v_noabi::types::bson_value::view_or_value.
Provides entities used to represent BSON types.
Provides bsoncxx::v1::document::value.
Provides bsoncxx::v_noabi::document::value.
Provides bsoncxx::v_noabi::document::view.
Provides std::optional-related polyfills for library API usage.
Declares mongocxx::v_noabi::client_encryption.