MIP SDK — C++ 1.18
API Reference Documentation for C++
Loading...
Searching...
No Matches
FileEngine::Settings Class Reference

#include <mip/file/file_engine.h>

Public Member Functions

 Settings (const std::string &engineId, const std::shared_ptr< AuthDelegate > &authDelegate, const std::string &clientData, const std::string &locale="", bool loadSensitivityTypes=false)
 FileEngine::Settings constructor for loading an existing engine.
 
 Settings (const Identity &identity, const std::shared_ptr< AuthDelegate > &authDelegate, const std::string &clientData, const std::string &locale="", bool loadSensitivityTypes=false)
 FileProfile::Settings constructor for creating a new engine.
 
const std::string & GetEngineId () const
 Returns the engine ID.
 
void SetEngineId (const std::string &id)
 Set the engine ID.
 
const IdentityGetIdentity () const
 Returns the engine Identity.
 
void SetIdentity (const Identity &identity)
 Sets the engine identity.
 
const std::string & GetClientData () const
 Returns the engine client data.
 
const std::string & GetLocale () const
 Return the engine locale.
 
void SetCustomSettings (const std::vector< std::pair< std::string, std::string > > &value)
 Sets a list of name/value pairs used for testing and experimentation.
 
const std::vector< std::pair< std::string, std::string > > & GetCustomSettings () const
 Gets a list of name/value pairs used for testing and experimentation.
 
void SetSessionId (const std::string &sessionId)
 Sets the engine session ID.
 
const std::string & GetSessionId () const
 Return the engine session ID.
 
void SetCloud (Cloud cloud)
 Optionally sets the target cloud.
 
Cloud GetCloud () const
 Gets the target cloud used by all service requests.
 
void SetDataBoundary (DataBoundary dataBoundary)
 Optionally sets the target diagnostic region.
 
DataBoundary GetDataBoundary () const
 Gets the data boundary region.
 
void SetProtectionCloudEndpointBaseUrl (const std::string &protectionCloudEndpointBaseUrl)
 Sets the protection cloud endpoint base URL for custom cloud.
 
const std::string & GetProtectionCloudEndpointBaseUrl () const
 Gets the protection cloud endpoint base url.
 
void SetPolicyCloudEndpointBaseUrl (const std::string &policyCloudEndpointBaseUrl)
 Sets the policy cloud endpoint base URL for custom cloud.
 
const std::string & GetPolicyCloudEndpointBaseUrl () const
 Gets the policy cloud endpoint base url.
 
void SetProtectionOnlyEngine (bool protectionOnly)
 Sets protection only engine indicator - no policy/label.
 
const bool IsProtectionOnlyEngine () const
 Return protection only engine indicator - no policy/label.
 
bool IsLoadSensitivityTypesEnabled () const
 Get the the flag indicating if load sensitivity labels is enabled.
 
void EnablePFile (bool value)
 Sets the flag indicating if produce PFiles.
 
const bool IsPFileEnabled ()
 Get the flag indicating if produce PFiles.
 
void SetDelegatedUserEmail (const std::string &delegatedUserEmail)
 Sets the delegated user.
 
const std::string & GetDelegatedUserEmail () const
 Gets the delegated user.
 
void SetLabelFilter (const std::vector< LabelFilterType > &deprecatedLabelFilters)
 Sets the label filter.
 
const std::vector< LabelFilterType > & GetLabelFilter () const
 Gets the label filters set through deprecated function SetLabelFilter.
 
void ConfigureFunctionality (FunctionalityFilterType functionalityFilterType, bool enabled)
 Enables or disables functionality.
 
const std::map< FunctionalityFilterType, bool > & GetConfiguredFunctionality () const
 Gets the configured functionality.
 
void SetAuthDelegate (const std::shared_ptr< AuthDelegate > &authDelegate)
 Set the Engine Auth Delegate.
 
std::shared_ptr< AuthDelegateGetAuthDelegate () const
 Get the Engine Auth Delegate.
 
const std::shared_ptr< void > & GetLoggerContext () const
 Get logger context that will be opaquely passed to the logger delegate for logs associated with the created engine.
 
