Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
event_property.h
Go to the documentation of this file.
1/*
2 *
3 * Copyright (c) Microsoft Corporation.
4 * All rights reserved.
5 *
6 * This code is licensed under the MIT License.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files(the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions :
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 *
26 */
27/**
28 * @brief A file containing the EventProperty class which describes a single audit/telemetry property
29 *
30 * @file event_property.h
31 */
32
33#ifndef API_MIP_EVENT_PROPERTY_H_
34#define API_MIP_EVENT_PROPERTY_H_
35
36#include <memory>
37#include <string>
38
40#include "mip/mip_namespace.h"
41
42MIP_NAMESPACE_BEGIN
43
44/**
45 * @brief A single audit/telemetry property
46 */
48public:
49 /**
50 * @brief Get the underlying data type for this property
51 *
52 * @return Underlying data type
53 */
55
56 /**
57 * @brief Get name of property
58 *
59 * @return Name of property
60 */
61 virtual const std::string& GetName() const = 0;
62
63 /**
64 * @brief Get personally-identifiable information (PII) classification, if any
65 *
66 * @return PII classification
67 */
68 virtual Pii GetPii() const = 0;
69
70 /**
71 * @brief Get whether or not this property is restricted to the audit pipeline
72 *
73 * @return Whether or not this properties is restricted to the audit pipeline
74 *
75 * @note If this is true, the property contains sensitive information and must not be written to file logs or to
76 * any pipeline except for audit until it is manually scrubbed.
77 */
78 virtual bool IsAuditOnly() const = 0;
79
80 /**
81 * @brief Get property value (double)
82 *
83 * @return Property value
84 */
85 virtual double GetDouble() const = 0;
86
87 /**
88 * @brief Get property value (int64)
89 *
90 * @return Property value
91 */
92 virtual int64_t GetInt64() const = 0;
93
94 /**
95 * @brief Get property value (string)
96 *
97 * @return Property value
98 */
99 virtual const std::string& GetString() const = 0;
100
101 /** @cond DOXYGEN_HIDE */
102 virtual ~EventProperty() {}
103protected:
104 EventProperty() {}
105 /** @endcond */
106};
107
108MIP_NAMESPACE_END
109#endif // API_MIP_EVENT_PROPERTY_H_
110
A single audit/telemetry property.
virtual int64_t GetInt64() const =0
Get property value (int64)
virtual Pii GetPii() const =0
Get personally-identifiable information (PII) classification, if any.
virtual EventPropertyType GetPropertyType() const =0
Get the underlying data type for this property.
virtual const std::string & GetString() const =0
Get property value (string)
virtual bool IsAuditOnly() const =0
Get whether or not this property is restricted to the audit pipeline.
virtual double GetDouble() const =0
Get property value (double)
virtual const std::string & GetName() const =0
Get name of property.
File containing diagnostic-related types.
Pii
Description of PII data, if any.
EventPropertyType
Underlying event property data type.
MIP namespace macros.