├── .vs
└── covidTest
│ └── v15
│ ├── .suo
│ └── Server
│ └── sqlite3
│ ├── storage.ide
│ ├── storage.ide-shm
│ └── storage.ide-wal
├── README.md
├── TEKE.proto
├── covidTest.sln
└── covidTest
├── App.config
├── DataTime.cs
├── Program.cs
├── Properties
└── AssemblyInfo.cs
├── covidTest.csproj
├── packages.config
└── protocol.cs
/.vs/covidTest/v15/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openCACAO/cocoa-ios-date-identification/b59ff133d4a9441ada96edc262a285cbb0b71a86/.vs/covidTest/v15/.suo
--------------------------------------------------------------------------------
/.vs/covidTest/v15/Server/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openCACAO/cocoa-ios-date-identification/b59ff133d4a9441ada96edc262a285cbb0b71a86/.vs/covidTest/v15/Server/sqlite3/storage.ide
--------------------------------------------------------------------------------
/.vs/covidTest/v15/Server/sqlite3/storage.ide-shm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openCACAO/cocoa-ios-date-identification/b59ff133d4a9441ada96edc262a285cbb0b71a86/.vs/covidTest/v15/Server/sqlite3/storage.ide-shm
--------------------------------------------------------------------------------
/.vs/covidTest/v15/Server/sqlite3/storage.ide-wal:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openCACAO/cocoa-ios-date-identification/b59ff133d4a9441ada96edc262a285cbb0b71a86/.vs/covidTest/v15/Server/sqlite3/storage.ide-wal
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # cocoa-ios-date-identification
2 | iOSの接触日が特定できない不具合に対応するためHASH値より日にちを特定するプログラムです。
3 |
4 | 処理のメインは
5 | covidTest/Program.cs
6 | にて行われています。
7 |
8 | # 作成者について
9 | えじもじゃ(Twitterアカウント:[@edisonMJsss](https://twitter.com/edisonMJsss)/GitHubアカウント:[@edisonmjsss](https://github.com/edisonmjsss))です。
10 |
11 | # 日にちの特定
12 | アプリはサーバーから陽性者が提供したキー情報を
13 | ダウンロードしています。
14 |
15 | ダウンロードしたデータの中には
16 | 接触した可能性がある日も記載されています。
17 |
18 | iPhoneの接触のログ記録の中にあるHashは
19 | ダウンロードデータから計算されています。
20 |
21 | そのHashを再計算する事でダウンロードデータと接触ログの記録を
22 | 紐付ける事が出来る様になりました。
23 |
24 | # Hash
25 | ある情報Aを特定の計算方法で計算した結果です。
26 | この計算結果は情報Aが同じ物であれば必ず同じ結果になります。
27 |
28 | 逆に1文字でも違う情報で計算すると全く違う結果になります。
29 | (同じ結果になる事はほぼ100%有り得ません)
30 |
31 | 今まではiPhoneの接触のログ記録で見れる計算結果(答え)しか分かりませんでしたが
32 | 計算方法と情報Aを特定し同じ計算結果(答え)を再計算しました。
33 |
34 | Googleに公開されている情報から計算方法と情報Aを特定しました。
35 | [https://github.com/google/exposure-notifications-internals](https://github.com/google/exposure-notifications-internals)
36 |
37 | 計算方法にはSHA‐256(Secure Hash Algorithm 256-bit)が使用されています。
38 |
39 | # 実装方法
40 | Apple & Googleが定義したExposure Notification APIで定義された(TEK Export)のProtocol bufferのコンパイラとツールを使用しています。
41 | TEK(Temporary Exposure Key)のエクスポート用ファイルのバイナリフォーマットについては、以下の(Google API for Exposure Notificationsの公式サイト)にその仕様がprotocol buffer形式で定義されています。
42 | https://developers.google.com/android/exposure-notifications/exposure-key-file-format
43 |
44 | # iPhoneの接触ログ記録確認方法
45 | [このツイート](https://twitter.com/teriha8t8/status/1299202626001666054?s=19)を参考に接触のログ記録を確認して
46 | MatchCountが1以上の記録を探してHashの値を確認して下さい。
47 |
48 | iPhoneで確認したHashを[このサイト](https://cacaotest.sakura.ne.jp/)で入力してください。
49 | ※Hashの先頭5文字程度で1件に絞り込めます。
50 |
51 | ## License
52 |
53 | These codes are licensed under CC0.
54 |
55 | [](http://creativecommons.org/publicdomain/zero/1.0/deed.ja)
--------------------------------------------------------------------------------
/TEKE.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto2";
2 | message TemporaryExposureKeyExport {
3 | // Time window of keys in this batch based on arrival to server, in UTC seconds.
4 | optional fixed64 start_timestamp = 1;
5 | optional fixed64 end_timestamp = 2;
6 | // Region for which these keys came from, such as country.
7 | optional string region = 3;
8 | // For example, file 2 in batch size of 10. Ordinal, 1-based numbering.
9 | // Note: Not yet supported on iOS.
10 | optional int32 batch_num = 4;
11 | optional int32 batch_size = 5;
12 | // Information about associated signatures
13 | repeated SignatureInfo signature_infos = 6;
14 | // The TemporaryExposureKeys for initial release of keys.
15 | // Keys should be included in this list for initial release,
16 | // whereas revised or revoked keys should go in revised_keys.
17 | repeated TemporaryExposureKey keys = 7;
18 | // TemporaryExposureKeys that have changed status.
19 | // Keys should be included in this list if they have changed status
20 | // or have been revoked.
21 | repeated TemporaryExposureKey revised_keys = 8;
22 | }
23 | message SignatureInfo {
24 | // The first two fields have been deprecated
25 | reserved 1, 2;
26 | reserved "app_bundle_id", "android_package";
27 | // Key version for rollovers
28 | // Must be in character class [a-zA-Z0-9_]. For example, 'v1'
29 | optional string verification_key_version = 3;
30 | // Alias with which to identify public key to be used for verification
31 | // Must be in character class [a-zA-Z0-9_.]
32 | // For cross-compatibility with Apple, you can use your region's three-digit
33 | // mobile country code (MCC). If your region has more than one MCC, choose the
34 | // one that Apple has configured.
35 | optional string verification_key_id = 4;
36 | // ASN.1 OID for Algorithm Identifier. For example, `1.2.840.10045.4.3.2'
37 | optional string signature_algorithm = 5;
38 | }
39 | message TemporaryExposureKey {
40 | // Key of infected user
41 | optional bytes key_data = 1;
42 | // Varying risk associated with a key depending on diagnosis method
43 | optional int32 transmission_risk_level = 2 [deprecated = true];
44 | // The interval number since epoch for which a key starts
45 | optional int32 rolling_start_interval_number = 3;
46 | // Increments of 10 minutes describing how long a key is valid
47 | optional int32 rolling_period = 4
48 | [default = 144]; // defaults to 24 hours
49 | // Data type representing why this key was published.
50 | enum ReportType {
51 | UNKNOWN = 0; // Never returned by the client API.
52 | CONFIRMED_TEST = 1;
53 | CONFIRMED_CLINICAL_DIAGNOSIS = 2;
54 | SELF_REPORT = 3;
55 | RECURSIVE = 4; // Reserved for future use.
56 | REVOKED = 5; // Used to revoke a key, never returned by client API.
57 | }
58 |
59 | // Type of diagnosis associated with a key.
60 | optional ReportType report_type = 5;
61 |
62 | // Number of days elapsed between symptom onset and the TEK being used.
63 | // E.g. 2 means TEK is 2 days after onset of symptoms.
64 | optional sint32 days_since_onset_of_symptoms = 6;
65 | }
66 | message TEKSignatureList {
67 | repeated TEKSignature signatures = 1;
68 | }
69 | message TEKSignature {
70 | // Info about the signing key, version, algorithm, and so on.
71 | optional SignatureInfo signature_info = 1;
72 | // For example, file 2 in batch size of 10. Ordinal, 1-based numbering.
73 | optional int32 batch_num = 2;
74 | optional int32 batch_size = 3;
75 | // Signature in X9.62 format (ASN.1 SEQUENCE of two INTEGER fields)
76 | optional bytes signature = 4;
77 | }
--------------------------------------------------------------------------------
/covidTest.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.1145
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "covidTest", "covidTest\covidTest.csproj", "{43349140-B779-4368-85FD-DFEE485A33D4}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {43349140-B779-4368-85FD-DFEE485A33D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {43349140-B779-4368-85FD-DFEE485A33D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {43349140-B779-4368-85FD-DFEE485A33D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {43349140-B779-4368-85FD-DFEE485A33D4}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {B2154E13-6D7F-4146-8373-4A828E1DF5C3}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/covidTest/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/covidTest/DataTime.cs:
--------------------------------------------------------------------------------
1 | namespace covidTest
2 | {
3 | internal class DataTime
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/covidTest/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.IO;
5 | using System.Net;
6 | // NuGet:
7 | using System.Text.Json;
8 | using ICSharpCode.SharpZipLib.Zip;
9 | using System.Security.Cryptography;
10 |
11 | namespace covidTest
12 | {
13 | public class JsonDataFormat
14 | {
15 | public String region { get; set; }
16 | public String url { get; set; }
17 | public long created { get; set; }
18 | }
19 | class Program
20 | {
21 | static void Main(string[] args)
22 | {
23 | int i;
24 | StreamWriter sw = new StreamWriter("output-html.txt");
25 | WebClient wcList = new WebClient();
26 | byte[] dataTop = wcList.DownloadData("https://covid19radar-jpn-prod.azureedge.net/c19r/440/list.json");
27 | String jsonText = Encoding.ASCII.GetString(dataTop);
28 | List listR = JsonSerializer.Deserialize>(jsonText);
29 | int k;
30 | for (k = 0; k < listR.Count; k++)
31 | {
32 | JsonDataFormat df = listR[k];
33 | WebClient wc = new WebClient();
34 | byte[] dataBin = wc.DownloadData(df.url);
35 | MemoryStream inputStream = new MemoryStream(dataBin);
36 | MemoryStream outputStream = new MemoryStream();
37 | ZipInputStream zipInputStream = new ZipInputStream(inputStream);
38 | zipInputStream.GetNextEntry();
39 | zipInputStream.CopyTo(outputStream);
40 | byte[] dataOut = outputStream.ToArray();
41 | TemporaryExposureKeyExport teke;
42 | // 先頭16バイトのヘッダを読み捨てる
43 | byte[] dataOut3 = new byte[dataOut.Length - 16];
44 | for (i=0;i");
53 | for (i = 0; i < hashValue.Length; i++)
54 | {
55 | sw.Write("{0:X2}", hashValue[i]);
56 | }
57 | var jstTimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time");
58 | DateTime epochStart = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
59 | epochStart = epochStart.AddSeconds((double)teke.StartTimestamp);
60 | DateTime jstStart = System.TimeZoneInfo.ConvertTimeFromUtc(epochStart, jstTimeZoneInfo);
61 | DateTime epochEnd = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
62 | epochEnd = epochEnd.AddSeconds((double)teke.EndTimestamp);
63 | DateTime jstEnd = System.TimeZoneInfo.ConvertTimeFromUtc(epochEnd, jstTimeZoneInfo);
64 | sw.WriteLine(" at " + jstStart.ToString() + " - " + jstEnd.ToString() + "");
65 | }
66 | sw.Close();
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/covidTest/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
6 | // アセンブリに関連付けられている情報を変更するには、
7 | // これらの属性値を変更してください。
8 | [assembly: AssemblyTitle("covidTest")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("covidTest")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // ComVisible を false に設定すると、このアセンブリ内の型は COM コンポーネントから
18 | // 参照できなくなります。COM からこのアセンブリ内の型にアクセスする必要がある場合は、
19 | // その型の ComVisible 属性を true に設定してください。
20 | [assembly: ComVisible(false)]
21 |
22 | // このプロジェクトが COM に公開される場合、次の GUID が typelib の ID になります
23 | [assembly: Guid("43349140-b779-4368-85fd-dfee485a33d4")]
24 |
25 | // アセンブリのバージョン情報は次の 4 つの値で構成されています:
26 | //
27 | // メジャー バージョン
28 | // マイナー バージョン
29 | // ビルド番号
30 | // Revision
31 | //
32 | // すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
33 | // 既定値にすることができます:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/covidTest/covidTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {43349140-B779-4368-85FD-DFEE485A33D4}
8 | Exe
9 | covidTest
10 | covidTest
11 | v4.6.1
12 | 512
13 | true
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 | ..\packages\Google.Protobuf.3.13.0\lib\net45\Google.Protobuf.dll
38 |
39 |
40 | ..\packages\Google.ProtocolBuffers.2.4.1.555\lib\net40\Google.ProtocolBuffers.dll
41 |
42 |
43 | ..\packages\Google.ProtocolBuffers.2.4.1.555\lib\net40\Google.ProtocolBuffers.Serialization.dll
44 |
45 |
46 | ..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll
47 |
48 |
49 | ..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.1\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll
50 |
51 |
52 |
53 | ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
54 |
55 |
56 |
57 | ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll
58 |
59 |
60 |
61 | ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
62 |
63 |
64 | ..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
65 |
66 |
67 | ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll
68 |
69 |
70 | ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll
71 |
72 |
73 | ..\packages\System.Text.Encodings.Web.4.7.1\lib\net461\System.Text.Encodings.Web.dll
74 |
75 |
76 | ..\packages\System.Text.Json.4.7.2\lib\net461\System.Text.Json.dll
77 |
78 |
79 | ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
80 |
81 |
82 | ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/covidTest/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/covidTest/protocol.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by the protocol buffer compiler. DO NOT EDIT!
3 | // source: test.proto
4 | //
5 | #pragma warning disable 1591, 0612, 3021
6 | #region Designer generated code
7 |
8 | using pb = global::Google.Protobuf;
9 | using pbc = global::Google.Protobuf.Collections;
10 | using pbr = global::Google.Protobuf.Reflection;
11 | using scg = global::System.Collections.Generic;
12 | /// Holder for reflection information generated from test.proto
13 | public static partial class TestReflection
14 | {
15 |
16 | #region Descriptor
17 | /// File descriptor for test.proto
18 | public static pbr::FileDescriptor Descriptor
19 | {
20 | get { return descriptor; }
21 | }
22 | private static pbr::FileDescriptor descriptor;
23 |
24 | static TestReflection()
25 | {
26 | byte[] descriptorData = global::System.Convert.FromBase64String(
27 | string.Concat(
28 | "Cgp0ZXN0LnByb3RvIv4BChpUZW1wb3JhcnlFeHBvc3VyZUtleUV4cG9ydBIX",
29 | "Cg9zdGFydF90aW1lc3RhbXAYASABKAYSFQoNZW5kX3RpbWVzdGFtcBgCIAEo",
30 | "BhIOCgZyZWdpb24YAyABKAkSEQoJYmF0Y2hfbnVtGAQgASgFEhIKCmJhdGNo",
31 | "X3NpemUYBSABKAUSJwoPc2lnbmF0dXJlX2luZm9zGAYgAygLMg4uU2lnbmF0",
32 | "dXJlSW5mbxIjCgRrZXlzGAcgAygLMhUuVGVtcG9yYXJ5RXhwb3N1cmVLZXkS",
33 | "KwoMcmV2aXNlZF9rZXlzGAggAygLMhUuVGVtcG9yYXJ5RXhwb3N1cmVLZXki",
34 | "lwEKDVNpZ25hdHVyZUluZm8SIAoYdmVyaWZpY2F0aW9uX2tleV92ZXJzaW9u",
35 | "GAMgASgJEhsKE3ZlcmlmaWNhdGlvbl9rZXlfaWQYBCABKAkSGwoTc2lnbmF0",
36 | "dXJlX2FsZ29yaXRobRgFIAEoCUoECAEQAkoECAIQA1INYXBwX2J1bmRsZV9p",
37 | "ZFIPYW5kcm9pZF9wYWNrYWdlIuwCChRUZW1wb3JhcnlFeHBvc3VyZUtleRIQ",
38 | "CghrZXlfZGF0YRgBIAEoDBIjChd0cmFuc21pc3Npb25fcmlza19sZXZlbBgC",
39 | "IAEoBUICGAESJQodcm9sbGluZ19zdGFydF9pbnRlcnZhbF9udW1iZXIYAyAB",
40 | "KAUSGwoOcm9sbGluZ19wZXJpb2QYBCABKAU6AzE0NBI1CgtyZXBvcnRfdHlw",
41 | "ZRgFIAEoDjIgLlRlbXBvcmFyeUV4cG9zdXJlS2V5LlJlcG9ydFR5cGUSJAoc",
42 | "ZGF5c19zaW5jZV9vbnNldF9vZl9zeW1wdG9tcxgGIAEoESJ8CgpSZXBvcnRU",
43 | "eXBlEgsKB1VOS05PV04QABISCg5DT05GSVJNRURfVEVTVBABEiAKHENPTkZJ",
44 | "Uk1FRF9DTElOSUNBTF9ESUFHTk9TSVMQAhIPCgtTRUxGX1JFUE9SVBADEg0K",
45 | "CVJFQ1VSU0lWRRAEEgsKB1JFVk9LRUQQBQ=="));
46 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
47 | new pbr::FileDescriptor[] { },
48 | new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
49 | new pbr::GeneratedClrTypeInfo(typeof(global::TemporaryExposureKeyExport), global::TemporaryExposureKeyExport.Parser, new[]{ "StartTimestamp", "EndTimestamp", "Region", "BatchNum", "BatchSize", "SignatureInfos", "Keys", "RevisedKeys" }, null, null, null, null),
50 | new pbr::GeneratedClrTypeInfo(typeof(global::SignatureInfo), global::SignatureInfo.Parser, new[]{ "VerificationKeyVersion", "VerificationKeyId", "SignatureAlgorithm" }, null, null, null, null),
51 | new pbr::GeneratedClrTypeInfo(typeof(global::TemporaryExposureKey), global::TemporaryExposureKey.Parser, new[]{ "KeyData", "TransmissionRiskLevel", "RollingStartIntervalNumber", "RollingPeriod", "ReportType", "DaysSinceOnsetOfSymptoms" }, null, new[]{ typeof(global::TemporaryExposureKey.Types.ReportType) }, null, null)
52 | }));
53 | }
54 | #endregion
55 |
56 | }
57 | #region Messages
58 | public sealed partial class TemporaryExposureKeyExport : pb::IMessage
59 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
60 | , pb::IBufferMessage
61 | #endif
62 | {
63 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TemporaryExposureKeyExport());
64 | private pb::UnknownFieldSet _unknownFields;
65 | private int _hasBits0;
66 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
67 | public static pb::MessageParser Parser { get { return _parser; } }
68 |
69 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
70 | public static pbr::MessageDescriptor Descriptor
71 | {
72 | get { return global::TestReflection.Descriptor.MessageTypes[0]; }
73 | }
74 |
75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
76 | pbr::MessageDescriptor pb::IMessage.Descriptor
77 | {
78 | get { return Descriptor; }
79 | }
80 |
81 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
82 | public TemporaryExposureKeyExport()
83 | {
84 | OnConstruction();
85 | }
86 |
87 | partial void OnConstruction();
88 |
89 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
90 | public TemporaryExposureKeyExport(TemporaryExposureKeyExport other) : this()
91 | {
92 | _hasBits0 = other._hasBits0;
93 | startTimestamp_ = other.startTimestamp_;
94 | endTimestamp_ = other.endTimestamp_;
95 | region_ = other.region_;
96 | batchNum_ = other.batchNum_;
97 | batchSize_ = other.batchSize_;
98 | signatureInfos_ = other.signatureInfos_.Clone();
99 | keys_ = other.keys_.Clone();
100 | revisedKeys_ = other.revisedKeys_.Clone();
101 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
102 | }
103 |
104 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
105 | public TemporaryExposureKeyExport Clone()
106 | {
107 | return new TemporaryExposureKeyExport(this);
108 | }
109 |
110 | /// Field number for the "start_timestamp" field.
111 | public const int StartTimestampFieldNumber = 1;
112 | private readonly static ulong StartTimestampDefaultValue = 0UL;
113 |
114 | private ulong startTimestamp_;
115 | ///
116 | /// Time window of keys in the file, based on arrival
117 | /// at the server, in UTC seconds.
118 | ///
119 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
120 | public ulong StartTimestamp
121 | {
122 | get { if ((_hasBits0 & 1) != 0) { return startTimestamp_; } else { return StartTimestampDefaultValue; } }
123 | set
124 | {
125 | _hasBits0 |= 1;
126 | startTimestamp_ = value;
127 | }
128 | }
129 | /// Gets whether the "start_timestamp" field is set
130 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
131 | public bool HasStartTimestamp
132 | {
133 | get { return (_hasBits0 & 1) != 0; }
134 | }
135 | /// Clears the value of the "start_timestamp" field
136 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
137 | public void ClearStartTimestamp()
138 | {
139 | _hasBits0 &= ~1;
140 | }
141 |
142 | /// Field number for the "end_timestamp" field.
143 | public const int EndTimestampFieldNumber = 2;
144 | private readonly static ulong EndTimestampDefaultValue = 0UL;
145 |
146 | private ulong endTimestamp_;
147 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
148 | public ulong EndTimestamp
149 | {
150 | get { if ((_hasBits0 & 2) != 0) { return endTimestamp_; } else { return EndTimestampDefaultValue; } }
151 | set
152 | {
153 | _hasBits0 |= 2;
154 | endTimestamp_ = value;
155 | }
156 | }
157 | /// Gets whether the "end_timestamp" field is set
158 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
159 | public bool HasEndTimestamp
160 | {
161 | get { return (_hasBits0 & 2) != 0; }
162 | }
163 | /// Clears the value of the "end_timestamp" field
164 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
165 | public void ClearEndTimestamp()
166 | {
167 | _hasBits0 &= ~2;
168 | }
169 |
170 | /// Field number for the "region" field.
171 | public const int RegionFieldNumber = 3;
172 | private readonly static string RegionDefaultValue = "";
173 |
174 | private string region_;
175 | ///
176 | /// The region from which these keys came
177 | ///
178 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
179 | public string Region
180 | {
181 | get { return region_ ?? RegionDefaultValue; }
182 | set
183 | {
184 | region_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
185 | }
186 | }
187 | /// Gets whether the "region" field is set
188 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
189 | public bool HasRegion
190 | {
191 | get { return region_ != null; }
192 | }
193 | /// Clears the value of the "region" field
194 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
195 | public void ClearRegion()
196 | {
197 | region_ = null;
198 | }
199 |
200 | /// Field number for the "batch_num" field.
201 | public const int BatchNumFieldNumber = 4;
202 | private readonly static int BatchNumDefaultValue = 0;
203 |
204 | private int batchNum_;
205 | ///
206 | /// Reserved for future use. Both batch_num and batch_size
207 | /// must be set to a value of 1.
208 | ///
209 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
210 | public int BatchNum
211 | {
212 | get { if ((_hasBits0 & 4) != 0) { return batchNum_; } else { return BatchNumDefaultValue; } }
213 | set
214 | {
215 | _hasBits0 |= 4;
216 | batchNum_ = value;
217 | }
218 | }
219 | /// Gets whether the "batch_num" field is set
220 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
221 | public bool HasBatchNum
222 | {
223 | get { return (_hasBits0 & 4) != 0; }
224 | }
225 | /// Clears the value of the "batch_num" field
226 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
227 | public void ClearBatchNum()
228 | {
229 | _hasBits0 &= ~4;
230 | }
231 |
232 | /// Field number for the "batch_size" field.
233 | public const int BatchSizeFieldNumber = 5;
234 | private readonly static int BatchSizeDefaultValue = 0;
235 |
236 | private int batchSize_;
237 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
238 | public int BatchSize
239 | {
240 | get { if ((_hasBits0 & 8) != 0) { return batchSize_; } else { return BatchSizeDefaultValue; } }
241 | set
242 | {
243 | _hasBits0 |= 8;
244 | batchSize_ = value;
245 | }
246 | }
247 | /// Gets whether the "batch_size" field is set
248 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
249 | public bool HasBatchSize
250 | {
251 | get { return (_hasBits0 & 8) != 0; }
252 | }
253 | /// Clears the value of the "batch_size" field
254 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
255 | public void ClearBatchSize()
256 | {
257 | _hasBits0 &= ~8;
258 | }
259 |
260 | /// Field number for the "signature_infos" field.
261 | public const int SignatureInfosFieldNumber = 6;
262 | private static readonly pb::FieldCodec _repeated_signatureInfos_codec
263 | = pb::FieldCodec.ForMessage(50, global::SignatureInfo.Parser);
264 | private readonly pbc::RepeatedField signatureInfos_ = new pbc::RepeatedField();
265 | ///
266 | /// Information about associated signatures
267 | ///
268 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
269 | public pbc::RepeatedField SignatureInfos
270 | {
271 | get { return signatureInfos_; }
272 | }
273 |
274 | /// Field number for the "keys" field.
275 | public const int KeysFieldNumber = 7;
276 | private static readonly pb::FieldCodec _repeated_keys_codec
277 | = pb::FieldCodec.ForMessage(58, global::TemporaryExposureKey.Parser);
278 | private readonly pbc::RepeatedField keys_ = new pbc::RepeatedField();
279 | ///
280 | /// Exposure keys that are new.
281 | ///
282 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
283 | public pbc::RepeatedField Keys
284 | {
285 | get { return keys_; }
286 | }
287 |
288 | /// Field number for the "revised_keys" field.
289 | public const int RevisedKeysFieldNumber = 8;
290 | private static readonly pb::FieldCodec _repeated_revisedKeys_codec
291 | = pb::FieldCodec.ForMessage(66, global::TemporaryExposureKey.Parser);
292 | private readonly pbc::RepeatedField revisedKeys_ = new pbc::RepeatedField();
293 | ///
294 | /// Keys that have changed status from previous key archives,
295 | /// including keys that are being revoked.
296 | ///
297 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
298 | public pbc::RepeatedField RevisedKeys
299 | {
300 | get { return revisedKeys_; }
301 | }
302 |
303 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
304 | public override bool Equals(object other)
305 | {
306 | return Equals(other as TemporaryExposureKeyExport);
307 | }
308 |
309 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
310 | public bool Equals(TemporaryExposureKeyExport other)
311 | {
312 | if (ReferenceEquals(other, null))
313 | {
314 | return false;
315 | }
316 | if (ReferenceEquals(other, this))
317 | {
318 | return true;
319 | }
320 | if (StartTimestamp != other.StartTimestamp) return false;
321 | if (EndTimestamp != other.EndTimestamp) return false;
322 | if (Region != other.Region) return false;
323 | if (BatchNum != other.BatchNum) return false;
324 | if (BatchSize != other.BatchSize) return false;
325 | if (!signatureInfos_.Equals(other.signatureInfos_)) return false;
326 | if (!keys_.Equals(other.keys_)) return false;
327 | if (!revisedKeys_.Equals(other.revisedKeys_)) return false;
328 | return Equals(_unknownFields, other._unknownFields);
329 | }
330 |
331 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
332 | public override int GetHashCode()
333 | {
334 | int hash = 1;
335 | if (HasStartTimestamp) hash ^= StartTimestamp.GetHashCode();
336 | if (HasEndTimestamp) hash ^= EndTimestamp.GetHashCode();
337 | if (HasRegion) hash ^= Region.GetHashCode();
338 | if (HasBatchNum) hash ^= BatchNum.GetHashCode();
339 | if (HasBatchSize) hash ^= BatchSize.GetHashCode();
340 | hash ^= signatureInfos_.GetHashCode();
341 | hash ^= keys_.GetHashCode();
342 | hash ^= revisedKeys_.GetHashCode();
343 | if (_unknownFields != null)
344 | {
345 | hash ^= _unknownFields.GetHashCode();
346 | }
347 | return hash;
348 | }
349 |
350 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
351 | public override string ToString()
352 | {
353 | return pb::JsonFormatter.ToDiagnosticString(this);
354 | }
355 |
356 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
357 | public void WriteTo(pb::CodedOutputStream output)
358 | {
359 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
360 | output.WriteRawMessage(this);
361 | #else
362 | if (HasStartTimestamp) {
363 | output.WriteRawTag(9);
364 | output.WriteFixed64(StartTimestamp);
365 | }
366 | if (HasEndTimestamp) {
367 | output.WriteRawTag(17);
368 | output.WriteFixed64(EndTimestamp);
369 | }
370 | if (HasRegion) {
371 | output.WriteRawTag(26);
372 | output.WriteString(Region);
373 | }
374 | if (HasBatchNum) {
375 | output.WriteRawTag(32);
376 | output.WriteInt32(BatchNum);
377 | }
378 | if (HasBatchSize) {
379 | output.WriteRawTag(40);
380 | output.WriteInt32(BatchSize);
381 | }
382 | signatureInfos_.WriteTo(output, _repeated_signatureInfos_codec);
383 | keys_.WriteTo(output, _repeated_keys_codec);
384 | revisedKeys_.WriteTo(output, _repeated_revisedKeys_codec);
385 | if (_unknownFields != null) {
386 | _unknownFields.WriteTo(output);
387 | }
388 | #endif
389 | }
390 |
391 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
392 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
393 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output)
394 | {
395 | if (HasStartTimestamp)
396 | {
397 | output.WriteRawTag(9);
398 | output.WriteFixed64(StartTimestamp);
399 | }
400 | if (HasEndTimestamp)
401 | {
402 | output.WriteRawTag(17);
403 | output.WriteFixed64(EndTimestamp);
404 | }
405 | if (HasRegion)
406 | {
407 | output.WriteRawTag(26);
408 | output.WriteString(Region);
409 | }
410 | if (HasBatchNum)
411 | {
412 | output.WriteRawTag(32);
413 | output.WriteInt32(BatchNum);
414 | }
415 | if (HasBatchSize)
416 | {
417 | output.WriteRawTag(40);
418 | output.WriteInt32(BatchSize);
419 | }
420 | signatureInfos_.WriteTo(ref output, _repeated_signatureInfos_codec);
421 | keys_.WriteTo(ref output, _repeated_keys_codec);
422 | revisedKeys_.WriteTo(ref output, _repeated_revisedKeys_codec);
423 | if (_unknownFields != null)
424 | {
425 | _unknownFields.WriteTo(ref output);
426 | }
427 | }
428 | #endif
429 |
430 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
431 | public int CalculateSize()
432 | {
433 | int size = 0;
434 | if (HasStartTimestamp)
435 | {
436 | size += 1 + 8;
437 | }
438 | if (HasEndTimestamp)
439 | {
440 | size += 1 + 8;
441 | }
442 | if (HasRegion)
443 | {
444 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Region);
445 | }
446 | if (HasBatchNum)
447 | {
448 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(BatchNum);
449 | }
450 | if (HasBatchSize)
451 | {
452 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(BatchSize);
453 | }
454 | size += signatureInfos_.CalculateSize(_repeated_signatureInfos_codec);
455 | size += keys_.CalculateSize(_repeated_keys_codec);
456 | size += revisedKeys_.CalculateSize(_repeated_revisedKeys_codec);
457 | if (_unknownFields != null)
458 | {
459 | size += _unknownFields.CalculateSize();
460 | }
461 | return size;
462 | }
463 |
464 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
465 | public void MergeFrom(TemporaryExposureKeyExport other)
466 | {
467 | if (other == null)
468 | {
469 | return;
470 | }
471 | if (other.HasStartTimestamp)
472 | {
473 | StartTimestamp = other.StartTimestamp;
474 | }
475 | if (other.HasEndTimestamp)
476 | {
477 | EndTimestamp = other.EndTimestamp;
478 | }
479 | if (other.HasRegion)
480 | {
481 | Region = other.Region;
482 | }
483 | if (other.HasBatchNum)
484 | {
485 | BatchNum = other.BatchNum;
486 | }
487 | if (other.HasBatchSize)
488 | {
489 | BatchSize = other.BatchSize;
490 | }
491 | signatureInfos_.Add(other.signatureInfos_);
492 | keys_.Add(other.keys_);
493 | revisedKeys_.Add(other.revisedKeys_);
494 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
495 | }
496 |
497 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
498 | public void MergeFrom(pb::CodedInputStream input)
499 | {
500 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
501 | input.ReadRawMessage(this);
502 | #else
503 | uint tag;
504 | while ((tag = input.ReadTag()) != 0) {
505 | switch(tag) {
506 | default:
507 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
508 | break;
509 | case 9: {
510 | StartTimestamp = input.ReadFixed64();
511 | break;
512 | }
513 | case 17: {
514 | EndTimestamp = input.ReadFixed64();
515 | break;
516 | }
517 | case 26: {
518 | Region = input.ReadString();
519 | break;
520 | }
521 | case 32: {
522 | BatchNum = input.ReadInt32();
523 | break;
524 | }
525 | case 40: {
526 | BatchSize = input.ReadInt32();
527 | break;
528 | }
529 | case 50: {
530 | signatureInfos_.AddEntriesFrom(input, _repeated_signatureInfos_codec);
531 | break;
532 | }
533 | case 58: {
534 | keys_.AddEntriesFrom(input, _repeated_keys_codec);
535 | break;
536 | }
537 | case 66: {
538 | revisedKeys_.AddEntriesFrom(input, _repeated_revisedKeys_codec);
539 | break;
540 | }
541 | }
542 | }
543 | #endif
544 | }
545 |
546 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
547 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
548 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)
549 | {
550 | uint tag;
551 | while ((tag = input.ReadTag()) != 0)
552 | {
553 | switch (tag)
554 | {
555 | default:
556 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
557 | break;
558 | case 9:
559 | {
560 | StartTimestamp = input.ReadFixed64();
561 | break;
562 | }
563 | case 17:
564 | {
565 | EndTimestamp = input.ReadFixed64();
566 | break;
567 | }
568 | case 26:
569 | {
570 | Region = input.ReadString();
571 | break;
572 | }
573 | case 32:
574 | {
575 | BatchNum = input.ReadInt32();
576 | break;
577 | }
578 | case 40:
579 | {
580 | BatchSize = input.ReadInt32();
581 | break;
582 | }
583 | case 50:
584 | {
585 | signatureInfos_.AddEntriesFrom(ref input, _repeated_signatureInfos_codec);
586 | break;
587 | }
588 | case 58:
589 | {
590 | keys_.AddEntriesFrom(ref input, _repeated_keys_codec);
591 | break;
592 | }
593 | case 66:
594 | {
595 | revisedKeys_.AddEntriesFrom(ref input, _repeated_revisedKeys_codec);
596 | break;
597 | }
598 | }
599 | }
600 | }
601 | #endif
602 |
603 | }
604 |
605 | public sealed partial class SignatureInfo : pb::IMessage
606 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
607 | , pb::IBufferMessage
608 | #endif
609 | {
610 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SignatureInfo());
611 | private pb::UnknownFieldSet _unknownFields;
612 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
613 | public static pb::MessageParser Parser { get { return _parser; } }
614 |
615 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
616 | public static pbr::MessageDescriptor Descriptor
617 | {
618 | get { return global::TestReflection.Descriptor.MessageTypes[1]; }
619 | }
620 |
621 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
622 | pbr::MessageDescriptor pb::IMessage.Descriptor
623 | {
624 | get { return Descriptor; }
625 | }
626 |
627 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
628 | public SignatureInfo()
629 | {
630 | OnConstruction();
631 | }
632 |
633 | partial void OnConstruction();
634 |
635 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
636 | public SignatureInfo(SignatureInfo other) : this()
637 | {
638 | verificationKeyVersion_ = other.verificationKeyVersion_;
639 | verificationKeyId_ = other.verificationKeyId_;
640 | signatureAlgorithm_ = other.signatureAlgorithm_;
641 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
642 | }
643 |
644 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
645 | public SignatureInfo Clone()
646 | {
647 | return new SignatureInfo(this);
648 | }
649 |
650 | /// Field number for the "verification_key_version" field.
651 | public const int VerificationKeyVersionFieldNumber = 3;
652 | private readonly static string VerificationKeyVersionDefaultValue = "";
653 |
654 | private string verificationKeyVersion_;
655 | ///
656 | /// Key version in case the EN server signing key is rotated. (e.g. "v1")
657 | ///
658 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
659 | public string VerificationKeyVersion
660 | {
661 | get { return verificationKeyVersion_ ?? VerificationKeyVersionDefaultValue; }
662 | set
663 | {
664 | verificationKeyVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
665 | }
666 | }
667 | /// Gets whether the "verification_key_version" field is set
668 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
669 | public bool HasVerificationKeyVersion
670 | {
671 | get { return verificationKeyVersion_ != null; }
672 | }
673 | /// Clears the value of the "verification_key_version" field
674 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
675 | public void ClearVerificationKeyVersion()
676 | {
677 | verificationKeyVersion_ = null;
678 | }
679 |
680 | /// Field number for the "verification_key_id" field.
681 | public const int VerificationKeyIdFieldNumber = 4;
682 | private readonly static string VerificationKeyIdDefaultValue = "";
683 |
684 | private string verificationKeyId_;
685 | ///
686 | /// Implementation-specific string that can be used in key verification.
687 | /// Valid character in this string are all alphanumeric characters,
688 | /// underscores, and periods.
689 | ///
690 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
691 | public string VerificationKeyId
692 | {
693 | get { return verificationKeyId_ ?? VerificationKeyIdDefaultValue; }
694 | set
695 | {
696 | verificationKeyId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
697 | }
698 | }
699 | /// Gets whether the "verification_key_id" field is set
700 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
701 | public bool HasVerificationKeyId
702 | {
703 | get { return verificationKeyId_ != null; }
704 | }
705 | /// Clears the value of the "verification_key_id" field
706 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
707 | public void ClearVerificationKeyId()
708 | {
709 | verificationKeyId_ = null;
710 | }
711 |
712 | /// Field number for the "signature_algorithm" field.
713 | public const int SignatureAlgorithmFieldNumber = 5;
714 | private readonly static string SignatureAlgorithmDefaultValue = "";
715 |
716 | private string signatureAlgorithm_;
717 | ///
718 | /// All keys must be signed using the SHA-256 with ECDSA algorithm.
719 | /// This field must contain the string "1.2.840.10045.4.3.2".
720 | ///
721 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
722 | public string SignatureAlgorithm
723 | {
724 | get { return signatureAlgorithm_ ?? SignatureAlgorithmDefaultValue; }
725 | set
726 | {
727 | signatureAlgorithm_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
728 | }
729 | }
730 | /// Gets whether the "signature_algorithm" field is set
731 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
732 | public bool HasSignatureAlgorithm
733 | {
734 | get { return signatureAlgorithm_ != null; }
735 | }
736 | /// Clears the value of the "signature_algorithm" field
737 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
738 | public void ClearSignatureAlgorithm()
739 | {
740 | signatureAlgorithm_ = null;
741 | }
742 |
743 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
744 | public override bool Equals(object other)
745 | {
746 | return Equals(other as SignatureInfo);
747 | }
748 |
749 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
750 | public bool Equals(SignatureInfo other)
751 | {
752 | if (ReferenceEquals(other, null))
753 | {
754 | return false;
755 | }
756 | if (ReferenceEquals(other, this))
757 | {
758 | return true;
759 | }
760 | if (VerificationKeyVersion != other.VerificationKeyVersion) return false;
761 | if (VerificationKeyId != other.VerificationKeyId) return false;
762 | if (SignatureAlgorithm != other.SignatureAlgorithm) return false;
763 | return Equals(_unknownFields, other._unknownFields);
764 | }
765 |
766 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
767 | public override int GetHashCode()
768 | {
769 | int hash = 1;
770 | if (HasVerificationKeyVersion) hash ^= VerificationKeyVersion.GetHashCode();
771 | if (HasVerificationKeyId) hash ^= VerificationKeyId.GetHashCode();
772 | if (HasSignatureAlgorithm) hash ^= SignatureAlgorithm.GetHashCode();
773 | if (_unknownFields != null)
774 | {
775 | hash ^= _unknownFields.GetHashCode();
776 | }
777 | return hash;
778 | }
779 |
780 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
781 | public override string ToString()
782 | {
783 | return pb::JsonFormatter.ToDiagnosticString(this);
784 | }
785 |
786 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
787 | public void WriteTo(pb::CodedOutputStream output)
788 | {
789 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
790 | output.WriteRawMessage(this);
791 | #else
792 | if (HasVerificationKeyVersion) {
793 | output.WriteRawTag(26);
794 | output.WriteString(VerificationKeyVersion);
795 | }
796 | if (HasVerificationKeyId) {
797 | output.WriteRawTag(34);
798 | output.WriteString(VerificationKeyId);
799 | }
800 | if (HasSignatureAlgorithm) {
801 | output.WriteRawTag(42);
802 | output.WriteString(SignatureAlgorithm);
803 | }
804 | if (_unknownFields != null) {
805 | _unknownFields.WriteTo(output);
806 | }
807 | #endif
808 | }
809 |
810 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
811 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
812 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output)
813 | {
814 | if (HasVerificationKeyVersion)
815 | {
816 | output.WriteRawTag(26);
817 | output.WriteString(VerificationKeyVersion);
818 | }
819 | if (HasVerificationKeyId)
820 | {
821 | output.WriteRawTag(34);
822 | output.WriteString(VerificationKeyId);
823 | }
824 | if (HasSignatureAlgorithm)
825 | {
826 | output.WriteRawTag(42);
827 | output.WriteString(SignatureAlgorithm);
828 | }
829 | if (_unknownFields != null)
830 | {
831 | _unknownFields.WriteTo(ref output);
832 | }
833 | }
834 | #endif
835 |
836 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
837 | public int CalculateSize()
838 | {
839 | int size = 0;
840 | if (HasVerificationKeyVersion)
841 | {
842 | size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationKeyVersion);
843 | }
844 | if (HasVerificationKeyId)
845 | {
846 | size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationKeyId);
847 | }
848 | if (HasSignatureAlgorithm)
849 | {
850 | size += 1 + pb::CodedOutputStream.ComputeStringSize(SignatureAlgorithm);
851 | }
852 | if (_unknownFields != null)
853 | {
854 | size += _unknownFields.CalculateSize();
855 | }
856 | return size;
857 | }
858 |
859 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
860 | public void MergeFrom(SignatureInfo other)
861 | {
862 | if (other == null)
863 | {
864 | return;
865 | }
866 | if (other.HasVerificationKeyVersion)
867 | {
868 | VerificationKeyVersion = other.VerificationKeyVersion;
869 | }
870 | if (other.HasVerificationKeyId)
871 | {
872 | VerificationKeyId = other.VerificationKeyId;
873 | }
874 | if (other.HasSignatureAlgorithm)
875 | {
876 | SignatureAlgorithm = other.SignatureAlgorithm;
877 | }
878 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
879 | }
880 |
881 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
882 | public void MergeFrom(pb::CodedInputStream input)
883 | {
884 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
885 | input.ReadRawMessage(this);
886 | #else
887 | uint tag;
888 | while ((tag = input.ReadTag()) != 0) {
889 | switch(tag) {
890 | default:
891 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
892 | break;
893 | case 26: {
894 | VerificationKeyVersion = input.ReadString();
895 | break;
896 | }
897 | case 34: {
898 | VerificationKeyId = input.ReadString();
899 | break;
900 | }
901 | case 42: {
902 | SignatureAlgorithm = input.ReadString();
903 | break;
904 | }
905 | }
906 | }
907 | #endif
908 | }
909 |
910 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
911 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
912 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)
913 | {
914 | uint tag;
915 | while ((tag = input.ReadTag()) != 0)
916 | {
917 | switch (tag)
918 | {
919 | default:
920 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
921 | break;
922 | case 26:
923 | {
924 | VerificationKeyVersion = input.ReadString();
925 | break;
926 | }
927 | case 34:
928 | {
929 | VerificationKeyId = input.ReadString();
930 | break;
931 | }
932 | case 42:
933 | {
934 | SignatureAlgorithm = input.ReadString();
935 | break;
936 | }
937 | }
938 | }
939 | }
940 | #endif
941 |
942 | }
943 |
944 | public sealed partial class TemporaryExposureKey : pb::IMessage
945 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
946 | , pb::IBufferMessage
947 | #endif
948 | {
949 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TemporaryExposureKey());
950 | private pb::UnknownFieldSet _unknownFields;
951 | private int _hasBits0;
952 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
953 | public static pb::MessageParser Parser { get { return _parser; } }
954 |
955 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
956 | public static pbr::MessageDescriptor Descriptor
957 | {
958 | get { return global::TestReflection.Descriptor.MessageTypes[2]; }
959 | }
960 |
961 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
962 | pbr::MessageDescriptor pb::IMessage.Descriptor
963 | {
964 | get { return Descriptor; }
965 | }
966 |
967 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
968 | public TemporaryExposureKey()
969 | {
970 | OnConstruction();
971 | }
972 |
973 | partial void OnConstruction();
974 |
975 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
976 | public TemporaryExposureKey(TemporaryExposureKey other) : this()
977 | {
978 | _hasBits0 = other._hasBits0;
979 | keyData_ = other.keyData_;
980 | transmissionRiskLevel_ = other.transmissionRiskLevel_;
981 | rollingStartIntervalNumber_ = other.rollingStartIntervalNumber_;
982 | rollingPeriod_ = other.rollingPeriod_;
983 | reportType_ = other.reportType_;
984 | daysSinceOnsetOfSymptoms_ = other.daysSinceOnsetOfSymptoms_;
985 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
986 | }
987 |
988 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
989 | public TemporaryExposureKey Clone()
990 | {
991 | return new TemporaryExposureKey(this);
992 | }
993 |
994 | /// Field number for the "key_data" field.
995 | public const int KeyDataFieldNumber = 1;
996 | private readonly static pb::ByteString KeyDataDefaultValue = pb::ByteString.Empty;
997 |
998 | private pb::ByteString keyData_;
999 | ///
1000 | /// Temporary exposure key for an infected user.
1001 | ///
1002 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1003 | public pb::ByteString KeyData
1004 | {
1005 | get { return keyData_ ?? KeyDataDefaultValue; }
1006 | set
1007 | {
1008 | keyData_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
1009 | }
1010 | }
1011 | /// Gets whether the "key_data" field is set
1012 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1013 | public bool HasKeyData
1014 | {
1015 | get { return keyData_ != null; }
1016 | }
1017 | /// Clears the value of the "key_data" field
1018 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1019 | public void ClearKeyData()
1020 | {
1021 | keyData_ = null;
1022 | }
1023 |
1024 | /// Field number for the "transmission_risk_level" field.
1025 | public const int TransmissionRiskLevelFieldNumber = 2;
1026 | private readonly static int TransmissionRiskLevelDefaultValue = 0;
1027 |
1028 | private int transmissionRiskLevel_;
1029 | ///
1030 | /// Varying risk associated with a key depending on diagnosis method.
1031 | /// Deprecated and no longer used.
1032 | ///
1033 | [global::System.ObsoleteAttribute]
1034 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1035 | public int TransmissionRiskLevel
1036 | {
1037 | get { if ((_hasBits0 & 1) != 0) { return transmissionRiskLevel_; } else { return TransmissionRiskLevelDefaultValue; } }
1038 | set
1039 | {
1040 | _hasBits0 |= 1;
1041 | transmissionRiskLevel_ = value;
1042 | }
1043 | }
1044 | /// Gets whether the "transmission_risk_level" field is set
1045 | [global::System.ObsoleteAttribute]
1046 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1047 | public bool HasTransmissionRiskLevel
1048 | {
1049 | get { return (_hasBits0 & 1) != 0; }
1050 | }
1051 | /// Clears the value of the "transmission_risk_level" field
1052 | [global::System.ObsoleteAttribute]
1053 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1054 | public void ClearTransmissionRiskLevel()
1055 | {
1056 | _hasBits0 &= ~1;
1057 | }
1058 |
1059 | /// Field number for the "rolling_start_interval_number" field.
1060 | public const int RollingStartIntervalNumberFieldNumber = 3;
1061 | private readonly static int RollingStartIntervalNumberDefaultValue = 0;
1062 |
1063 | private int rollingStartIntervalNumber_;
1064 | ///
1065 | /// The interval number since epoch for which a key starts
1066 | ///
1067 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1068 | public int RollingStartIntervalNumber
1069 | {
1070 | get { if ((_hasBits0 & 2) != 0) { return rollingStartIntervalNumber_; } else { return RollingStartIntervalNumberDefaultValue; } }
1071 | set
1072 | {
1073 | _hasBits0 |= 2;
1074 | rollingStartIntervalNumber_ = value;
1075 | }
1076 | }
1077 | /// Gets whether the "rolling_start_interval_number" field is set
1078 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1079 | public bool HasRollingStartIntervalNumber
1080 | {
1081 | get { return (_hasBits0 & 2) != 0; }
1082 | }
1083 | /// Clears the value of the "rolling_start_interval_number" field
1084 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1085 | public void ClearRollingStartIntervalNumber()
1086 | {
1087 | _hasBits0 &= ~2;
1088 | }
1089 |
1090 | /// Field number for the "rolling_period" field.
1091 | public const int RollingPeriodFieldNumber = 4;
1092 | private readonly static int RollingPeriodDefaultValue = 144;
1093 |
1094 | private int rollingPeriod_;
1095 | ///
1096 | /// How long this key is valid, specified in increments of 10 minutes
1097 | ///
1098 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1099 | public int RollingPeriod
1100 | {
1101 | get { if ((_hasBits0 & 4) != 0) { return rollingPeriod_; } else { return RollingPeriodDefaultValue; } }
1102 | set
1103 | {
1104 | _hasBits0 |= 4;
1105 | rollingPeriod_ = value;
1106 | }
1107 | }
1108 | /// Gets whether the "rolling_period" field is set
1109 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1110 | public bool HasRollingPeriod
1111 | {
1112 | get { return (_hasBits0 & 4) != 0; }
1113 | }
1114 | /// Clears the value of the "rolling_period" field
1115 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1116 | public void ClearRollingPeriod()
1117 | {
1118 | _hasBits0 &= ~4;
1119 | }
1120 |
1121 | /// Field number for the "report_type" field.
1122 | public const int ReportTypeFieldNumber = 5;
1123 | private readonly static global::TemporaryExposureKey.Types.ReportType ReportTypeDefaultValue = global::TemporaryExposureKey.Types.ReportType.Unknown;
1124 |
1125 | private global::TemporaryExposureKey.Types.ReportType reportType_;
1126 | ///
1127 | /// Type of diagnosis associated with a key.
1128 | ///
1129 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1130 | public global::TemporaryExposureKey.Types.ReportType ReportType
1131 | {
1132 | get { if ((_hasBits0 & 8) != 0) { return reportType_; } else { return ReportTypeDefaultValue; } }
1133 | set
1134 | {
1135 | _hasBits0 |= 8;
1136 | reportType_ = value;
1137 | }
1138 | }
1139 | /// Gets whether the "report_type" field is set
1140 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1141 | public bool HasReportType
1142 | {
1143 | get { return (_hasBits0 & 8) != 0; }
1144 | }
1145 | /// Clears the value of the "report_type" field
1146 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1147 | public void ClearReportType()
1148 | {
1149 | _hasBits0 &= ~8;
1150 | }
1151 |
1152 | /// Field number for the "days_since_onset_of_symptoms" field.
1153 | public const int DaysSinceOnsetOfSymptomsFieldNumber = 6;
1154 | private readonly static int DaysSinceOnsetOfSymptomsDefaultValue = 0;
1155 |
1156 | private int daysSinceOnsetOfSymptoms_;
1157 | ///
1158 | /// Number of days elapsed between symptom onset and the TEK being used.
1159 | /// E.g. 2 means TEK is from 2 days after onset of symptoms.
1160 | /// Valid values range is from -14 to 14.
1161 | ///
1162 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1163 | public int DaysSinceOnsetOfSymptoms
1164 | {
1165 | get { if ((_hasBits0 & 16) != 0) { return daysSinceOnsetOfSymptoms_; } else { return DaysSinceOnsetOfSymptomsDefaultValue; } }
1166 | set
1167 | {
1168 | _hasBits0 |= 16;
1169 | daysSinceOnsetOfSymptoms_ = value;
1170 | }
1171 | }
1172 | /// Gets whether the "days_since_onset_of_symptoms" field is set
1173 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1174 | public bool HasDaysSinceOnsetOfSymptoms
1175 | {
1176 | get { return (_hasBits0 & 16) != 0; }
1177 | }
1178 | /// Clears the value of the "days_since_onset_of_symptoms" field
1179 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1180 | public void ClearDaysSinceOnsetOfSymptoms()
1181 | {
1182 | _hasBits0 &= ~16;
1183 | }
1184 |
1185 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1186 | public override bool Equals(object other)
1187 | {
1188 | return Equals(other as TemporaryExposureKey);
1189 | }
1190 |
1191 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1192 | public bool Equals(TemporaryExposureKey other)
1193 | {
1194 | if (ReferenceEquals(other, null))
1195 | {
1196 | return false;
1197 | }
1198 | if (ReferenceEquals(other, this))
1199 | {
1200 | return true;
1201 | }
1202 | if (KeyData != other.KeyData) return false;
1203 | if (TransmissionRiskLevel != other.TransmissionRiskLevel) return false;
1204 | if (RollingStartIntervalNumber != other.RollingStartIntervalNumber) return false;
1205 | if (RollingPeriod != other.RollingPeriod) return false;
1206 | if (ReportType != other.ReportType) return false;
1207 | if (DaysSinceOnsetOfSymptoms != other.DaysSinceOnsetOfSymptoms) return false;
1208 | return Equals(_unknownFields, other._unknownFields);
1209 | }
1210 |
1211 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1212 | public override int GetHashCode()
1213 | {
1214 | int hash = 1;
1215 | if (HasKeyData) hash ^= KeyData.GetHashCode();
1216 | if (HasTransmissionRiskLevel) hash ^= TransmissionRiskLevel.GetHashCode();
1217 | if (HasRollingStartIntervalNumber) hash ^= RollingStartIntervalNumber.GetHashCode();
1218 | if (HasRollingPeriod) hash ^= RollingPeriod.GetHashCode();
1219 | if (HasReportType) hash ^= ReportType.GetHashCode();
1220 | if (HasDaysSinceOnsetOfSymptoms) hash ^= DaysSinceOnsetOfSymptoms.GetHashCode();
1221 | if (_unknownFields != null)
1222 | {
1223 | hash ^= _unknownFields.GetHashCode();
1224 | }
1225 | return hash;
1226 | }
1227 |
1228 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1229 | public override string ToString()
1230 | {
1231 | return pb::JsonFormatter.ToDiagnosticString(this);
1232 | }
1233 |
1234 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1235 | public void WriteTo(pb::CodedOutputStream output)
1236 | {
1237 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1238 | output.WriteRawMessage(this);
1239 | #else
1240 | if (HasKeyData) {
1241 | output.WriteRawTag(10);
1242 | output.WriteBytes(KeyData);
1243 | }
1244 | if (HasTransmissionRiskLevel) {
1245 | output.WriteRawTag(16);
1246 | output.WriteInt32(TransmissionRiskLevel);
1247 | }
1248 | if (HasRollingStartIntervalNumber) {
1249 | output.WriteRawTag(24);
1250 | output.WriteInt32(RollingStartIntervalNumber);
1251 | }
1252 | if (HasRollingPeriod) {
1253 | output.WriteRawTag(32);
1254 | output.WriteInt32(RollingPeriod);
1255 | }
1256 | if (HasReportType) {
1257 | output.WriteRawTag(40);
1258 | output.WriteEnum((int) ReportType);
1259 | }
1260 | if (HasDaysSinceOnsetOfSymptoms) {
1261 | output.WriteRawTag(48);
1262 | output.WriteSInt32(DaysSinceOnsetOfSymptoms);
1263 | }
1264 | if (_unknownFields != null) {
1265 | _unknownFields.WriteTo(output);
1266 | }
1267 | #endif
1268 | }
1269 |
1270 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1271 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1272 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output)
1273 | {
1274 | if (HasKeyData)
1275 | {
1276 | output.WriteRawTag(10);
1277 | output.WriteBytes(KeyData);
1278 | }
1279 | if (HasTransmissionRiskLevel)
1280 | {
1281 | output.WriteRawTag(16);
1282 | output.WriteInt32(TransmissionRiskLevel);
1283 | }
1284 | if (HasRollingStartIntervalNumber)
1285 | {
1286 | output.WriteRawTag(24);
1287 | output.WriteInt32(RollingStartIntervalNumber);
1288 | }
1289 | if (HasRollingPeriod)
1290 | {
1291 | output.WriteRawTag(32);
1292 | output.WriteInt32(RollingPeriod);
1293 | }
1294 | if (HasReportType)
1295 | {
1296 | output.WriteRawTag(40);
1297 | output.WriteEnum((int)ReportType);
1298 | }
1299 | if (HasDaysSinceOnsetOfSymptoms)
1300 | {
1301 | output.WriteRawTag(48);
1302 | output.WriteSInt32(DaysSinceOnsetOfSymptoms);
1303 | }
1304 | if (_unknownFields != null)
1305 | {
1306 | _unknownFields.WriteTo(ref output);
1307 | }
1308 | }
1309 | #endif
1310 |
1311 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1312 | public int CalculateSize()
1313 | {
1314 | int size = 0;
1315 | if (HasKeyData)
1316 | {
1317 | size += 1 + pb::CodedOutputStream.ComputeBytesSize(KeyData);
1318 | }
1319 | if (HasTransmissionRiskLevel)
1320 | {
1321 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(TransmissionRiskLevel);
1322 | }
1323 | if (HasRollingStartIntervalNumber)
1324 | {
1325 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(RollingStartIntervalNumber);
1326 | }
1327 | if (HasRollingPeriod)
1328 | {
1329 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(RollingPeriod);
1330 | }
1331 | if (HasReportType)
1332 | {
1333 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)ReportType);
1334 | }
1335 | if (HasDaysSinceOnsetOfSymptoms)
1336 | {
1337 | size += 1 + pb::CodedOutputStream.ComputeSInt32Size(DaysSinceOnsetOfSymptoms);
1338 | }
1339 | if (_unknownFields != null)
1340 | {
1341 | size += _unknownFields.CalculateSize();
1342 | }
1343 | return size;
1344 | }
1345 |
1346 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1347 | public void MergeFrom(TemporaryExposureKey other)
1348 | {
1349 | if (other == null)
1350 | {
1351 | return;
1352 | }
1353 | if (other.HasKeyData)
1354 | {
1355 | KeyData = other.KeyData;
1356 | }
1357 | if (other.HasTransmissionRiskLevel)
1358 | {
1359 | TransmissionRiskLevel = other.TransmissionRiskLevel;
1360 | }
1361 | if (other.HasRollingStartIntervalNumber)
1362 | {
1363 | RollingStartIntervalNumber = other.RollingStartIntervalNumber;
1364 | }
1365 | if (other.HasRollingPeriod)
1366 | {
1367 | RollingPeriod = other.RollingPeriod;
1368 | }
1369 | if (other.HasReportType)
1370 | {
1371 | ReportType = other.ReportType;
1372 | }
1373 | if (other.HasDaysSinceOnsetOfSymptoms)
1374 | {
1375 | DaysSinceOnsetOfSymptoms = other.DaysSinceOnsetOfSymptoms;
1376 | }
1377 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
1378 | }
1379 |
1380 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1381 | public void MergeFrom(pb::CodedInputStream input)
1382 | {
1383 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1384 | input.ReadRawMessage(this);
1385 | #else
1386 | uint tag;
1387 | while ((tag = input.ReadTag()) != 0) {
1388 | switch(tag) {
1389 | default:
1390 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1391 | break;
1392 | case 10: {
1393 | KeyData = input.ReadBytes();
1394 | break;
1395 | }
1396 | case 16: {
1397 | TransmissionRiskLevel = input.ReadInt32();
1398 | break;
1399 | }
1400 | case 24: {
1401 | RollingStartIntervalNumber = input.ReadInt32();
1402 | break;
1403 | }
1404 | case 32: {
1405 | RollingPeriod = input.ReadInt32();
1406 | break;
1407 | }
1408 | case 40: {
1409 | ReportType = (global::TemporaryExposureKey.Types.ReportType) input.ReadEnum();
1410 | break;
1411 | }
1412 | case 48: {
1413 | DaysSinceOnsetOfSymptoms = input.ReadSInt32();
1414 | break;
1415 | }
1416 | }
1417 | }
1418 | #endif
1419 | }
1420 |
1421 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1422 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1423 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)
1424 | {
1425 | uint tag;
1426 | while ((tag = input.ReadTag()) != 0)
1427 | {
1428 | switch (tag)
1429 | {
1430 | default:
1431 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
1432 | break;
1433 | case 10:
1434 | {
1435 | KeyData = input.ReadBytes();
1436 | break;
1437 | }
1438 | case 16:
1439 | {
1440 | TransmissionRiskLevel = input.ReadInt32();
1441 | break;
1442 | }
1443 | case 24:
1444 | {
1445 | RollingStartIntervalNumber = input.ReadInt32();
1446 | break;
1447 | }
1448 | case 32:
1449 | {
1450 | RollingPeriod = input.ReadInt32();
1451 | break;
1452 | }
1453 | case 40:
1454 | {
1455 | ReportType = (global::TemporaryExposureKey.Types.ReportType)input.ReadEnum();
1456 | break;
1457 | }
1458 | case 48:
1459 | {
1460 | DaysSinceOnsetOfSymptoms = input.ReadSInt32();
1461 | break;
1462 | }
1463 | }
1464 | }
1465 | }
1466 | #endif
1467 |
1468 | #region Nested types
1469 | /// Container for nested types declared in the TemporaryExposureKey message type.
1470 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1471 | public static partial class Types
1472 | {
1473 | ///
1474 | /// Data type that represents why this key was published.
1475 | ///
1476 | public enum ReportType
1477 | {
1478 | ///
1479 | /// Never returned by the client API.
1480 | ///
1481 | [pbr::OriginalName("UNKNOWN")] Unknown = 0,
1482 | [pbr::OriginalName("CONFIRMED_TEST")] ConfirmedTest = 1,
1483 | [pbr::OriginalName("CONFIRMED_CLINICAL_DIAGNOSIS")] ConfirmedClinicalDiagnosis = 2,
1484 | [pbr::OriginalName("SELF_REPORT")] SelfReport = 3,
1485 | ///
1486 | /// Reserved for future use.
1487 | ///
1488 | [pbr::OriginalName("RECURSIVE")] Recursive = 4,
1489 | ///
1490 | /// Used to revoke a key, never returned by client API.
1491 | ///
1492 | [pbr::OriginalName("REVOKED")] Revoked = 5,
1493 | }
1494 |
1495 | }
1496 | #endregion
1497 |
1498 | }
1499 |
1500 | #endregion
1501 |
1502 |
1503 | #endregion Designer generated code
1504 |
--------------------------------------------------------------------------------