void SetLoggerContext (const std::shared_ptr< void > &loggerContext)
 Sets the logger context that will be opaquely passed to the logger delegate for logs associated with the created engine.
 

Private Attributes

std::string mEngineId
 
Identity mIdentity
 
Cloud mCloud = Cloud::Unknown
 
DataBoundary mDataBoundary = DataBoundary::Default
 
std::shared_ptr< AuthDelegatemAuthDelegate
 
std::string mClientData
 
std::vector< std::pair< std::string, std::string > > mCustomSettings
 
std::vector< LabelFilterType > mDeprecatedLabelFilters
 
std::map< FunctionalityFilterType, bool > mConfiguredFunctionality
 
std::string mProtectionCloudEndpointBaseUrl
 
std::string mPolicyCloudEndpointBaseUrl
 
std::string mLocale
 
std::string mSessionId
 
bool mProtectionOnlyEngine = false
 
bool mIsLoadSensitivityTypesEnabled
 
bool mEnablePFile = true
 
std::string mDelegatedUserEmail
 
std::shared_ptr< void > mLoggerContext
 

Constructor & Destructor Documentation

◆ Settings() [1/2]

FileEngine::Settings::Settings ( const std::string & engineId,
const std::shared_ptr< AuthDelegate > & authDelegate,
const std::string & clientData,
const std::string & locale = "",
bool loadSensitivityTypes = false )
inline

FileEngine::Settings constructor for loading an existing engine.

Parameters
engineIdSet it to the unique engine ID generated by AddEngineAsync.
authDelegateThe authentication delegate used by the SDK to acquire authentication tokens, will override the PolicyProfile::Settings::authDelegate if both provided
clientDatacustomizable client data that can be stored with the engine when unloaded, can be retrieved from a loaded engine.
localeengine localizable output will be provided in this locale.
loadSensitivityTypesOptional flag indicating when the engine is loaded should load also custom sensitivity types, if true OnPolicyChange Observer on the profile will be invoked on updates to custom sensitivity types as well as policy changes. if false ListSensitivityTypes call will always return an empty list.

◆ Settings() [2/2]

FileEngine::Settings::Settings ( const Identity & identity,
const std::shared_ptr< AuthDelegate > & authDelegate,
const std::string & clientData,
const std::string & locale = "",
bool loadSensitivityTypes = false )
inline

FileProfile::Settings constructor for creating a new engine.

Parameters
identityIdentity info of the user associated with the new engine.
authDelegateThe authentication delegate used by the SDK to acquire authentication tokens, will override the PolicyProfile::Settings::authDelegate if both provided
clientDatacustomizable client data that can be stored with the engine when unloaded, can be retrieved from a loaded engine.
localeengine localizable output will be provided in this locale.
loadSensitivityTypesOptional flag indicating when the engine is loaded should load also custom sensitivity types, if true OnPolicyChange Observer on the profile will be invoked on updates to custom sensitivity types as well as policy changes. if false ListSensitivityTypes call will always return an empty list.

Member Function Documentation

◆ ConfigureFunctionality()

void FileEngine::Settings::ConfigureFunctionality ( FunctionalityFilterType functionalityFilterType,
bool enabled )
inline

Enables or disables functionality.

Parameters
functionalityFilterTypethe type of functionality.
enabledTrue to enable, false to disable
Note
HyokProtection, DoubleKeyProtection, DoubleKeyUserDefinedProtection are disabled by default and must be enabled

◆ EnablePFile()

void FileEngine::Settings::EnablePFile ( bool value)
inline

Sets the flag indicating if produce PFiles.

◆ GetAuthDelegate()

std::shared_ptr< AuthDelegate > FileEngine::Settings::GetAuthDelegate ( ) const
inline

Get the Engine Auth Delegate.

Returns
the Engine Auth Delegate.

◆ GetClientData()

const std::string & FileEngine::Settings::GetClientData ( ) const
inline

Returns the engine client data.

◆ GetCloud()

Cloud FileEngine::Settings::GetCloud ( ) const
inline

Gets the target cloud used by all service requests.

Returns
cloud

◆ GetConfiguredFunctionality()

const std::map< FunctionalityFilterType, bool > & FileEngine::Settings::GetConfiguredFunctionality ( ) const
inline

