Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new PiiKind values for Scrub Last Hextet and for dropping value. #1249

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ public enum PiiKind {
*/
IPv4AddressLegacy(13),

/** An IPv6 Internet Address */
IPv6ScrubLastHextets(14),

/**Drop Value */
DropValue(15),

CustomerContentKind_GenericData(32);

private final int m_value;
Expand Down
4 changes: 3 additions & 1 deletion lib/bond/CsProtocol.bond
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ enum PIIKind
Identity = 10,
Uri = 11,
Fqdn = 12,
IPV4AddressLegacy = 13
IPV4AddressLegacy = 13,
IPv6ScrubLastHextets = 14,
DropValue = 15
}

struct PII
Expand Down
5 changes: 0 additions & 5 deletions lib/bond/generated/BondConstTypes.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//
//------------------------------------------------------------------------------
// This code was generated by a tool.
//
Expand Down Expand Up @@ -49,4 +45,3 @@ enum ProtocolType {
};

} // namespace bond_lite

1 change: 1 addition & 0 deletions lib/bond/generated/CsProtocol.json

Large diffs are not rendered by default.

65 changes: 26 additions & 39 deletions lib/bond/generated/CsProtocol_readers.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//
//------------------------------------------------------------------------------
// This code was generated by a tool.
//
Expand All @@ -14,7 +10,6 @@
//------------------------------------------------------------------------------

#pragma once
#include "mat/config.h"
#include "BondConstTypes.hpp"

namespace bond_lite {
Expand Down Expand Up @@ -315,14 +310,14 @@ bool Deserialize(TReader& reader, ::CsProtocol::Device& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4

case 10: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the check of HAVE_CS4 removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I re-ran the bond compiler to generate new classes with the updated fields, and I did not realize we had manually modified this generated file. I'll need to udpate this.

if (!reader.ReadString(value.authIdEnt)) {
return false;
}
break;
}
#endif

default:
return false;
}
Expand Down Expand Up @@ -489,14 +484,14 @@ bool Deserialize(TReader& reader, ::CsProtocol::App& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4

case 9: {
if (!reader.ReadString(value.sesId)) {
return false;
}
break;
}
#endif

default:
return false;
}
Expand Down Expand Up @@ -632,7 +627,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Utc& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4

case 16: {
if (!reader.ReadInt64(value.wsId)) {
return false;
Expand All @@ -653,7 +648,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Utc& value, bool isBase)
}
break;
}
#endif

default:
return false;
}
Expand Down Expand Up @@ -698,14 +693,14 @@ bool Deserialize(TReader& reader, ::CsProtocol::M365a& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4

case 2: {
if (!reader.ReadUInt64(value.msp)) {
return false;
}
break;
}
#endif

default:
return false;
}
Expand Down Expand Up @@ -966,14 +961,14 @@ bool Deserialize(TReader& reader, ::CsProtocol::Javascript& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4

case 45: {
if (!reader.ReadString(value.msfpc)) {
return false;
}
break;
}
#endif

case 50: {
if (!reader.ReadString(value.mc1Id)) {
return false;
Expand Down Expand Up @@ -1085,7 +1080,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Javascript& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4

case 210: {
if (!reader.ReadBool(value.userConsent)) {
return false;
Expand All @@ -1106,7 +1101,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Javascript& value, bool isBase)
}
break;
}
#endif

case 999: {
if (!reader.ReadString(value.dnt)) {
return false;
Expand Down Expand Up @@ -1207,14 +1202,14 @@ bool Deserialize(TReader& reader, ::CsProtocol::Protocol& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4

case 5: {
if (!reader.ReadUInt64(value.msp)) {
return false;
}
break;
}
#endif

default:
return false;
}
Expand Down Expand Up @@ -1266,7 +1261,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Receipts& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4

case 3: {
if (!reader.ReadString(value.originalName)) {
return false;
Expand All @@ -1280,7 +1275,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Receipts& value, bool isBase)
}
break;
}
#endif

default:
return false;
}
Expand Down Expand Up @@ -1379,12 +1374,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Sdk& value, bool isBase)

switch (id) {
case 1: {
#ifdef HAVE_CS4
/* CS4 note the breaking change here: field name got renamed, binary position stays the same. */
if (!reader.ReadString(value.ver)) {
#else
if (!reader.ReadString(value.libVer)) {
#endif
return false;
}
break;
Expand All @@ -1410,14 +1400,14 @@ bool Deserialize(TReader& reader, ::CsProtocol::Sdk& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4

case 5: {
if (!reader.ReadString(value.libVer)) {
return false;
}
break;
}
#endif

default:
return false;
}
Expand Down Expand Up @@ -1521,7 +1511,6 @@ bool Deserialize(TReader& reader, ::CsProtocol::Cloud& value, bool isBase)
return true;
}

#ifdef HAVE_CS4_FULL
template<typename TReader>
bool Deserialize(TReader& reader, ::CsProtocol::Service& value, bool isBase)
{
Expand Down Expand Up @@ -1920,7 +1909,6 @@ bool Deserialize(TReader& reader, ::CsProtocol::Web& value, bool isBase)

return true;
}
#endif

template<typename TReader>
bool Deserialize(TReader& reader, ::CsProtocol::PII& value, bool isBase)
Expand Down Expand Up @@ -2509,7 +2497,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Record& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4_FULL

case 20: {
uint32_t size4;
uint8_t type4;
Expand All @@ -2530,7 +2518,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Record& value, bool isBase)
}
break;
}
#endif

case 21: {
uint32_t size4;
uint8_t type4;
Expand Down Expand Up @@ -2656,7 +2644,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Record& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4_FULL

case 27: {
uint32_t size4;
uint8_t type4;
Expand Down Expand Up @@ -2719,7 +2707,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Record& value, bool isBase)
}
break;
}
#endif

case 31: {
uint32_t size4;
uint8_t type4;
Expand Down Expand Up @@ -2782,7 +2770,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Record& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4_FULL

case 34: {
uint32_t size4;
uint8_t type4;
Expand Down Expand Up @@ -2845,7 +2833,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Record& value, bool isBase)
}
break;
}
#endif // of HAVE_CS4_FULL

case 37: {
uint32_t size4;
uint8_t type4;
Expand Down Expand Up @@ -2887,7 +2875,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Record& value, bool isBase)
}
break;
}
#ifdef HAVE_CS4_FULL

case 42: {
uint32_t size4;
uint8_t type4;
Expand Down Expand Up @@ -2971,7 +2959,7 @@ bool Deserialize(TReader& reader, ::CsProtocol::Record& value, bool isBase)
}
break;
}
#endif

case 51: {
uint32_t size4;
uint8_t keyType4, valueType4;
Expand Down Expand Up @@ -3062,4 +3050,3 @@ bool Deserialize(TReader& reader, ::CsProtocol::Record& value, bool isBase)
}

} // namespace bond_lite

Loading
Loading