Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
diagnostic_types.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 File containing diagnostic-related types
29 *
30 * @file diagnostic_types.h
31 */
32
33#ifndef API_MIP_DIAGNOSTIC_TYPES_H_
34#define API_MIP_DIAGNOSTIC_TYPES_H_
35
36#include <stdint.h>
37
38#include "mip/mip_namespace.h"
39
40MIP_NAMESPACE_BEGIN
41
42/**
43 * @brief Description of PII data, if any.
44 *
45 * @note If an event is sent through audit pipeline, this value should be forced to 'None'.
46 */
47enum class Pii {
48 None = 0, /**< Data is not PII */
49 SmtpAddress = 1, /**< Data contains an SMTP address */
50 Identity = 2, /**< Data contains an identity */
51 Uri = 3, /**< Data contains a URI */
52 Fqdn = 4, /**< Data contains a FQDN */
53 EUPI = 5, /**< Data contains a End User Pseudonymous Information */
54 OII = 6, /**< Data contains a Organization Identifiable Information */
55 EUII = 7, /**< Data contains End User Identifiable Information */
56 CustomerContent = 8, /**< Data contains Customer Content */
57};
58
59/**
60 * @brief Complete description of PII data types, if any.
61 */
62enum class CombinationPii : uint32_t {
63 None = 0, /**< Data is not PII */
64 SmtpAddress = 1 << 0, /**< Data contains an SMTP address */
65 Identity = 1 << 1, /**< Data contains an identity */
66 Uri = 1 << 2, /**< Data contains a URI */
67 Fqdn = 1 << 3, /**< Data contains a FQDN */
68 EUPI = 1 << 4, /**< Data contains a End User Pseudonymous Information */
69 OII = 1 << 5, /**< Data contains a Organization Identifiable Information */
70 EUII = 1 << 6, /**< Data contains End User Identifiable Information */
71 CustomerContent = 1 << 7, /**< Data contains Customer Content */
72 All = 0xFFFFFFFF, /**< Any and all Pii is represented */
73};
74
75inline constexpr enum CombinationPii operator|(const enum CombinationPii selfValue, const enum CombinationPii inValue) {
76 return static_cast<enum CombinationPii>(uint32_t(selfValue) | uint32_t(inValue));
77}
78
79inline constexpr enum CombinationPii operator&(const enum CombinationPii selfValue, const enum CombinationPii inValue) {
80 return static_cast<enum CombinationPii>(uint32_t(selfValue) & uint32_t(inValue));
81}
82
83/**
84 * @brief Description of event importance
85 */
86enum class EventLevel {
87 Basic = 0, /**< Data is used only for telemetry/logging purposes */
88 ImportantServiceData = 1, /**< Data is necessary to track the usage of critical features */
89 NecessaryServiceData = 2, /**< Data is necessary as a critical feature (e.g. audit) */
90};
91
92/**
93 * @brief Underlying event property data type
94 */
96 Double, /**< double */
97 Int64, /**< int64_t */
98 String, /**< string */
99};
100
101MIP_NAMESPACE_END
102
103#endif // API_MIP_DIAGNOSTIC_TYPES_H_
Abstraction for identity.
EventLevel
Description of event importance.
@ ImportantServiceData
Data is necessary to track the usage of critical features.
@ NecessaryServiceData
Data is necessary as a critical feature (e.g.
@ Basic
Data is used only for telemetry/logging purposes.
Pii
Description of PII data, if any.
@ CustomerContent
Data contains Customer Content.
@ Fqdn
Data contains a FQDN.
@ OII
Data contains a Organization Identifiable Information.
@ EUII
Data contains End User Identifiable Information.
@ EUPI
Data contains a End User Pseudonymous Information.
@ Uri
Data contains a URI.
@ SmtpAddress
Data contains an SMTP address.
@ None
Data is not PII.
constexpr enum CombinationPii operator|(const enum CombinationPii selfValue, const enum CombinationPii inValue)
CombinationPii
Complete description of PII data types, if any.
@ All
Any and all Pii is represented.
constexpr enum CombinationPii operator&(const enum CombinationPii selfValue, const enum CombinationPii inValue)
EventPropertyType
Underlying event property data type.
MIP namespace macros.