Gets the configured functionality.

Returns
A map of the types to a boolean value indicating whether or not it is enabled

◆ GetCustomSettings()

const std::vector< std::pair< std::string, std::string > > & FileEngine::Settings::GetCustomSettings ( ) const
inline

Gets a list of name/value pairs used for testing and experimentation.

◆ GetDataBoundary()

DataBoundary FileEngine::Settings::GetDataBoundary ( ) const
inline

Gets the data boundary region.

Returns
DataBoundary

◆ GetDelegatedUserEmail()

const std::string & FileEngine::Settings::GetDelegatedUserEmail ( ) const
inline

Gets the delegated user.

Returns
Delegated user
Note
A delegated user is specified when the authenticating user/application is acting on behalf of another user

◆ GetEngineId()

const std::string & FileEngine::Settings::GetEngineId ( ) const
inline

Returns the engine ID.

◆ GetIdentity()

const Identity & FileEngine::Settings::GetIdentity ( ) const
inline

Returns the engine Identity.

◆ GetLabelFilter()

const std::vector< LabelFilterType > & FileEngine::Settings::GetLabelFilter ( ) const
inline

Gets the label filters set through deprecated function SetLabelFilter.

Returns
the label filter.
Note
Labels are by default filter to scope, this api is to allow filtering by possible actions.

◆ GetLocale()

const std::string & FileEngine::Settings::GetLocale ( ) const
inline

Return the engine locale.

◆ GetLoggerContext()

const std::shared_ptr< void > & FileEngine::Settings::GetLoggerContext ( ) const
inline

Get logger context that will be opaquely passed to the logger delegate for logs associated with the created engine.

Returns
The logger context

◆ GetPolicyCloudEndpointBaseUrl()

const std::string & FileEngine::Settings::GetPolicyCloudEndpointBaseUrl ( ) const
inline

Gets the policy cloud endpoint base url.

Returns
Base url associated with policy endpoints

◆ GetProtectionCloudEndpointBaseUrl()

const std::string & FileEngine::Settings::GetProtectionCloudEndpointBaseUrl ( ) const
inline

Gets the protection cloud endpoint base url.

Returns
Base url associated with protection endpoints
Note
This value will only be read and must be set for Cloud = Custom

◆ GetSessionId()

const std::string & FileEngine::Settings::GetSessionId ( ) const
inline

Return the engine session ID.

◆ IsLoadSensitivityTypesEnabled()

bool FileEngine::Settings::IsLoadSensitivityTypesEnabled ( ) const
inline

Get the the flag indicating if load sensitivity labels is enabled.

Returns
true if enabled else false.

◆ IsPFileEnabled()

const bool FileEngine::Settings::IsPFileEnabled ( )
inline

Get the flag indicating if produce PFiles.

Returns
true if enabled else false.

◆ IsProtectionOnlyEngine()

const bool FileEngine::Settings::IsProtectionOnlyEngine ( ) const
inline

Return protection only engine indicator - no policy/label.

◆ SetAuthDelegate()

void FileEngine::Settings::SetAuthDelegate ( const std::shared_ptr< AuthDelegate > & authDelegate)
inline

Set the Engine Auth Delegate.

Parameters
authDelegatethe Auth delegate

◆ SetCloud()

void FileEngine::Settings::SetCloud ( Cloud cloud)
inline

Optionally sets the target cloud.

Parameters
cloudCloud
Note
If cloud is not specified, then it will default to global cloud.

◆ SetCustomSettings()

void FileEngine::Settings::SetCustomSettings ( const std::vector< std::pair< std::string, std::string > > & value)
inline

Sets a list of name/value pairs used for testing and experimentation.

◆ SetDataBoundary()

void FileEngine::Settings::SetDataBoundary ( DataBoundary dataBoundary)
inline

Optionally sets the target diagnostic region.

Parameters
dataBoundaryData boundary region
Note
If dataBoundary is not specified, then it will default to global diagnostic region.

◆ SetDelegatedUserEmail()

void FileEngine::Settings::SetDelegatedUserEmail ( const std::string & delegatedUserEmail)
inline

