Loading...
Searching...
No Matches
mongocxx::v1::encrypt_options Class Reference

`#include <mongocxx/v1/encrypt_options.hpp>`

## Description

Options related to explicit encryption for In-Use Encryption.

Supported fields include:

- algorithm
- contention_factor ("contentionFactor")
- key_alt_name ("keyAltName")
- key_id ("keyId")
- query_type ("queryType")
- range_opts ("rangeOpts")
- text_opts ("textOpts")

See also
  - Fields and Encryption Types (MongoDB Manual)
  - Encrypted Fields and Enabled Queries (MongoDB Manual)
  - Encryption Schemas

## Public Types

enum class | encryption_algorithm : std::uint8_t
| An encryption algorithm. More...
enum class | encryption_query_type : std::uint8_t
| A query type. More...

## Public Member Functions

| encrypt_options ()
| Default initialization.
| encrypt_options (encrypt_options &&other) noexcept
| Move constructor.
| encrypt_options (encrypt_options const &other)
| Copy construction.
| ~encrypt_options ()
| Destroy this object.
bsoncxx::v1::stdx::optional< encryption_algorithm > | algorithm () const
| Return the current "algorithm" field.
encrypt_options & | algorithm (encryption_algorithm v)
| Set the "algorithm" field.
bsoncxx::v1::stdx::optional< std::int64_t > | contention_factor () const
| Return the current "contentionFactor" field.
encrypt_options & | contention_factor (std::int64_t v)
| Set the "contentionFactor" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > | key_alt_name () const
| Return the "keyAltName" field.
encrypt_options & | key_alt_name (std::string v)
| Set the "keyAltName" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::types::view > | key_id () const
| Return the current "keyId" field.
encrypt_options & | key_id (bsoncxx::v1::types::value v)
| Set the "keyId" field.
encrypt_options & | operator= (encrypt_options &&other) noexcept
| Move assignment.
encrypt_options & | operator= (encrypt_options const &other)
| Copy assignment.
bsoncxx::v1::stdx::optional< encryption_query_type > | query_type () const
| Return the current "queryType" field.
encrypt_options & | query_type (encryption_query_type v)
| Set the "queryType" field.
bsoncxx::v1::stdx::optional< v1::range_options > | range_opts () const
| Return the current "rangeOpts" field.
encrypt_options & | range_opts (v1::range_options v)
| Set the "rangeOpts" field.
bsoncxx::v1::stdx::optional< v1::text_options > | text_opts () const
| Return the current "textOpts" field.
encrypt_options & | text_opts (v1::text_options v)
| Set the "textOpts" field.

## Member Enumeration Documentation

## encryption_algorithm

enum class mongocxx::v1::encrypt_options::encryption_algorithm : std::uint8_t

strong

An encryption algorithm.

See also
  - Fields and Encryption Types (MongoDB Manual)

Enumerator
k_deterministic | "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
k_random | "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
k_indexed | "Indexed"
k_unindexed | "Unindexed"
k_range | "Range"

k_textPreview

"TextPreview"

Attention
  This feature is experimental! It is not ready for use!

## encryption_query_type

enum class mongocxx::v1::encrypt_options::encryption_query_type : std::uint8_t

strong

A query type.

See also
  - Supported Operations for Queryable Encryption (MongoDB Manual)

Enumerator
k_equality | "equalty"
k_range | "range"

k_prefixPreview

"prefixPreview"

Attention
  This feature is experimental! It is not ready for use!

k_suffixPreview

"suffixPreview"

Attention
  This feature is experimental! It is not ready for use!

k_substringPreview

"substringPreview"

Attention
  This feature is experimental! It is not ready for use!

## Constructor & Destructor Documentation

## ~encrypt_options()

mongocxx::v1::encrypt_options::~encrypt_options | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## encrypt_options() [1/3]

mongocxx::v1::encrypt_options::encrypt_options | ( | encrypt_options && | other | ) |

noexcept

Move constructor.

Postconditions:
  - other is in an assign-or-destroy-only state.

## encrypt_options() [2/3]

mongocxx::v1::encrypt_options::encrypt_options | ( | encrypt_options const & | other | ) |

Copy construction.

## encrypt_options() [3/3]

mongocxx::v1::encrypt_options::encrypt_options | ( |  | ) |

Default initialization.

Postconditions:
  - All supported fields are "unset" or zero-initialized.

## Member Function Documentation

## algorithm() [1/2]

bsoncxx::v1::stdx::optional< encryption_algorithm > mongocxx::v1::encrypt_options::algorithm | ( |  | ) | const

Return the current "algorithm" field.

## algorithm() [2/2]

encrypt_options & mongocxx::v1::encrypt_options::algorithm | ( | encryption_algorithm | v | ) |

Set the "algorithm" field.

## contention_factor() [1/2]

bsoncxx::v1::stdx::optional< std::int64_t > mongocxx::v1::encrypt_options::contention_factor | ( |  | ) | const

Return the current "contentionFactor" field.

## contention_factor() [2/2]

encrypt_options & mongocxx::v1::encrypt_options::contention_factor | ( | std::int64_t | v | ) |

Set the "contentionFactor" field.

## key_alt_name() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::encrypt_options::key_alt_name | ( |  | ) | const

Return the "keyAltName" field.

## key_alt_name() [2/2]

encrypt_options & mongocxx::v1::encrypt_options::key_alt_name | ( | std::string | v | ) |

Set the "keyAltName" field.

## key_id() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::types::view > mongocxx::v1::encrypt_options::key_id | ( |  | ) | const

Return the current "keyId" field.

## key_id() [2/2]

encrypt_options & mongocxx::v1::encrypt_options::key_id | ( | bsoncxx::v1::types::value | v | ) |

Set the "keyId" field.

Parameters

  v | A bsoncxx::v1::types::binary_subtype::k_uuid.

## operator=() [1/2]

encrypt_options & mongocxx::v1::encrypt_options::operator= | ( | encrypt_options && | other | ) |

noexcept

Move assignment.

Postconditions:
  - other is in an assign-or-destroy-only state.

## operator=() [2/2]

encrypt_options & mongocxx::v1::encrypt_options::operator= | ( | encrypt_options const & | other | ) |

Copy assignment.

## query_type() [1/2]

bsoncxx::v1::stdx::optional< encryption_query_type > mongocxx::v1::encrypt_options::query_type | ( |  | ) | const

Return the current "queryType" field.

## query_type() [2/2]

encrypt_options & mongocxx::v1::encrypt_options::query_type | ( | encryption_query_type | v | ) |

Set the "queryType" field.

## range_opts() [1/2]

bsoncxx::v1::stdx::optional< v1::range_options > mongocxx::v1::encrypt_options::range_opts | ( |  | ) | const

Return the current "rangeOpts" field.

## range_opts() [2/2]

encrypt_options & mongocxx::v1::encrypt_options::range_opts | ( | v1::range_options | v | ) |

Set the "rangeOpts" field.

## text_opts() [1/2]

bsoncxx::v1::stdx::optional< v1::text_options > mongocxx::v1::encrypt_options::text_opts | ( |  | ) | const

Return the current "textOpts" field.

Attention
  This feature is experimental! It is not ready for use!

## text_opts() [2/2]

encrypt_options & mongocxx::v1::encrypt_options::text_opts | ( | v1::text_options | v | ) |

Set the "textOpts" field.

Attention
  This feature is experimental! It is not ready for use!

The documentation for this class was generated from the following file:

- mongocxx/v1/encrypt_options.hpp