Sets the delegated user.

Parameters
delegatedUserEmailthe delegation email.
Note
A delegated user is specified when the authenticating user/application is acting on behalf of another user

◆ SetEngineId()

void FileEngine::Settings::SetEngineId ( const std::string & id)
inline

Set the engine ID.

Parameters
idengine ID.

◆ SetIdentity()

void FileEngine::Settings::SetIdentity ( const Identity & identity)
inline

Sets the engine identity.

◆ SetLabelFilter()

void FileEngine::Settings::SetLabelFilter ( const std::vector< LabelFilterType > & deprecatedLabelFilters)
inline

Sets the label filter.

Parameters
labelFilterthe label filter.
Note
Labels are by default filter to scope, this api is to allow filtering by possible actions.
If not set HyokProtection and DoubleKeyProtection are filtered.

◆ SetLoggerContext()

void FileEngine::Settings::SetLoggerContext ( const std::shared_ptr< void > & loggerContext)
inline

Sets the logger context that will be opaquely passed to the logger delegate for logs associated with the created engine.

Parameters
loggerContextThe logger context

◆ SetPolicyCloudEndpointBaseUrl()

void FileEngine::Settings::SetPolicyCloudEndpointBaseUrl ( const std::string & policyCloudEndpointBaseUrl)
inline

Sets the policy cloud endpoint base URL for custom cloud.

Parameters
policyCloudEndpointBaseUrlBase url associated with policy endpoints

◆ SetProtectionCloudEndpointBaseUrl()

void FileEngine::Settings::SetProtectionCloudEndpointBaseUrl ( const std::string & protectionCloudEndpointBaseUrl)
inline

Sets the protection cloud endpoint base URL for custom cloud.

Parameters
protectionCloudEndpointBaseUrlBase url associated with protection endpoints
Note
This value will only be read and must be set for Cloud = Custom

◆ SetProtectionOnlyEngine()

void FileEngine::Settings::SetProtectionOnlyEngine ( bool protectionOnly)
inline

Sets protection only engine indicator - no policy/label.

◆ SetSessionId()

void FileEngine::Settings::SetSessionId ( const std::string & sessionId)
inline

Sets the engine session ID.

Member Data Documentation

◆ mAuthDelegate

std::shared_ptr<AuthDelegate> FileEngine::Settings::mAuthDelegate
private

◆ mClientData

std::string FileEngine::Settings::mClientData
private

◆ mCloud

Cloud FileEngine::Settings::mCloud = Cloud::Unknown
private

◆ mConfiguredFunctionality

std::map<FunctionalityFilterType, bool> FileEngine::Settings::mConfiguredFunctionality
private

◆ mCustomSettings

std::vector<std::pair<std::string, std::string> > FileEngine::Settings::mCustomSettings
private

◆ mDataBoundary

DataBoundary FileEngine::Settings::mDataBoundary = DataBoundary::Default
private

◆ mDelegatedUserEmail

std::string FileEngine::Settings::mDelegatedUserEmail
private

◆ mDeprecatedLabelFilters

std::vector<LabelFilterType> FileEngine::Settings::mDeprecatedLabelFilters
private

◆ mEnablePFile

bool FileEngine::Settings::mEnablePFile = true
private

◆ mEngineId

std::string FileEngine::Settings::mEngineId
private

◆ mIdentity

Identity FileEngine::Settings::mIdentity
private

◆ mIsLoadSensitivityTypesEnabled

bool FileEngine::Settings::mIsLoadSensitivityTypesEnabled
private

◆ mLocale

std::string FileEngine::Settings::mLocale
private

◆ mLoggerContext

std::shared_ptr<void> FileEngine::Settings::mLoggerContext
private

◆ mPolicyCloudEndpointBaseUrl

std::string FileEngine::Settings::mPolicyCloudEndpointBaseUrl
private

◆ mProtectionCloudEndpointBaseUrl

std::string FileEngine::Settings::mProtectionCloudEndpointBaseUrl
private

◆ mProtectionOnlyEngine

bool FileEngine::Settings::mProtectionOnlyEngine = false
private

◆ mSessionId

std::string FileEngine::Settings::mSessionId
private

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